History log of /packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
86c29fe88456bdcfbd4334647b04ef81ff384a06 22-Dec-2016 Sanket Agarwal <sanketa@google.com> Separate Phone Policy from mechanism

Create a new policy file which interacts using either public APIs (such
as Intents) or uses equivalent functions which are exposed by the
binder. This is an attempt to be able to separate policy such that
different devices can have different policies.

Bug: b/33079907
Test: JUnit tests
Change-Id: I6c5a7ee9eb4e10f5f649794546acde5ec4b297aa
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
5b0dcf64aa76cb7ab8a50b033ef4e9ce23d3f4aa 10-Oct-2016 Andre Eisenbach <eisenbach@google.com> Reduce AdapterState log spam on isTurning*() functions

Bug: 31857542
Test: manual
Change-Id: Ia3658509af727714820a38c9f94398d714813046
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
eb7b90f5b93db1230a5b64caa3d8d05a642e33a6 10-May-2016 Marie Janssen <jamuraa@google.com> Cleanup unused requires in java files

Change-Id: I7b055c1d3d3f6a69e9f49c077853ab45fcad7106
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
c050578e447a96272daa7717de0ecf913b94e719 12-Jan-2016 venkata Jagadeesh <vjagad@codeaurora.org> Broadcast UUIDS on BT state transition to ON

Use case: Phone and media connection is not happening
after BT reset during swapping between the HeadSet.

Precondition:
1. WIFI should be on and connected with AP.

Steps:
1. Pair and connect from DUT to PLT legend device.
2. Make an Mobile originated (MO) call.
3. Pair and connect from DUT to sony carkit.
4. Swap connection between PLT legend and sony carkit.
5. During swapping turn OFF BT from DUT.
6. Turn ON DUT and wait for auto connection from DUT.
7. Repeat step from 4-6 10 times.

Failure: Failed to connect with HS.

Root cause: Broadcarst UUIDS on receiving the on event
from lower layers even though the state is not
transitioned to ON.

Fix: Broadcast UUIDS on BT state is transitioned to ON
to avoid timing issues related UUIDS.

Change-Id: Ibdbaecd60cf36c599700b1ca353481b8149efa90
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
4e34b45bdc8cdd1c744e46341419b4f838d82a5a 03-Mar-2016 Srinu Jella <sjella@codeaurora.org> Stop profile services when Bluetooth enable times out

While moving from OFF to BLE_ON state, we are able to switch
BLE_TURNING_ON state which starts the enable_timeout timer. After timing
out we are stopping profiles other than BLE which may still be active
and can send callbacks while clean-up is in process or complete.

Bug: 27678483
Change-Id: I75d88024a60967fb516ebd0941e8e216d00c20f6
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
c63ef51ba5f9d355239959bcfe8803987adb1f38 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/4)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I561225652509b29ac6b0d194a3a50e29c5569365
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
68cbac9663a8cac0416bc81968f5f543f88b741c 08-Jul-2015 Pavlin Radoslavov <pavlin@google.com> Set the Bluetooth state to OFF if there is disable timeout error

Previously, if there was "disable timeout" error during Bluetooth
shutdown, the Bluetooth state was set back to ON. However, the
internal Bluetooth stack runtime state was cleaned-up and
practically unusable.

The solution is not to re-enable Bluetooth if there is a
"disable timeout" error.

Bug: 21873347
Change-Id: I561683fa391f7bacbb1aa8f80d8f6583c7d3099c
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
f19f1ac64a5fefb248ab15b918d009b926c99dde 11-Mar-2015 Nitin Arora <niarora@codeaurora.org> Bluetooth LE background operation mode (1/2)

Changes to BluetoothAdapter state machine for handling new
states BLE_STATE_ON and intermediate states BLE_TURNING_ON
and BLE_TURNING_OFF. Also includes the actions required
while migrating in and out of these states including
start and stop of GATT services and other profiles.

Change-Id: I08d6ff05c2cefe559d5bb5789a1a488afefbe544
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
865b323bb1d0aa9581a9b6a2f5ed96fc0ee70b23 30-May-2013 Matthew Xie <mattx@google.com> Notify adapter state change from off to on when disable fails

So that the settings app would not stuck at turning-off state
User can retry turning off.
bug 9164641

