summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran Kelageri <kkelageri@codeaurora.org>2015-01-14 14:42:25 -0800
committerKiran Kelageri <kkelageri@codeaurora.org>2015-01-18 14:28:47 -0800
commit1564fa0f9253b03aa64a5c24960311ab868e6c8a (patch)
treeb0188252a8afe62fdcebe0a5f334e290f1ec8ff5
parentddcd0caf30f4565e472204a6c492caae1edbc80d (diff)
downloadandroid_packages_apps_BluetoothExt-1564fa0f9253b03aa64a5c24960311ab868e6c8a.tar.gz
android_packages_apps_BluetoothExt-1564fa0f9253b03aa64a5c24960311ab868e6c8a.tar.bz2
android_packages_apps_BluetoothExt-1564fa0f9253b03aa64a5c24960311ab868e6c8a.zip
Bluetooth-Wipower: Fix for BLE GATT Server disconnection failure.
Create dummy connection to hold the connection even after stop advertisments for wipower is restricted to wipower profile only, Earlier it was creating a dummy connection during for all the new gatt connections. Fix for low RSSI, Wipower needs the tx power level to be high so that there is not drop in RSSI level when on PTU, As part "set multiple advertising parameters" the paramters sent earlier was with low power which reduced 21DB in RSSI so now its been changed for default RSSI levels. Change-Id: Ib6015d2c9a23c56358ea69649dd475675377ef5b CRs-fixed: 781789 CRs-fixed: 781824
-rw-r--r--src/org/codeaurora/bluetooth/a4wp/A4wpService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/codeaurora/bluetooth/a4wp/A4wpService.java b/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
index fa69330..ae43436 100644
--- a/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
+++ b/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
@@ -703,9 +703,6 @@ public class A4wpService extends Service
isChargePortSet = false;
} else if (mState == BluetoothProfile.STATE_CONNECTED) {
Log.v(LOGTAG, "onConnectionStateChange:CONNECTED");
- /* Initiate a dummy connection such that on stop advertisment
- the advetisment instances are cleared properly */
- mBluetoothGattServer.connect(device, false);
}
}
@@ -776,6 +773,9 @@ public class A4wpService extends Service
{
value = mPruStaticParam.getValue();
mDevice = device;
+ /* Initiate a dummy connection such that on stop advertisment
+ the advetisment instances are cleared properly */
+ mBluetoothGattServer.connect(mDevice, false);
}
else if (id == A4WP_PRU_DYNAMIC_UUID) {
if (mPruDynamicParam == null) {
@@ -859,8 +859,8 @@ public class A4wpService extends Service
.addServiceData(uuid1, serviceData).build();
mAdvertiseSettings = new AdvertiseSettings.Builder()
- .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_POWER)
- .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_ULTRA_LOW)
+ .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)
+ .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH)
.setConnectable(true)
.setTimeout(WIPOWER_ADV_TIMEOUT).build();