summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/gatt
diff options
context:
space:
mode:
authorWei Wang <weiwa@google.com>2014-08-15 14:02:45 -0700
committerWei Wang <weiwa@google.com>2014-08-15 14:25:38 -0700
commitdb0920ed7d9ef5385e36dfa922f351e4e6556a3e (patch)
tree05abced944b4649c4e49a2792b4c83085b90e740 /src/com/android/bluetooth/gatt
parent03f23ee7d3868e97ec7ed1a3d81c149b5b0ebd69 (diff)
downloadandroid_packages_apps_Bluetooth-db0920ed7d9ef5385e36dfa922f351e4e6556a3e.tar.gz
android_packages_apps_Bluetooth-db0920ed7d9ef5385e36dfa922f351e4e6556a3e.tar.bz2
android_packages_apps_Bluetooth-db0920ed7d9ef5385e36dfa922f351e4e6556a3e.zip
Fix API council review comments. Also hide certain APIs(2/3).
b/17006825 Change-Id: I6c0e739e44f8a9d26f3f2b03937b38d4dec893e7
Diffstat (limited to 'src/com/android/bluetooth/gatt')
-rw-r--r--src/com/android/bluetooth/gatt/AdvertiseManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/gatt/AdvertiseManager.java b/src/com/android/bluetooth/gatt/AdvertiseManager.java
index 0fa2aaaef..fe3695aed 100644
--- a/src/com/android/bluetooth/gatt/AdvertiseManager.java
+++ b/src/com/android/bluetooth/gatt/AdvertiseManager.java
@@ -300,13 +300,15 @@ class AdvertiseManager {
int maxAdvertiseUnit = minAdvertiseUnit + ADVERTISING_INTERVAL_DELTA_UNIT;
int advertiseEventType = getAdvertisingEventType(client);
int txPowerLevel = getTxPowerLevel(client.settings);
+ int advertiseTimeoutSeconds = (int) TimeUnit.MILLISECONDS.toSeconds(
+ client.settings.getTimeout());
gattClientEnableAdvNative(
clientIf,
minAdvertiseUnit, maxAdvertiseUnit,
advertiseEventType,
ADVERTISING_CHANNEL_ALL,
txPowerLevel,
- client.settings.getTimeout());
+ advertiseTimeoutSeconds);
}
private void setAdvertisingData(int clientIf, AdvertiseData data, boolean isScanResponse) {
@@ -400,7 +402,7 @@ class AdvertiseManager {
// Convert advertising event type to stack values.
private int getAdvertisingEventType(AdvertiseClient client) {
AdvertiseSettings settings = client.settings;
- if (settings.getIsConnectable()) {
+ if (settings.isConnectable()) {
return ADVERTISING_EVENT_TYPE_CONNECTABLE;
}
return client.scanResponse == null ? ADVERTISING_EVENT_TYPE_NON_CONNECTABLE