Change-Id: I6ae6d80c97673b4e548b7b5ab47c51f968342060
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
0eea1282dcb425c1ea9dc6aa08d323884a9a1655 22-May-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth Share has stopped / Secondary user setup / NullPointerException

issue 9066070

Change-Id: Ie206eab374c6a8c255f1a6302249f81ac16fc333
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
ad9fff218081d2f49471487d37387c764d69ed29 24-Apr-2013 YK Jeffrey Chao <jechao@broadcom.com> Preload timeout and retry mechanism (2/3)

If the Preload process was stuck due to unknown hardware init failure,
a 8-second ENABLE_TIMEOUT timeout would be eventually expired in Java layer
at AdapterState and attempted to set BT state back to STATE_OFF.
However BluetoothManagerService did not handle this case accordingly and led
to state mis-matching between Java layer and BTIF at the end.

Add the processing logic in AdapterState to handle the case when an explicit
STATE_OFF notification from BTIF was received in the TurningOn Pending state.

bug 7566317

Change-Id: I29c379cd453d05297ed382a5e8f862fa7d0f8881
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
34e323baafb5563c3874f95847ec544faf6923f8 14-Feb-2013 Matthew Xie <mattx@google.com> Turn on some debug message in Adapter service

We had turned off too much debug messages. It is getting hard to
make out useful information from bugreports. Now, selectively turn
on some messages.

Change-Id: Ia62bc9d5967a10690709abaa0e20a15dd01c258d
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
ede67c26e7b2564ea35db6d9b3027a269c150e13 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I338fd87083387706f3b5f410c9592219bb8a1acb
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
fd1da115cbf09b7dd9bca3c7d3a4fb816a835dc5 08-Oct-2012 Matthew Xie <mattx@google.com> Turn off dbg messages, be prepared for production build

bug 7174712

Change-Id: I58747ec6507da8ea8ae27a182b601aaf626ede42
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
6893668d1ccf0cc6361ef31ace52fedc2e37e35a 15-Sep-2012 Wink Saville <wink@google.com> Add StateMachine make methods.

StateMachines must be started before any messages are sent to them
otherwise an exception is thrown.

Bug: 7091976
Change-Id: I05315d45d4d6db42843442b7feb37c665cfabcab
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
73d192095093759688cccc896714f71fcee218d8 08-Aug-2012 Matthew Xie <mattx@google.com> Merge "Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR." into jb-mr1-dev
15d36984a79d6e35c659edb0efdf929f0b526bd5 01-Aug-2012 Fred <fredc@broadcom.com> Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR.

This fix addresses numerous BT on/off issues found from the CTS test.
Fixed fD/pipe leak in various state machine Looper objects by calling quit() function.
Fixed cursor leak in AtPhonebook.
Change Pbap to stop the RFCOMM listener on the STATE_TURNING_OFF instead of STATE_OFF.
Removed several cleanup() methods causing NPE.
Reduced RFCOMM listener timeout from 3 seconds to 300ms between retry.
bug 6834336

Change-Id: I52423343d8f52f65294af0143f373871a9874d77
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
4f5430babbc5a8f870e5a578a4ea3452f41dd97a 01-Aug-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Implement Profile Auto connection logic

Implement Profile Auto connection logic (moved from Settings App )in Bluetooth APK
to avoid Auto connection not happening if the Settings App is not running
As part of this implementation following features are implemented
1. Auto connection initiation during BT on OFF
2. Profile Auto connection priority management
3. Connecting Missing profile logic
4. Initialize Profile Priorities on Bond State Change

Change-Id: I12b7c190e28f043b4b008c9b48ac7e13aaf178e6
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
57a3923845c46742ed4f03d49dbdbb6c774ccf90 12-Jul-2012 Matthew Xie <mattx@google.com> Removed onStartCommand().

BT ON/OFF now done via enable() and disable() binder API call.
Also fixed bug with BT OFF if set scan mode times out

Change-Id: Ib88dfc148bb5a24cda1e84a86f044ae85a5a6514
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
4603dc081506452854023a1c6eacdfca468e0dc4 12-Jun-2012 Matthew Xie <mattx@google.com> comment out state machine quit call

