summaryrefslogtreecommitdiffstats
path: root/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/codeaurora/bluetooth/a4wp/A4wpService.java')
-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 ed80174..cc4b998 100644
--- a/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
+++ b/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
@@ -633,9 +633,6 @@ public class A4wpService extends Service
}
} 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);
}
}
@@ -680,6 +677,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) {
@@ -748,8 +748,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();