summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUmesh Vats <uvats@codeaurora.org>2015-02-09 16:22:23 -0800
committerUmesh Vats <uvats@codeaurora.org>2015-03-10 12:45:20 -0700
commite3fe22741311649e28336fe4005f2a28f07f4d1e (patch)
tree281836a8995b244a38a761a27acdb6307eee5f83 /src
parentb2c88b9ad59bb7eeba56c2e7918c02a19340cfd3 (diff)
downloadandroid_packages_apps_BluetoothExt-e3fe22741311649e28336fe4005f2a28f07f4d1e.tar.gz
android_packages_apps_BluetoothExt-e3fe22741311649e28336fe4005f2a28f07f4d1e.tar.bz2
android_packages_apps_BluetoothExt-e3fe22741311649e28336fe4005f2a28f07f4d1e.zip
Bluetooth-Wipower:Fix for re-connect and Vrect_max value change.
1> It was observed that in some cases, PRU was not sending advertisements after disconnection(enablePowerApply OFF). The code changes are done to take care of this issue. 2> Vrect_max values changed from 18V to 19.3V. Change-Id: I8b7017cf4b0e544f89668f421fa353dab1ce6df4 CRs-fixed: 769853, 791497
Diffstat (limited to 'src')
-rw-r--r--src/org/codeaurora/bluetooth/a4wp/A4wpService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/codeaurora/bluetooth/a4wp/A4wpService.java b/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
index 8235b19..38e1116 100644
--- a/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
+++ b/src/org/codeaurora/bluetooth/a4wp/A4wpService.java
@@ -113,7 +113,7 @@ public class A4wpService extends Service
private final static byte DEFAULT_FW_VERSION = 0x0006;
private final static byte DEFAULT_MAX_POWER_DESIRED = 0x0032; // 5Watts
private final static short DEFAULT_VRECT_MIN = 7000; // 7 Volts
- private final static short DEFAULT_VRECT_MAX = 18000; // 18 Volts
+ private final static short DEFAULT_VRECT_MAX = 19300; // 19.3 Volts
private final static short DEFAULT_VRECT_SET = 7200; // 7.2 Volts
private final static short DEFAULT_DELTA_R1 = 0x0001;
private final static int DEFAULT_RFU_VAL = 0x0000;
@@ -626,6 +626,11 @@ public class A4wpService extends Service
if (mBluetoothGattServer != null && mDevice != null) {
Log.v(LOGTAG, "onPowerApply " + state + "dropping Connection");
mBluetoothGattServer.cancelConnection(mDevice);
+ if (mChargeComplete == true) {
+ mWipowerManager.enablePowerApply(true, true, true);
+ } else {
+ mWipowerManager.enablePowerApply(true, true, false);
+ }
} else {
Log.v(LOGTAG, "onPowerApply " + state + "skip dropping Connection");
}