Change-Id: I0d4f72d50cd981a3c334583948dc0563f0662662
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
4852c5686229f1014e9851f4e9a3a19547581b45 10-May-2012 fredc <fredc@broadcom.com> Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService

Change-Id: Ic9911359c1d9e04a5d803807ea7cf4ad39616960
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
74ae04c73312403e89db0f8e9bd9601d403b4783 07-May-2012 fredc <fredc@broadcom.com> Fixed memory leak in Binder objects from repeatedly turning on/off Bluetooth

Change-Id: Ibee5382816d47b1e9b846461942a9daccc4210a7
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
31ba132491053bc86d419a7d51fc04af3299c076 26-Apr-2012 fredc <fredc@broadcom.com> Fixed Bluetooth on/off issues. Removed singleton instances causing issues when services reload. Updated adapter state machine

Change-Id: Ie1ff4284f507c7da102569f3c0acfd55612a5f6b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
b8a77aa1b386baaf6381f7b356b9485673e1f942 20-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> On disable send the disable event to stack right away, as the stack will take care of tearing down the active connections. ALL_DEVICES_DISCONNECTED was not being sent (as no profiles handled it), causing 3 second delay on BT off

Change-Id: I8aa83f3cd2019f521d5522e9455303a413dddcc1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
b5cc776c9353a203cdde97e62b25f05d9633d14c 19-Apr-2012 fredc <fredc@broadcom.com> Fixed BT on/off issue

Change-Id: I47cbac9fc694d5604a664f20170eeed90eeee8e6

Conflicts:

jni/com_android_bluetooth_btservice_AdapterService.cpp
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
3fafe61ef25c1899fdc817c52163aec16c31055c 19-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> Memory profiling changes : Updated the Bluetooth code to handle cleaning up of object references (context, handlers, and collection objects ) during service cleanup.Memory profiling changes : Updated the Bluetooth code to handle cleaning up of object references (context, handlers, and collection objects ) during service cleanup.

Change-Id: I2b0235f71c1feaf32215b2aaf89a2e06d8fa7d73
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
6654f5c903de510a70f9e72cd5ad7837b615d93f 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: I65e1c18e2899cea0a1e5c0102c4d24d39dce0249

Conflicts:

jni/com_android_bluetooth_hdp.cpp
jni/com_android_bluetooth_hid.cpp

Conflicts:

jni/com_android_bluetooth_hid.cpp
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
d570893c5ec3bc9fd1860aa0355c550d3a51f8dd 09-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Improve BT enable/disable stability under stress tests

Change-Id: Ie6323a225b5e1ccd1ad9f65e90b144c93b957a8b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
0708fe3087b690439dd9745b2cf1a96f29f570b0 04-Apr-2012 Syed Ibrahim M <syedibra@broadcom.com> Updated the AdapterState class to handle persisted Bluetooth setting after AIRPLANE MODE OFF event

Change-Id: I5e1ca111b72ff49498e87149c32769997e545c54
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
44abcd2791995793a5de09906b0ce6ed51bb6080 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Set scan mode to be connectable when turning on.

If scan mode is not set, set it to be connectable.

Change-Id: I146505dade5d46aa70068cdaada94c06f30d75de
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
fba70fe2abecf70b9f9f7ee09a21cbfc6cb73998 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Add ability to persist Bluetooth state.

Currently, BT is turned on when the Service is started,
if needed. This needs to be changed when BT is not a persistent
process.

Change-Id: I1c36aa75824622a739241d6d4e9aeacbf46e56af
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
ff68148a7fb74947ea5e7a337161108363cbe9f5 21-Feb-2012 Jaikumar Ganesh <jaikumar@google.com> Fix Bluetooth enable issue.

The stack sends all the property changes,
before sending enable. Hence, we don't need to
wait anymore.

Also fix the return value check for get_property.

Change-Id: Icac32cd74f9028c40ab6b5018b576168c9dac3b9
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java
ff4f17bf64978d0738c66e1b6dd70be8664efc24 20-Dec-2011 Jaikumar Ganesh <jaikumar@google.com> Initial commit for new Bluetooth stack interface.

1. Changes to Android.mk file
2. changes to make the process persistent. This is temporary.
3. Addition of new java and jni classes.

Change-Id: I2453c7a1a475c66bf52f3a84cd8beb12dd37b87a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterState.java