History log of /packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e7de65e09358a285073944499230b755ab29591b 17-May-2017 Ajay Panicker <apanicke@google.com> Remove logspam in service state changes

Bug: 37803501
Test: Code still compiles
Change-Id: I9b2055476f74486a3d57957d2c9e6cf7946a139e
(cherry picked from commit edbf12256878f7d1a01c12f44342ec4ffe3405ba)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
90d55ae85dc19e33fffe1e51787df2b8dd40c230 18-Apr-2017 Ajay Panicker <apanicke@google.com> Limit btsnoop file size (2/9)

Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Idf4dd2ee10d8b8aecf1066115fbb6a53ce8ea04a
Change-Id: Idf4dd2ee10d8b8aecf1066115fbb6a53ce8ea04a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
33e325b5c50001d9eb6c9d53cc0a258aa93c9dd1 22-Mar-2017 Jack He <siyuanh@google.com> Call System.exit(0) in onDestroy

Call System.exit(0) in onDestroy() to make sure state is cleared in
the Bluetooth stack when Bluetooth is disabled

Bug: 27859763
Bug: 36487153
Test: Build, run unit tests, Bluetooth enable/disable
Change-Id: I34917ca3302b01c4da74b969da08860d6fbf8274
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1f205202cbab0dd9edd2654bfbc60edd77b5ab58 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> LE Maximum Advertising Data Length (2/4)

Add ability to check maximum advertising data length.

Bug: 30622771
Test: manual
Change-Id: Ia912f9d738ec8dbf56205a1c22a21f687d9cb6cd
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
e169577e19d174dffe93970e08059aeb1e2ec894 16-Mar-2017 Jack He <siyuanh@google.com> AdapterService: Do not call System.exit() on onUnbind

* Process termination should be handled by the OS
* System.exit() in onUnbind also prevents onDestroy() to be called
* Removed isMock() since its only use case is to check if System.exit()
should be called

Bug: 35366908
Test: make, run java test, turning Bluetooth ON/OFF
Change-Id: Ieba927ce86d5dd27269f10188c74308fa76e66d9
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
551de252cd8661c9f65a16211386e354e3f0d063 10-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 feature check implementation (3/3)

Wire the new feature check API to actual values received from the
controller.

Test: manual
Bug: 30622771
Change-Id: I0812ed3ed8e28b8be34090ffb09c27d7a6405b8b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
412c7264674341300bc1cb2bfbd8bcda92d468ee 08-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 feature check API (2/2)

Bug: 30622771
Test: manual
Change-Id: I90e2efe989745c07c2f2fb8f4ea5bc3b718382f6
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
2aad9ef373bb7c4d0415ba2869a72869d22673f4 24-Jan-2017 Marie Janssen <jamuraa@google.com> AdapterService: track last discovering timestamp

getDiscoveryEndMillis() is an alternative to the DISCOVERY_FINSHED
intent and provides a way to avoid restarting discovery if we've
just been discovering.

Test: compiles and discovery still works
Bug: 34395439
Change-Id: I4334e99ae8665fc0a0d5d11229897505fae8510b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3a6e55686e88d16666e7f253d634531a033b8c61 20-Jan-2017 Sanket Agarwal <sanketa@google.com> Add flag to disable phone policy

After the separation of policy and mechanism this change completes the
loop whereby a non-phone device could simply disable the phone policy
and implement its own version

Test: Check by flashing flag vs no flag for verification
Bug: b/33079907
Change-Id: I9476f0dc16a5257a6fc8c198ff419fbdad3e8795
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
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/AdapterService.java
ff428bdad1e1e1b3e8927c9ba7f783ff8f248c81 03-Jan-2017 Marie Janssen <jamuraa@google.com> Don't print dumpsys info twice in bugreport

Test: run a bugreport, check in "APP SERVICES" section
Bug: 29356402
Change-Id: I51a2ab0ec51d4607d39eaca225584d3d539fbfd6
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
4f768f68b35a237052bbbb8570ff1896828c1e05 28-Dec-2016 Marie Janssen <jamuraa@google.com> Move state dumpsys (to BluetoothManagerService)

BluetoothManagerService will dump basic state about Bluetooth now for
standard dumpsys arguments. Move it from here and track which apps enable /
disable Bluetooth.

Test: enable/disable a few times, check that apps are recorded correctly
Bug: 33692282
Change-Id: I7505ba25a5cafda061fa23774cc31a6b83909d34
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7eeb95b6f29a6f55e117e329468168d4bcbec0c8 07-Dec-2016 Jack He <siyuanh@google.com> Remove disk IO read/write blocks in AdapterService for main thread

* Call getSharedPreferences() asynchronously during onCreate() to cache
preferences in memory as early as possible to prevent ANR
* Change editor.commit() to editor.apply() in AdapterService for:
setPhonebookAccessPermission
setMessageAccessPermission
setSimAccessPermission
so that these methods will return true when editor.apply() is called.
After that call, the preference will be updated in memory so that
following calls that use such preferences will see the change.
However, there is a possibility that write to persistent storage will
fail in the background which reset the preference after reboot or service
restart. In this case, we need to call these method again.
* Same changes in Avrcp for:
blackListCurrentDevice
resetBlackList
In these methods, the return values for editor.commit() are already
ignored and therefore no user-visible effect.

Bug: 33382877
Test: mannual test, connect to carkit and browse phone book
Change-Id: I605dc00db4647f06c9fa797f272188a44f0e5724
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f87e5650c9e9b5b02ae4f345bae0d37cc201541e 06-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "AdapterService: enforce new user restriction for disallowing Bluetooth."
am: 80343eba78

Change-Id: I26a9af5750833ba8d9202c3b9159ad9ffa060bc2
183084b53e0bae164497667117ca6cd8e334eddc 02-Dec-2016 Lenka Trochtova <ltrochtova@google.com> AdapterService: enforce new user restriction for disallowing Bluetooth.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Change-Id: I832b9c7d6427dfd977a6f0ee73c860234c1e2347
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a7da3b78f135e774feb542d6e67442e45fea809d 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "Revert "AdapterService: enforce new user restriction for disallowing Bluetooth.""
am: 490b7a3bbe

Change-Id: I8cb18c89f011e1117876ef4d044ad30e744e2f57
aca88a2c5d57c3a1e85e2764e09d5932da703619 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "AdapterService: enforce new user restriction for disallowing Bluetooth."
am: 6add0e7b31

Change-Id: I2651d74350dea46faed29a82847634b035e9a15a
7fb204fb20d80b78013fbb1826c80fa3f4c33527 01-Dec-2016 ltrochtova <ltrochtova@google.com> Revert "AdapterService: enforce new user restriction for disallowing Bluetooth."

This reverts commit 1f802f2473b5f8b8a401bcd9c7273d21b27d4bc2.

Change-Id: Ic5ffcf4e1ad9d024646363fa83094997058dd05b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1f802f2473b5f8b8a401bcd9c7273d21b27d4bc2 24-Nov-2016 Lenka Trochtova <ltrochtova@google.com> AdapterService: enforce new user restriction for disallowing Bluetooth.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Change-Id: I9bc69b4f4886e9d61574ed1a717371d035eb9776
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f17f8cf7392727c18ee1b2c5ac75699d926ba05c 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond"
am: 2beef8d589

Change-Id: I97256a6d98bfcd694e2abd55e8892228615c09e8
7d2fcd0564e9f9037879c31e149011aa1280bc59 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Fix NPE in createBond

Bug: 32925925
Test: initiate bonding locally using NFC OOB
Change-Id: I9aadea84e9e2e57cf75c02affa618eb37a33a767
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
728915cdfd2dd01edd9f44be53ce815a31c0da9e 12-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Unify advertising API (3/3)"
am: e19d38fd41

Change-Id: I9770b855ffa0f9cab36c06f499ec60a51bd54a63
6d5a03f00fc00a4fe9d9e2bd1e6a2abc8ffc5284 04-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Unify advertising API (3/3)

This patch unifies advertising API. On startup, if VSC multi advertising
is avaliable, it will be used, otherwise
BleAdvertiserLegacyHciInterfaceImpl will be used, which provides one
advertising instance.

Test: sl4a tests are passing, all proper tests updated accordingly
Change-Id: I899ed51bf4e747e1e3ff1a472a55f060249cbb75
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
fb4eaf84e9435cb77b9b579a1eee7de169038226 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client
am: 2ad555291d

Change-Id: I1d54810f796fbad50b95a5f3552001826cd5d9c8
2ad555291d7cd3b670ed7673bbaabdc898f3c172 13-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client

Add code to automatically attempt to connect MAP Client (if enabled)
after PBAP Client connects. This will typically be invoked at system or
adapter reset, but could as well happen if MAP Client isn't connected
and a new PBAP connection is established.

Bug: 32153228
Change-Id: I9ac5121ccf0d7ef3e5847df32034094e085aa434
(cherry picked from commit 46873217f3ddb8b848ce0b8fdf4a0531dfb04224)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
577700754e7bda8dda5bc15c56df395f1f882d8a 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "MAP MCE"
am: db95af257e

Change-Id: Ib8635558016c225d8b00b6ed83464d01ba839cf8
b68b83c0463161ce65922ec606f12244446efab1 19-Aug-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE

Message Access Profile Client code. Supports Message Notification
Service server and Message Access Service Client for sending messages
and receiving new messages and retrieving unread messages.

Bug: 30467210
Change-Id: Ia4f27f11acbbcb5975d85344f0c19be3d1975b66
(cherry picked from commit 7765761c05e1cb2231198e7b9dccba5254c0cf75)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
094664ac823f9e00ae0ad7d0d1bf24fce25ff4bb 02-Nov-2016 Bryce Lee <brycelee@google.com> Merge "Implement new API for retrieving supported Bluetooth profiles."
am: fe33cb11e0

Change-Id: I2e50ad4fb53ac80e49e4ee72197beea3251e2216
013408c9c16e4c1b5b7f285d68bb2f36bca4f654 09-Oct-2016 Bryce Lee <brycelee@google.com> Implement new API for retrieving supported Bluetooth profiles.

Bug: 26451648
Change-Id: I552882034e0289b643377d14bac4fb01c9018046
(cherry picked from commit b7e2f972a0633b4d8c8843d025819d61e71053e7)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
d66ddc133abb68e91e4b7b1e62e53ec5ca0a57ca 31-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement autoconnect for PAN."
am: 63552e3412

Change-Id: I3c324a21a5d4f4f173084825d0e58a5da046195e
41922a948e47d8f7752211e8ded6dcd0280f23f3 05-Aug-2016 Sanket Agarwal <sanketa@google.com> Implement autoconnect for PAN.

Bug: b/30679978
Change-Id: I52c9ac49ec72a419e5f02c656abc46f2c7e4c7cc
(cherry picked from commit 599c56d2b8f09ee126b734b9c62727d255f3e8b3)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
0b1142f8e6187a88e41c5ab465ce13ecded2c468 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Bluetooth Connect Other Profiles"
am: f6d6a68b55

Change-Id: I9fc12f90bb9f7bef1b4d616647060d49a1d8206b
d4ec0c2295e114c385f7d8ac6253fef0e42ae37d 29-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Bluetooth Connect Other Profiles

Rework the logic in connectOtherProfiles to support both client and
server based profiles. This logic is invoked 6 seconds after a
successful bluetooth connection is established to attempt to connect any
other valid profiles.

bug: 28249138
Change-Id: I6cc77f47a522da134af3122c07095e1a4f583f32
(cherry picked from commit 71669e2bfde4f3c76f3f93d9e118793b4eb79dfa)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
dfbb839c60a56f7dcc6e2095e1a7830fd4a7b7ab 26-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Change how Advertise Data is passed to BTIF (3/3)"
am: fd121217a4

Change-Id: I427d27acf325b4319bd10e0942a3233440b5c0eb
5335419d1b6f366c284037ca38524141f0e80d74 19-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Change how Advertise Data is passed to BTIF (3/3)

The way that AD data is passed right now put some additional
limitations, i.e. only one manufacturer specific data can be set, or
only one service UUID. By moving AD generation to upper layers, aother
set of limitations is removed.

Test: Covered by BleAdvertiseApiTest sl4a test
Bug: 30622771
Change-Id: I5444455a89ee085dcccfdc98846955374d58c374
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
955a9d0e62242c2fc9d8cc01b0615d05587b4a72 06-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix connecting to profiles when bonding from local device (2/3)" am: d3b54eaed4 am: bea791fa16
am: 202f0d90fa

Change-Id: I9d3b2bffc87d48a67f893bf622b6a9098fce97d1
202f0d90fa4e23c06d8757da31cf3d77d32e6b2c 06-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix connecting to profiles when bonding from local device (2/3)" am: d3b54eaed4
am: bea791fa16

Change-Id: I35ac9f4aa8f4f7d12153f43f946a5f029ca3ca12
66734225c1baa37ef03005ac77780453246f58d8 20-Jul-2016 Jakub Pawlowski <jpawlowski@google.com> Fix connecting to profiles when bonding from local device (2/3)

When bond is created from Bluetooth Settings, profiles gets properly
auto connected when services are discovered. If pairing is done from any
other app, i.e. NFC app, the bond is not being recognized as initiated
from local device, and profiles are not connected.

This patch makes sure that if bonding is initiated, no matter from which
app, it will cause proper profiles to connect.

Bug: 30211618
Change-Id: Icda038447554f429b9cbfc74d68c679e63572bdb
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
49c9cba1599dd5809a18fd97822ccdb3ed41624e 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs for Bluetooth AdapterService" am: c364eb3eb3 am: f2287d1e54
am: a73e67014b

Change-Id: I4b5d5dbfa3096b439bea38e2568fffc01d2e7bf1
a73e67014b6c0e6277e5de0703793dd8fddc3ac4 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs for Bluetooth AdapterService" am: c364eb3eb3
am: f2287d1e54

Change-Id: I7c32bd076d565d83a7aa1a3dcba386c764c5e9b6
397dcaa3b3ba6b3c9a7fb8a3d4637daa9480da71 22-Sep-2016 pkanwar <pkanwar@google.com> Collect number of paired BT devices. am: f4386904eb
am: 4045be13b1

Change-Id: I523f32b79789cbb13d00be9e7f6d79c0040b01a1
4045be13b11e2f03fa8071727f5327eb796203c1 22-Sep-2016 pkanwar <pkanwar@google.com> Collect number of paired BT devices.
am: f4386904eb

Change-Id: I57553542fa8201d1353adee0a02947f01e088b89
32a92489e9779d10c613a57d86135a7de6d3d7c4 22-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Enable debug logs for Bluetooth AdapterService

Enabled log messages that are useful to debug the AdapterService state.
Remaining log messages are controlled by AdapterService.VERBOSE flag
and are disabled by default.

Bug: 31442739
Test: manual, and "frameworks/base/core/tests/bluetoothtests" unit tests
Change-Id: I7d81fd605f64e64f29aee37314821384234b286d
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f4386904ebbcb1af27828617ba287c512b7223ec 20-Sep-2016 pkanwar <pkanwar@google.com> Collect number of paired BT devices.

Bug: 31602591
Change-Id: I61adee8b20d57e2a1e284ed21a46d1766f059d4a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
827bfd6b25f714053b2e0c15075e21485c81330d 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333 am: f8a47ce8ee am: 3ea7d86110 am: ccca20484c
am: 4a20ca7bae

Change-Id: I4172756c290efa2ba66da96f109d3fb058be790d
8e9f9f4bd81466c3a9b7274177f9ec0287dfec22 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333 am: f8a47ce8ee am: 3ea7d86110 am: ccca20484c
am: 4a20ca7bae

Change-Id: I4a9f4408bf601c7e06290210e8e199969af64420
4a20ca7bae7517776da9cc7099040e19bd01f5bc 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333 am: f8a47ce8ee am: 3ea7d86110
am: ccca20484c

Change-Id: I549bf83ae4a98257a45c0fee77257cebdbe67b4f
ccca20484c180f09d21a998b48d3a70bae24e733 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333 am: f8a47ce8ee
am: 3ea7d86110

Change-Id: Iba991daf03a221a4fff7a575dcdffd7181a70861
3ea7d8611043a48942ca3e14cf67198636b89098 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333
am: f8a47ce8ee

Change-Id: Ia73de9a88d22342fe27f5f1e965cc76b088a7a0d
f8a47ce8ee4fa8d6280e7e8f97891f474e965c81 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2)
am: df3304a333

Change-Id: Idc90fd17ec010ba786412d76496cd6f89df139b5
df3304a333d8c385f9d5cb0e691fb72d940ec273 08-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2)

setPairingConfirmation was set to only require BLUETOOTH_ADMIN
permission which shouldn't be able to set the confirmation itself.

This is restricted to BLUETOOTH_PRIVILEGED permission.

Bug: 29043989
Change-Id: Iae8e31b25795989446265fdcc5eb27e6ffaf29aa
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
eb00f18ad00b09e3be2a80c01791fe65a69c488f 25-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Set the Adapter Service onCreate()

We should call setAdapterService(this) inside onCreate() instead of
inside BleOnProcessStart(). The former is more robust.

Change-Id: Ide1d98dfdde148645f3efe246e6fbf95659195a7
(cherry picked from commit 39d7556b76036e02b87a6c4288a9a090e2bd6686)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
39d7556b76036e02b87a6c4288a9a090e2bd6686 25-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Set the Adapter Service onCreate()

We should call setAdapterService(this) inside onCreate() instead of
inside BleOnProcessStart(). The former is more robust.

Change-Id: Ide1d98dfdde148645f3efe246e6fbf95659195a7
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
34fc6e6f09098ed3d15713999a1dc86b971f4f81 24-Jun-2016 Calvin On <con@google.com> Use the live AdapterService in ProfileService.
am: d4152d61ac

Change-Id: I4755e0a99783caf68b4c6a84f9507d6764a87b87
d4152d61ac6e9ec32c63c628d40ba2bf14b9a970 22-Jun-2016 Calvin On <con@google.com> Use the live AdapterService in ProfileService.

Previously, if AdapterService was null while ProfileService is
created, the ProfileService would never work because it would
store a stale reference to the AdapterService.

This change ensures that ProfileService accesses the current
AdapterService at any given time.

Bug: 29519304
Bug: 29610505

Change-Id: I25efbf4a58932f519ac9f0b89c4112a442c994eb
(cherry picked from commit b55c6a1f4ce60ad552e9c9a6d06fab6781a4dadb)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
b55c6a1f4ce60ad552e9c9a6d06fab6781a4dadb 22-Jun-2016 Calvin On <con@google.com> Use the live AdapterService in ProfileService.

Previously, if AdapterService was null while ProfileService is
created, the ProfileService would never work because it would
store a stale reference to the AdapterService.

This change ensures that ProfileService accesses the current
AdapterService at any given time.

Bug: 29519304

Change-Id: I25efbf4a58932f519ac9f0b89c4112a442c994eb
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
d2d127b95044331cfd073afbe5ef177c807c0c0d 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge commit '303ef0bd1343806adba9b00e39ca05b7c9e50a4f' into manual_merge_303ef0b

Change-Id: I9cfbac32c1a9758860e856bd0cbfa4f9985d6690
cca335e2cb94b74d1955f65ca76e80411618f0dc 21-Jun-2016 Adam Lesinski <adamlesinski@google.com> Prevent energy data overflow

- Stores energy data as longs
- Monitors for overflow and logs + discards sample

Bug:27598905
Change-Id: I442c0f63adb5197a45e7982e68f1260c856ed351
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
4a7ba7568de2b00b8d9cdb92137604643fe5d34d 08-Jun-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of 39957c0 to nyc-dev-plus-aosp

Change-Id: Ifa06a51ac390cc2b2f7401b65fb6428313a1f6fd
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/AdapterService.java
69689c0098a7582f8bba393f72b2575ed5508e71 25-May-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (3/3)
am: af5b1764da

* commit 'af5b1764daa3b212d471f000d7091ac07c040453':
Add guest mode functionality (3/3)

Change-Id: I2591d37bb52e2bda796200100f7f21bf00f55d7a
6fb4b2407f2ae6d87b1f026870f66d717a915973 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.

Bug: 27665220
Change-Id: Ibdbaecd60cf36c599700b1ca353481b8149efa90
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
cead922da6e8470e9fe7627e2e03b357acd2a6ba 17-May-2016 venkata Jagadeesh <vjagad@codeaurora.org> Merge "Broadcast UUIDS on BT state transition to ON" am: 8980266333
am: 30cc572e2b

* commit '30cc572e2b84520bbba1626217ea244db2d81bef':
Broadcast UUIDS on BT state transition to ON

Change-Id: I90244d201d8c36ea56a171804e2048dabf43a4e5
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/AdapterService.java
fc57cab5ba191752d0091c808f940fb677bac0ab 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev
f1e73ef7c7ccbcdd9a47bf88313612a71f088372 10-May-2016 Adam Lesinski <adamlesinski@google.com> BluetoothManager: Make requestControllerActivityInfo one call

Instead of making multiple calls into the Bluetooth service,
make one call that can timeout. This helps prevent cases
when the Bluetooth process hangs and the system_server is calling into
it and causes a WATCHDOG restart.

Bug:28658141

Change-Id: I84d2c025f4ffb452975444e794a64c82569deb0a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
11976279d5403fb65d9f0ea72b0e450dfd841958 15-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond

Bug: 28153078
Change-Id: I49c020d7d016c667a6cb3366ef862a1eb9dfb4d5
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
af5b1764daa3b212d471f000d7091ac07c040453 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (3/3)

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: If4a8855faf362d7f6de509d7ddc7197d1ac75cee
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3558402aae35c6b01c505be012d6736b0c758802 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/5)

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: If4a8855faf362d7f6de509d7ddc7197d1ac75cee
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java
aa218437c511755ac69f37e93753fcf289984f70 11-Apr-2016 Adam Lesinski <adamlesinski@google.com> Implement new async response method for controller activity info

Bug:26842468
Change-Id: I35e6bd6996d408aa2c8ccda754d5b2f05bcb8056
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3c75851b93fe42d7d4650adc6a5d680c6f43eb42 05-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Make PBAP PCE (Client) role auto-connectable.

Set the default flag to enable contact sharing from Car Kit by default
like the other autoconnect profiles.

Bug: 27977457
Change-Id: Ibbd09ea93ff402193e8a03ba77148dea9417a488
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
92870384369a8a5345bfe868b97d2d384f433103 31-Mar-2016 Sanket Agarwal <sanketa@google.com> Move MediaBrowserService to Bluetooth Process

MediaBrowserService exports A2DP streaming features to the rest of stack
using the MediaBrowser API. Currently it was being stareted by
BOOT_COMPLETE which made it start very late. Also that meant that some
of the broadcasts for the connection events is lost. Now it is started
by the A2DP state machine so that we do not miss any state changes.

Bug: 27744764
Change-Id: I193b4adfea09cbd90e41f1a217383b6aa234ef2b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
79b693f44a0508d2a794635f0ec3bd84f8f5ede0 02-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Autoconnect Car Profiles

Update profiles used in Car to enable and require PRIORITY_AUTO_CONNECT
to automatically connect when Adapter turns on.

Bug: 27899874
Change-Id: I33bf7cabe959b47954e3aced2af8a5ce8444b9ad
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
af98f39707768b300b29f552e29ec644e8f75dcd 30-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP client priority settings." into nyc-dev
403fca1b0ccbdbbbe2ef7ee2ed2d8496a0ec2306 26-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP client priority settings.

Implement get/setPriority for PbapClient such that the settings dialog
and connect at startup work appropriately.

Bug: 27642222
Change-Id: I9c02d4d08809c6cc4230c71031d880b3d09f0cc4
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
fa0882174bb9479e307b6faea1d1c0f174d38f43 28-Mar-2016 Ajay Panicker <apanicke@google.com> Revert "Add guest mode functionality (1/5)"

This reverts commit 6e2c4a130d93e448decc67991690fd8d1f83a343.

Change-Id: Iae9ecfc53a4e405bc04d21822a79112f7dc63247
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
6e2c4a130d93e448decc67991690fd8d1f83a343 18-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/5)

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/AdapterService.java
fae6b54e8d3edf8c890ca3be212b27d591acad03 21-Mar-2016 Andre Eisenbach <eisenbach@google.com> Make sure wakelock is held before releaseing it

Bug: 27748109
Change-Id: I38c8ec640f5def7c53348d2dd96a0a2492ff00cc
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a9d5a686f820aedb30b21145bca23fbbcacc3682 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not delete/re-create wakelock on acquisition/release

Also provide additional status for wakelock acquisition/release errors.

Bug: 27721443
Change-Id: Iac544226fed4a73a50bd954e74d96edd4bed93d2
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
e94f8eb85b68b351319499337af937835730b508 21-Mar-2016 Andre Eisenbach <eisenbach@google.com> Make sure wakelock is held before releaseing it

Bug: 27748109
Change-Id: I38c8ec640f5def7c53348d2dd96a0a2492ff00cc
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
00a465ed6160246b369629b6777836a4d1b11834 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not delete/re-create wakelock on acquisition/release

Also provide additional status for wakelock acquisition/release errors.

Bug: 27721443
Change-Id: Iac544226fed4a73a50bd954e74d96edd4bed93d2
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
b874a1d1cf25f90947ba87f791d42a404cad7d85 10-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Implement PBAP PCE client role service.

Migrate code from frameworks/opt/bluetooth for pbap client to support
pbap as a bluetooth profile.

Bug: 27490041
Change-Id: I7a486af1c58d17ee10348aae044786df670a781e
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
41093afc1f5a9109f414e942985f25e74758e8c6 14-Mar-2016 Ajay Panicker <apanicke@google.com> Print bluetooth state as a string

Bug: 27294154
Change-Id: I992f720d94be1f0762424ebad36ec1b6af58600b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f7f1a09d1345bef9cf2ebc34af35336b7fd0007f 14-Mar-2016 Ajay Panicker <apanicke@google.com> Print bluetooth state as a string

Bug: 27294154
Change-Id: I992f720d94be1f0762424ebad36ec1b6af58600b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
b03b1ce32fe4f39139d9f62b002cf329a0cd72aa 09-Mar-2016 Ajay Panicker <apanicke@google.com> Add enabled time to dump output

Ex:
Bluetooth Status
enabled: true
state: 12
address: F8:CF:C5:CE:F5:69
name: AOSP on Shamu
time since enabled: 00:00:32.999

Bug: 27294154
Change-Id: Ie65964411e2095434a082f3d988133190c1f2f59
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
14bc7705930e23eba5cc70f840796df7e4c99709 09-Mar-2016 Ajay Panicker <apanicke@google.com> Add enabled time to dump output

Ex:
Bluetooth Status
enabled: true
state: 12
address: F8:CF:C5:CE:F5:69
name: AOSP on Shamu
time since enabled: 00:00:32.999

Bug: 27294154
Change-Id: Ie65964411e2095434a082f3d988133190c1f2f59
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f848f42a0ec33519a8143f01a1acfe835e2cd1bc 09-Mar-2016 Sanket Agarwal <sanketa@google.com> AutoConnect A2DP and HFP for Car Kitt roles.

1. Current auto connect sequence is not enabled for HeadsetClient.
2. On profile init consider A2DP and HFP in Car Kitt roles as
privellaged profiles.

Bug: b/27551485

Change-Id: I477b34ad1598d0a3ab9563ccd5b3770a4a1e2a57
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7bf0b76ff1024d8eb3cd37eb238ce2946440aa12 01-Mar-2016 Adam Lesinski <adamlesinski@google.com> Fix race in reportActivityInfo causing NPE

Bug:27162966
Change-Id: Id43898440824c1bbb24cef5a23a3f2a4fcde0534
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
90b78410c20e3232954891d66bed3352fc5c97e7 29-Feb-2016 Bryce Lee <brycelee@google.com> DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.

Bug: 26451648
Change-Id: Ice55556d64208656824d5a6f9b90230d17f0c3bc
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
92a815aaf0faf68a4c43d5640caa447021ff7e12 26-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Fix the argument processing when dumping Bluetooth state

Apparently, when dump() is invoked via bugreport for
Bluetooth's AdapterServe, the optional arguments contain "-a".
The existing logic for checking the arguments for "--proto"
and return the result in Protobuf format failed to detect that,
and suppressed any output.

Now any unrecognized options are ignored, and the default
(text) output is returned.

[Cherry-pick from AOSP]

Bug: 27293885
Change-Id: I0f0d94507ebf6fed7628d49cd1de2a1b2801e6ad
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
8b7ff28178b7e853127192688eef7d1f18c86f81 26-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Fix the argument processing when dumping Bluetooth state"
am: ac9407b0c3

* commit 'ac9407b0c3657b945d4371bc1e827a8dd5958720':
Fix the argument processing when dumping Bluetooth state
b050c497e553ca0be0913d906ef705f9f712bbe6 26-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Fix the argument processing when dumping Bluetooth state

Apparently, when dump() is invoked via bugreport for
Bluetooth's AdapterServe, the optional arguments contain "-a".
The existing logic for checking the arguments for "--proto"
and return the result in Protobuf format failed to detect that,
and suppressed any output.

Now any unrecognized options are ignored, and the default
(text) output is returned.

Bug: 27293885
Change-Id: I0f0d94507ebf6fed7628d49cd1de2a1b2801e6ad
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
408bcf3b6436d28057bdc4551039f9d11c48f98d 25-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a missing null pointer check for AdapterService"
am: 2871b49c82

* commit '2871b49c827a9cb994e4ba82af5a20a026cf8f71':
Add a missing null pointer check for AdapterService
52a0ff2d6eb7c57228bbe5ea821bd87eaa5493fe 24-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null pointer check for AdapterService

Add a missing null pointer check for AdapterService
inside class AdapterServiceBinder when receiving
a Binder request to dump Bluetooth state.

[Cherry-picked from AOSP]

Bug: 27343461
Change-Id: I62e67120f6eb6edb5a93b19a9cca5c09862d6506
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7f4f9303f6ad367e29ac60f195b23c69e748c338 24-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null pointer check for AdapterService

Add a missing null pointer check for AdapterService
inside class AdapterServiceBinder when receiving
a Binder request to dump Bluetooth state.

Bug: 27343461
Change-Id: I62e67120f6eb6edb5a93b19a9cca5c09862d6506
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
9e6146ee2f94c0301d8cc19ca4655e197528829c 24-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)" into mnc-dr-dev
am: e836319052

* commit 'e8363190528d0d95a35ab265ab91c591eb17a7c3':
DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)
1434997b9c404f44a3d9e5f2e0aeb0fb0df4d168 14-Jan-2016 Andre Eisenbach <eisenbach@google.com> DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)

Interop database entries are stored in the system settings entry
"BluetoothInteropDatabase". The format is a list of entries separated by
";". An entry consists of a BDA fragment, followed by a comma and an
integer representing a feature from interop.h.

Example:
To disable LE secure connections for devices starting with BDA 11:22:33,
use "11:22:33,0".

Bug: 26548845
Change-Id: I5903930178b70d1eb52d64b1c6051ce8ee346da4
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
db32e0ef467d70961b28913fc86c38cd68f8701e 14-Jan-2016 Andre Eisenbach <eisenbach@google.com> Read Bluetooth interop database entries from settings (2/2)

Interop database entries are stored in the system settings entry
"BluetoothInteropDatabase". The format is a list of entries separated by
";". An entry consists of a BDA fragment, followed by a comma and an
integer representing a feature from interop.h.

Example:
To disable LE secure connections for devices starting with BDA 11:22:33,
use "11:22:33,0".

Bug: 26548845
Change-Id: I5903930178b70d1eb52d64b1c6051ce8ee346da4
(cherry picked from commit 8ecd371d3b90878c211785bae4612d24e06abfca)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
e3d0e6f817346cca57ce6230bd98180b425a0a64 18-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Output the Protobuf result in Base64 string

Outputing in binary format does not work, because
the reader assumes the output is a string.

Change-Id: If24797264e82c649c21f9b984f04ec70adbcec94
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3122e5171ef26ff487f10826786606df848ca25e 16-Feb-2016 Ajay Panicker <apanicke@google.com> Add Java Protobuf dump and ScanEvent Protobuf

Add Protobuf dumping for the Java layer. Also add ScanEvent Protobuf
to already existing scan event logging.

Change-Id: Ib05973c8d98df3bead84b22b3773c42effb25c87
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
c9ba9199e0812b3921799b6190bb6a7305caf029 18-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "Output the Protobuf result in Base64 string"
am: f481ad9463

* commit 'f481ad94638e3db693a6ada090afec659cd2ec7c':
Output the Protobuf result in Base64 string
13e969ef645add2ca8c5e44cce915c2aa588c52c 18-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Output the Protobuf result in Base64 string

Outputing in binary format does not work, because
the reader assumes the output is a string.

Change-Id: If24797264e82c649c21f9b984f04ec70adbcec94
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
5c27af0aad853f51263ecfa38de643554223ac06 18-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add Java Protobuf dump and ScanEvent Protobuf"
am: 03a1b4fc09

* commit '03a1b4fc094ab32ccf0c48d299c3cee1348bab3f':
Add Java Protobuf dump and ScanEvent Protobuf
f7435f2f832ab1faa9ca254143796e9516905c63 16-Feb-2016 Ajay Panicker <apanicke@google.com> Add Java Protobuf dump and ScanEvent Protobuf

Add Protobuf dumping for the Java layer. Also add ScanEvent Protobuf
to already existing scan event logging.

Change-Id: Ib05973c8d98df3bead84b22b3773c42effb25c87
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1af8d21d56d7d00f644514db067a3c63fc7d640a 17-Feb-2016 Bill Yi <byi@google.com> Merge commit 'f54b7cfd127ce744d1957947a631a92a242748f8' into HEAD
fa0cc588384967de363ab08d3ed10d8350a2a70d 01-Feb-2016 Marie Janssen <jamuraa@google.com> Alternate dumpsys output for arguments

The metrics collection uses the dumpsys function with extra arguments to
provide different formatted output.

When arguments are provided, skip the normal output and use
alternatives.

Change-Id: Ie43b9134c4b21bb2761228934b954e68f2360c2f
(cherry picked from commit c0f578772f03361c48a8aba034e8812e2315c8ee)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
4a63ad1df0fb61e74cdbaccdd280c0bf95a3112f 01-Feb-2016 Marie Janssen <jamuraa@google.com> Alternate dumpsys output for arguments

The metrics collection uses the dumpsys function with extra arguments to
provide different formatted output.

When arguments are provided, skip the normal output and use
alternatives.

Change-Id: Ie43b9134c4b21bb2761228934b954e68f2360c2f
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7ecde7c02c3f803cd182fe5c7bef8a410449b50e 29-Dec-2015 Jakub Pawlowski <jpawlowski@google.com> Implement createBondOutOfBand

This patch implements out of band pairing that uses optional data.
Currently it works only for LE transport, using Temporary Key value.
In future fields might be added to OOBData to support other options for
optional data.

Change-Id: I1b4942e656be7b5d1ae5a4bf9d867ffd74753798
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
214b72b021e94649f5015ab3e5ae64a4e2012c1b 28-Jan-2016 Adam Lesinski <adamlesinski@google.com> Reset ble scans in BatteryStats on start up

Bug:22718669
Change-Id: I89b0106776aadfd383a11c509f6eba660461bd31
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
51e9ef3ca2d4cd93adf79fb98ab829163b286472 12-Jan-2016 Marie Janssen <jamuraa@google.com> Remove IBluetooth.dump(), dumpsys arguments

Move the majority of dumpsys into the AdapterService so we don't need
IBluetooth.dump(), and update the JNI interface for dumpsys arguments.

Change-Id: I481f147d913e0f4e1b85b8e4b027dbc349372ce5
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
407f11ca439f338f84b51e15830446ecd3ae488f 12-Jan-2016 Marie Janssen <jamuraa@google.com> Remove IBluetooth.dump(), dumpsys arguments

Move the majority of dumpsys into the AdapterService so we don't need
IBluetooth.dump(), and update the JNI interface for dumpsys arguments.

Change-Id: I481f147d913e0f4e1b85b8e4b027dbc349372ce5
(cherry picked from commit 48131cd77d2a1fd7d6112eee388a90a1fdbe0c6c)
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
cbe581021ff654f7450d1403d8896f5d1203c8b6 04-Dec-2015 Adam Lesinski <adamlesinski@google.com> Add traffic accounting to Bluetooth App.

Update the Bluetooth app to build against the new Bluetooth HAL,
which expects to be given a calling UID when opening sockets and
expects a callback for energy info that accepts uid_traffic_t data.

Bug:26039657
Change-Id: I23ffbe39041f11706376acfc6aba33ba661a6ef1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
b488ef885e5690c3f6085ccf35e213e0f7eb7597 04-Dec-2015 Adam Lesinski <adamlesinski@google.com> Add traffic accounting to Bluetooth App.

Update the Bluetooth app to build against the new Bluetooth HAL,
which expects to be given a calling UID when opening sockets and
expects a callback for energy info that accepts uid_traffic_t data.

Bug:26039657
Change-Id: I23ffbe39041f11706376acfc6aba33ba661a6ef1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
09e4252d1ba0a186808787be9a08de346ed70a25 22-Dec-2015 Sanket Agarwal <sanketa@google.com> A2DP Sink:Audio Rendering patch and AutoConnect Functionality

- Add autoconnect functionality for A2DP Sink
- Use AudioPatch mechanism for sink playback
- AudioFocus approach to manage concurrencies

A2DP Sink: Support for AudioTrack

- add support for audiotrack to render audio data
- add support for AVRCP State to trigger audio
rendering

AVRCP_CTRL: add support for AVRCP 1.3 Controller

- fill placeholder function for AVRCP 1.3
- add supporting classes to handle AVRCP Commands

AVRCP Controller: Support for retaining volume level and blocking streaming from remote.

- retain volume level on new connection request
- block streaming from remote.

Change-Id: I8c31fd1779b196ced0fb0870855b93263ea331ec
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
914484bd8562ae75b062a669c89020773c8529b5 29-Dec-2015 Jakub Pawlowski <jpawlowski@google.com> Implement createBondOutOfBand

This patch implements out of band pairing that uses optional data.
Currently it works only for LE transport, using Temporary Key value.
In future fields might be added to OOBData to support other options for
optional data.

Change-Id: I1b4942e656be7b5d1ae5a4bf9d867ffd74753798
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
de00ed882cf20e5c136e349ae5e40ad35c5a74ee 22-Dec-2015 Sanket Agarwal <sanketa@google.com> A2DP Sink:Audio Rendering patch and AutoConnect Functionality

- Add autoconnect functionality for A2DP Sink
- Use AudioPatch mechanism for sink playback
- AudioFocus approach to manage concurrencies

A2DP Sink: Support for AudioTrack

- add support for audiotrack to render audio data
- add support for AVRCP State to trigger audio
rendering

AVRCP_CTRL: add support for AVRCP 1.3 Controller

- fill placeholder function for AVRCP 1.3
- add supporting classes to handle AVRCP Commands

AVRCP Controller: Support for retaining volume level and blocking streaming from remote.

- retain volume level on new connection request
- block streaming from remote.

Change-Id: I8c31fd1779b196ced0fb0870855b93263ea331ec
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
84b5aa423870a750872d999663df543a52b568f6 18-Dec-2015 Bryce Lee <brycelee@google.com> Monitor disabled profile setting and enable/disable profiles on change. am: 3602a64c6b am: 14675b24f4
am: 7504ddeec9

* commit '7504ddeec934d6107b251fb45fefcddb8259e0ae':
Monitor disabled profile setting and enable/disable profiles on change.
3602a64c6bbe46775cba67f064af39c89d888c5c 17-Dec-2015 Bryce Lee <brycelee@google.com> Monitor disabled profile setting and enable/disable profiles on change.

Bug: 25900899
Change-Id: Id98ae58ada8eecd33a2c86970d9d20ae061680be
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
194d11cd56eeacfb4507d25825a244ebc6cb004a 23-Oct-2015 Bryce Lee <brycelee@google.com> Allow for supported profiles to be reloaded on enable. am: 371e2047c4 am: ec7a8e9141
am: 51c261d7ba

* commit '51c261d7ba934072bd05acca51439c03af644b17':
Allow for supported profiles to be reloaded on enable.
371e2047c485f8f75c2b63a38b36a65b72c2fa42 23-Oct-2015 Bryce Lee <brycelee@google.com> Allow for supported profiles to be reloaded on enable.

Bug: 24977590
Change-Id: I2e5371d3333482cdd1cf18d48fe3c2e0f2229e42
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
5b6d0339a47a730580efa6c4236eef365dbb5343 03-Sep-2015 Ajay Panicker <apanicke@google.com> Prevent NullPointerException on AdapterService.mRemoteDevices

Makes sure that mRemoteDevices is always initialized and not null
even if AdapterService functions are called while Ble is turned
off. Before this if some AdapterService functions were ever used
before Ble was turned on, mRemoteDevices wouldn't have been
initialized and a NPE would occur.

Bug: 21893759
Change-Id: Ia0f41c3d4fbfc6322d49431d1f5021857f018ff0
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
db0ae0560dbbfdfc6ffd1d62ab3008b30bed10f3 31-Aug-2015 Ajay Panicker <apanicke@google.com> NPE protect AdapterService.getRemoteName()

Added an if statement to protect against null pointer exceptions
that could occur if mRemoteDevices is null. This is a bandaid
fix as the reason that this is happening is because
BleOnProcessStart() has yet to be called and this can cause
problems in the future.

Bug: 21893759
Change-Id: I20bc25cd7f1e48931b51c0ed9fa1120401f04784
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
6eb32d5f7c30f04da45c3da0974bbb63725a0978 29-Jul-2015 Ajay Panicker <apanicke@google.com> Implement Bluetooth settings factory reset (1/5)

Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
53b1dc1c00aea1aabbdbc6efd7be0cba6bf397a2 24-Jun-2015 Andre Eisenbach <eisenbach@google.com> Send ACTION_ALIAS_CHANGED when remote device alias is changed

Bug: 20341903
Change-Id: I6e9dbeb1d05bdcce56fab63ccdd701138c99f5a0
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7db26994f395a6ef053fe341011d25dd5b49d584 16-Jun-2015 Adam Lesinski <adamlesinski@google.com> Fix overflow in energy calculation

The energy value can get quite high, so use longs.

Change-Id: Ib03c07160339c82a834ea94fe155a65f0efb03d2
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
244e9c62a85a4b94e21bf1a8dee456e22bc767c4 08-May-2015 Casper Bonde <c.bonde@samsung.com> SAP: Make it possible to enforce a 16-digit pin code (3/5)

This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I42ada9b36d24d43697a2010eccbc0103f15af77d
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f5f90873574eefe5f50a7b383fcd8fefb961f66c 05-Dec-2014 Andre Eisenbach <eisenbach@google.com> Bluetooth native dumpsys logging support (4/5)

Bug: 18508263
Change-Id: Ib9546ff2cf64d2e085e27e691032749e869e0795
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
300a402ccd4d827d148a3ecf28dc06b0f2529259 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'ee92804' into merge2
282b4f24d83db944f432222cef8e6a938cfcc378 23-Apr-2015 Andre Eisenbach <eisenbach@google.com> Fix compile error due to extra brace

Change-Id: I467dcd31b97ed93e1a0f079ac02ee951c67ccac6
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
2e8302083499fdf5bb391d055e54c3402b0dc556 23-Apr-2015 Andre Eisenbach <eisenbach@google.com> Reduce AdaperService and HeadsetStateMachine log levels

Bug: 20460314
Change-Id: I6d1750845ccd0995800a8f82d2122cb1f3bc108d
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
871ab55f8460ecc0cbff29904c312528fb7bbc63 10-Apr-2015 Prerepa Viswanadham <dham@google.com> Manage onfound/lost resources (2/2)

Provide error callback to app if advertisement tracking resources
can't be reserved

Change-Id: Iff545591b919bcf7ca6615072e942be3e56938c2
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
cee0d1b1f13b4401a895be650605fa307e70bdb6 19-Mar-2015 Casper Bonde <c.bonde@samsung.com> Add support for Bluetooth Sim Access Profile (3/4)

Server side of the Sim Access Profile. Enables a Bluetooth device
to take over control of the SIM. This is usefull in cars where the
internal antenna in the phone can have a low signal level.

For this profile to work, the RIL driver must allow for this feature
to be used, and it must provide the API needed. The API is based on
protoBuf.

This change includes some SAP test cases.

Change-Id: Ia46493383efed6b8a89ca270bdafa60fc1a150c1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java
24181aba0a5a45ab554c9fcc9bfa97981bcf75a2 19-Mar-2015 Casper Bonde <c.bonde@samsung.com> Add support for Bluetooth Sim Access Profile (3/4)

Server side of the Sim Access Profile. Enables a Bluetooth device
to take over control of the SIM. This is usefull in cars where the
internal antenna in the phone can have a low signal level.

For this profile to work, the RIL driver must allow for this feature
to be used, and it must provide the API needed. The API is based on
protoBuf.

This change includes some SAP test cases.

Change-Id: Ia46493383efed6b8a89ca270bdafa60fc1a150c1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
83557a8324f0d1c2ae6ff416fbc122d7b6c64fe3 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/AdapterService.java
5e1d6f595461e27acab14c5c5931d32025c1c18d 15-Apr-2015 Vinit Deshpande <vinitd@google.com> am bbb4110..165d7fa from mirror-m-wireless-internal-release

165d7fa MAP: Errata service release 8 changes
5a60e47 Update to Bluetooth MAP 1.2 (server)
0dcecb2 MAP: fix exception when Email in SMS list request
a8873ca Merge "Handle response to AT+NREC command" into m-wireless-dev
345f1ee Add UUIDs to SDP JNI
d1fadc3 Handle response to AT+NREC command

Change-Id: If24e414fe3fd0c2f47147f2535296b92e8066d76
5a60e47497f21f64e6d79420dc4c56c1907df22a 17-Mar-2015 kschulz <k.schulz@samsung.com> Update to Bluetooth MAP 1.2 (server)

- Change folder name lookup to a map
Replaced the arrays used to convert mailbox ID/msg type to a folder name with a static map.
This is to avoid null pointer exception for unknown values, and to catch any changes in
the ID/type values at compile time in stead of runtime.
Bug-id:16874441
- Added Instance Information support and Extended Event support.
Still missing integration wiht SDP MAP feature bit mask support
- Adding Abstract implementation to support conversations
- added IM account handling, IM type definition, Application paramenters.
- addedgetConversactionList functionality
- added method to strip encoding in headers
- Fixed messagelist showing both email address and name in the name fields.
- Fixed Index out of bounds exception was hit when the subject contained invalid chars.
- Added functionality to support the getConversationListReq
Works for SMS/MMS, Email and IM
For Email/IM it depends on the convoContact table in the contract.
For SMS/MMS it uses the contact number+ name if available in contact database.
- Added new parameters to msgListing also in contract class
- Added Test framework for "near system level" tests
Currently only includes an entry point for single device tests.
- Added support for setOwnerStatus
- Added support for vcard type X-BT-UID
- Introduced type SignedLongLong to handle 128 bit values which needs to be handled as hex-strings.
- Added convocontact notification events for IM
- Added support for IM getMessage
- Added setEventFilter function.
- Added event filtering before enquing an event to be send.
- Added selective observers, depending on the active filter.
- Fixed timestamp to be from seconds to seconds (not from milisec)
- Fixed version number in bMessage if remote featurebit is set for v 1.1
- Added content encoding to QP for text that are not USACII
- Corrected the addresses in to/from for IM messages
- Added btuid and btuci to vcard
- Fixed (some) longlines
- Added extendedData support (empty when sending, just logging when receiving)
- Fixed Email folderName compairison changed to ignore case
- Fixed problem with names containing "null"
- BluetoothMapbMessageMms changed to BluetoothMapbMessageMime
- Fixrf addOriginator in getMessage request
- Add missing subjects in events for SMS
- Don't send ReadStatusChanged when pushing a message
- Temp way of adding names/uci to IM msg listing
- Added messageHandle filtering in msgListing
- Convolisting parameter mask support
- Added support for using handle when filtering in root folder during msgLising
- Added subject to event in sms
- Fixed so attribute_mime_type is only sent when parameter is requested
- Fixed feature bit check to messageListing version
- Fixed leaking cursors
- Added support for database identifier
- Added folder and conversation version counters

Change-Id: I4d2954b795aa7ed2a41dd034384da30f240b518f
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7c568e681511b992aa72838082b5dfa5e1ec6c10 10-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '2e85ea37c1ba495d3f0fd702f0a3920f3faf2848' into merge_work
bbb4110b455b3aa29106d5b4f0a37e1be8e09475 09-Apr-2015 Casper Bonde <c.bonde@samsung.com> Obex over L2CAP + SDP search API

Each profile had its own implementation of ObexTransport.
These implementations were implemented very similar, and
could easily be merged into a common implementation.

Additionally it will make it easier to adopt the transport
to support L2CAP.

The SDP functionality is implemented in a way that is scalable,
hence adding new record types is easy.
Intents are currently used to distribute the SDP search results,
as we have observed that the new client side profiles have been
located outside the Bluetooth package.
We strongly recommend to keep all bluetooth profiles within the
Bluetooth package, to acoid the need for exposing all bluetooth
interfaces through the Android framework. For instance this new
SDP create API is internal to Bluetooth, hence cannot be used by
the external profiles - hence they cannot use OBEX over L2CAP.

The SDP search currently supports:
- MAP both sides
- OPP server (only the server needs an SDP record)
- PBAP server (only the server needs SDP record)

The SDP create record currently supports:
- MAP both sides
- OPP server
- PBAP server
The new l2cap sockets introduces a new wrapper class for a rfcomm
and an l2cap socket.
The wrapper design:
- Creates two accept threads running while bluetooth is
turned on.
- When a connection is accepted the owner is asked wether or not
to accept the connection if rejected, the connection will be
rejected at obex level, else it will be accepted and the state
is changed to busy.
- Any further connections will be rejected at Obex level, until
the state is changed back to idle.

Notes tor executing the test cases:
Test OBEX using local pipes(no BT) or two bluetooth enabled
devices.

Test SDP using two Bluetooth enabled devices

Start server testcase first on one device, then start
the matching client test on the other device.

You cannot run all tests in one go, as they need to run
on multiple devices.

Edit the test sequesce to add/remove/modify the sequence
of OBEX operations to perform.

Use the new SDP record create interface.

Change-Id: I3941793f9843abf4afa5ffbee40d1d01c118b29b
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
2e85ea37c1ba495d3f0fd702f0a3920f3faf2848 04-Apr-2015 Prerepa Viswanadham <dham@google.com> Onlost onfound feature

Change-Id: I7ceace5f14ed1cbdb8b66267ced318741febee73
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
dea3455df17f60987c982a2a55f8604ba9186434 24-Mar-2015 Prerepa Viswanadham <dham@google.com> Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge
6797e50e9bd5f979a0f4751da857e8b97843edb4 05-Feb-2015 Prerepa Viswanadham <dham@google.com> Use overlay values for computing the energy used.

Change-Id: Ifddeccbb555e5db19434b13b69f9a7b0c139332e
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
c01407c7241590067a38147ad58c3954d82a3675 09-Feb-2015 Adam Lesinski <adamlesinski@google.com> Pass in time at which the energy info sample was collected

This is relies on a change in frameworks/base.

Change-Id: I78fc1ff8d954c58e58cd7f1a458f7d54cee1ce11
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4 10-Feb-2015 Andre Eisenbach <eisenbach@google.com> am 6c384c59: am c9d93376: am 1e3e1ddf: Add API to check if a Bluetooth connection is encrypted (2/2)

* commit '6c384c5927aa0f02c5bda611fc31225447f710e2':
Add API to check if a Bluetooth connection is encrypted (2/2)
1e3e1ddf939bf71616245e1e100964568053d665 06-Feb-2015 Andre Eisenbach <eisenbach@google.com> Add API to check if a Bluetooth connection is encrypted (2/2)

Bug: 19186961
Change-Id: Ied8dbe60995ebe8759c2a4ce21f373b597ed3afe
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
0139e50ffe57661b9318c144ea4de44a41299432 19-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 97f53797: am a4774d88: am cd1091ef: Merge "Add EventLog for configHciSnoopLog() security check" into lmp-mr1-dev

* commit '97f537976cab544a1533338938eaa0547350903e':
Add EventLog for configHciSnoopLog() security check
9ab1d44d3d9cfd459b868879ba9a5eefe3ed0cbf 17-Dec-2014 Andre Eisenbach <eisenbach@google.com> Add EventLog for configHciSnoopLog() security check

Bug: 18643224
Change-Id: I9c3f5e0880310e02a187d88349c5624bdade42eb
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a733b88ef9cf13463ec138ecbddf6c4e053f67fa 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 3ef42ba6: am 8959f11b: am 79606a97: Prevent non-system users from enabling Bluetooth HCI logging

* commit '3ef42ba6d68aeda0c52b936da3196804365c4452':
Prevent non-system users from enabling Bluetooth HCI logging
79606a976b1ba0399ef94798b82e180c8376ecaf 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Prevent non-system users from enabling Bluetooth HCI logging

Bug: 18643224
Change-Id: I990aa3dac478d332f565496d0353c9677ea85d46
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1e1c2a09698292db272421e58afee79b3bffe2e4 09-Dec-2014 Benjamin Franz <bfranz@google.com> am 64e6c05f: am ebdd2435: am 42a756a0: Merge "Allow managed profile apps to use some bluetooth functionality." into lmp-mr1-dev

* commit '64e6c05fac01604ac12676118d6b111781fc55c8':
Allow managed profile apps to use some bluetooth functionality.
2287bc2b01df774378123fe7bc7bca14fee549f7 05-Nov-2014 Benjamin Franz <bfranz@google.com> Allow managed profile apps to use some bluetooth functionality.

Adding a function that checks whether the calling user is the foreground
user or a managed profile associated to this user. This function is
deployed in selected spots to give managed profile apps access to some
part of the bluetooth functionality including the HeadsetService.

Bug: 16968338
Change-Id: Ib0db0847cf361b449484195553725c38ede3b618
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
317f4e8911fee285fb313db47529a898e60f4da0 26-Nov-2014 Matthew Xie <mattx@google.com> am fcd9bd0d: DO NOT MERGE Move wake alarm setting and releasing into AdapterService\'s handler

* commit 'fcd9bd0d130f1050aa7e68c65f1595ef8fc24e68':
DO NOT MERGE Move wake alarm setting and releasing into AdapterService's handler
fcd9bd0d130f1050aa7e68c65f1595ef8fc24e68 26-Nov-2014 Matthew Xie <mattx@google.com> DO NOT MERGE Move wake alarm setting and releasing into AdapterService's handler

The setting and firing of the alarm wake lock came from different thread
and cause deadlock.

Note: not merging down into MR1 so that further testing can be done.

Bug: 18511282
Change-Id: I32b18cb21d503f10a8e49b1e86c949ebe96b3482
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
838949d46a4cc054985a8cfd682004f8dd6d3bbb 28-Oct-2014 Mike Lockwood <lockwood@google.com> Add dumpsys support for bluetooth

Bug: 18159457
Change-Id: I807a7d921b6e5baf111d0f0e3e182c6633a93b7c
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a1664d61821a59145f8095a75373403a0c54244e 23-Sep-2014 Wei Wang <weiwa@google.com> Add support of advertising through standard instance.(2/4)

Use standard advertising instance if peripheral mode is support but multi adv is not.

Bug: 17552672
Change-Id: I21044665d0ac38f84abb95bfe1348d7bf83bfd2a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
d523f01c8adda96876ffc019c9bb8b78e1372be0 30-Sep-2014 Matthew Xie <mattx@google.com> Add HOGP as hid profile when the remote device contain HOGP service

bug 17409862

Change-Id: I018f12facefa7fb7bf2c3b46e639c40a8a67eae4
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
699bc55e42eddd29889ab0e45d795c9a91a67662 16-Sep-2014 Edward Jee <edjee@google.com> Merge "Migrates PBAP and MAP access permission data from Settings to Bluetooth." into lmp-dev
901fc26af77bd2d0a82fe7b8e47a2fafb622811e 15-Sep-2014 PauloftheWest <paulofthewest@google.com> Bluetooth now properly saves A2DP status.

Bug: 17115629
Change-Id: I5e9bc4d492a9714a87b15d131b25cf9a5a0aeecd
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
fc9bed1b79edf77082f5baa21aa68d791a102ea4 05-Sep-2014 Edward Jee <edjee@google.com> Migrates PBAP and MAP access permission data from Settings to Bluetooth.

Currently, users' preference in phonebook and call history or message
access per each Bluetooth-paired device is stored in Settings application's
shared preferences.

However, some privileged applications other than Settings need to access
such data. So we decided to migrate the data from Settings application's
shared preferences to Bluetooth application's.

Bug: 17158953
Change-Id: I3808891cdcce84aa0d4df31f998c9f1240159d95
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
db681f3973bd8a088a878fd6f41d4330cdbc5522 05-Aug-2014 Andre Eisenbach <eisenbach@google.com> Add transport parameter to createBond() function (3/4)

Change-Id: Id3c59bcc8f9efb20fffdebaff34d6b2593f5e5ca
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3548bc374efdb3cc93d6856e71353291a90fd4a7 31-Jul-2014 Prerepa Viswanadham <dham@google.com> Reduce batch supported threshold to 1024 bytes

b/16680086

Change-Id: I671abd7dba321ab111280d1a1cb27aa93635a6d1
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
d981566d5912bfd66fc265508e5b0c43dce76f82 23-Jul-2014 Prerepa Viswanadham <dham@google.com> Bug 15564216: Report Bluetooth tx/rx/idle activity info and energy reporting

Change-Id: Icff519c6e91d7a9a2fb5bd462daddb6a79f9bb46
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
f6eff2b71e9bc206f995e847e384507fb1c3e239 19-Jul-2014 Prerepa Viswanadham <dham@google.com> LE energy info feature

Java and JNI changes for energy info feature

Change-Id: Ifdc7b7253aea8c610b2dac90f2b3f525b5e2d73f
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
411ad52f79b7390a5831e30d3e3742c129c6bb6a 14-Jul-2014 Sharvil Nanavati <sharvil@google.com> Fix bug b/16119342 by synchronizing the access of mWakeLock in release().

Change-Id: Ie0fb5d2c5805f854a886729f539adf2ae865bc17
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
c4b937588bb1a0b73071bbaa120906f5ff501059 02-Jul-2014 Prerepa Viswanadham <dham@google.com> am 40422f10: Obtain capabilities from BLE chipset for it\'s support of various features

* commit '40422f101e8ea8c852173a63d4faa1f01dcfa150':
Obtain capabilities from BLE chipset for it's support of various features
40422f101e8ea8c852173a63d4faa1f01dcfa150 02-Jul-2014 Prerepa Viswanadham <dham@google.com> Obtain capabilities from BLE chipset for it's support of various features

Change-Id: I594790bd837a22488c1e080e340cb1c66ed4367b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
2c0df0560ad5ae3fd6022b17b17a6a70143e216a 16-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Support MAP Client role on Bluedroid.

Implementation changes to support Message Access Profile
client role in Bluetooth Apk.

Change-Id: I209909a2b18e43c7931571526b983453795f6c6b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1ebce7fb88348be7b984b1a778bd1bbeea20d6d7 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a03c33b370420dc6ad688b217b5a37bfa43169cf 08-May-2014 Andre Eisenbach <eisenbach@google.com> Adding a method BluetoothDevice.isConnected()

Adding a new method to BluetoothDevice that lets callers know whether a remote device is
connected.

Original-patch-by: Jay Civelli <jcivelli@google.com>
Cherry-picked-from: master
Change-Id: Ia8ad2e3189d08b63832634bdf804656b8d013820
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
cf8a01eeb41fc6420283ed7c3d7d94a463745b1a 23-Jun-2014 Andre Eisenbach <eisenbach@google.com> Merge "Reduce log verbosity in AdapterService"
20de1a6601e8aea7bbc9b9a8219cc616ffddae25 21-Jun-2014 Andre Eisenbach <eisenbach@google.com> Reduce log verbosity in AdapterService

Cleaned up log messages and use existing log functions to control all
debug messages in one place. Also removes unhelpful repetitive message
spam in the Settings app Bluetooth activity.

Change-Id: I7bfd79e06daad60f50742a45ebcdab936077b93e
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3636f3319fc403e3bf995b6de71dc5e3f2864661 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
1e9f8a14e120e8786711abdd4a965236191c87ad 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
c145fd074dac20e6c9836ee6e900538f2cc7dd54 05-Jun-2014 Prerepa Viswanadham <dham@google.com> Use controller provided information about it BLE L feature capabilities

Change-Id: Ia3099c1df2664b79392b2a4f7e3e47d1507a9efe
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
c453f0f533556d8ffbb7a87ca09d6b30e259978e 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
cefee9c44890a0943a9fd7c2891324fd81d50b28 05-Jun-2014 Prerepa Viswanadham <dham@google.com> Use controller provided information about it BLE L feature capabilities

Change-Id: Ia3099c1df2664b79392b2a4f7e3e47d1507a9efe
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
7aa3a71e508e4f95a0a74f41ab8389979809191b 08-May-2014 Jay Civelli <jcivelli@google.com> Adding a method BluetoothDevice.isConnected()

Adding a new method to BluetoothDevice that lets callers know whether a remote device is
connected.

Change-Id: Ia8ad2e3189d08b63832634bdf804656b8d013820
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
34409f35db6e9ca74f727e3fe92141388ae5b069 16-Jul-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Set profile priorities only after SDP completion

Set the profile priorities only after SDP completion.
Perform lookup and set profile priorities to ON, only for
profiles supported by bonded BT device.
CR BLTH02405767

Change-Id: I83fe6e772993b7c41c6a86f504d2b09ea38b2356

Conflicts:
src/com/android/bluetooth/btservice/AdapterService.java
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
343b96e3995da4038b614384dcdad8a6494b4bc4 15-Mar-2014 Nitin Srivastava <nitinsr@codeaurora.org> Multi HF support

1. Added support for Multi HF connections
in Bluetooth application.
2. All connection transition states for
2nd HS onwards is handled in new state-
MultiHFPending.
3. The changes are done to handle proper
state transition for all connected HS.

Change-Id: I033ae57943e50273f9d3cac4c5f8d1624cb9ee09
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
4f491cb7088f918a10d39b52729233d3c98483f2 16-Jul-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Set profile priorities only after SDP completion

Set the profile priorities only after SDP completion.
Perform lookup and set profile priorities to ON, only for
profiles supported by bonded BT device.
CR BLTH02405767

Change-Id: I83fe6e772993b7c41c6a86f504d2b09ea38b2356

Conflicts:
src/com/android/bluetooth/btservice/AdapterService.java
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
69d4ca45a25e86823fbdb754ca6a3995f8131d59 15-Mar-2014 Nitin Srivastava <nitinsr@codeaurora.org> Multi HF support

1. Added support for Multi HF connections
in Bluetooth application.
2. All connection transition states for
2nd HS onwards is handled in new state-
MultiHFPending.
3. The changes are done to handle proper
state transition for all connected HS.

Change-Id: I033ae57943e50273f9d3cac4c5f8d1624cb9ee09
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
3b8e00b61402bde1d3d179087f030ea7ccd82135 04-Mar-2014 zzy <zhenye@broadcom.com> Exit bt process after cleanup

Added code to exit bt process and avoid android process caching.
The fix also gives end user a chance to recover a bad state bt process by
simply turning off/on the bluetooth. Since the process is not recycled,
the kernel frees up all leftover fd and memory and gives bt process a fresh start every time.

Change-Id: I616345da70bb60f1aeaab151a6bf6f793168a829
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a08fff0ae81757bdab00ae8865a906c711d5572f 30-Oct-2013 Wei Wang <weiwa@google.com> BLE peripheral mode (2/4): Gatt Service Change.

Change-Id: I0ea7df8c159ad388d8e58768c49e785e9a4694bb
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
9ecfc6cfb40a0af13180905b6930111cfdf01c64 06-Nov-2013 Matthew Xie <mattx@google.com> cancel device discovery before start pairing process

During pairing process, SDP search is needed which cannot be handled
if we are doing device discovery
bug 11294130

Change-Id: Ic025fa3000af4f2d4c2c2ac411d26b6a99ad097c
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
810c49b2cfece1c48ced464d6bd2509ec4cac7a3 22-Oct-2013 Matthew Xie <mattx@google.com> Change pairing api/intent permission from PRIVILEGED to ADMIN

The APIs are createBond, setPin, setPairingConfirmation
The intent is ACTION_PAIRING_REQUEST
bug 11101076

Change-Id: I3b065ab0348a964bb557e57527491b2f34e68a81
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
8dbf324f8e96fe1623467a72f11412d93564df2b 24-Sep-2013 Matthew Xie <mattx@google.com> Change setPin, setPin, setPairingConfirmation permission level to BLUETOOTH_PRIVILEGED

bug 9987787

Change-Id: I2fe88f4c284d8403d79e08194bf7a720b305d029
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
9d80b509f715a3c3f2ebd0de373d427fc31a6e6c 11-Jun-2013 Zhihai Xu <zhihaixu@google.com> Add debug menu to enable btsnoop

bug: 8059358
Change-Id: I2947b2b77955238410e2620489c2e0407ad8ae7b
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
d235269f06e99d76a0f63c8fe9e224e0f951f799 03-Apr-2013 Matthew Xie <mattx@google.com> Implement getRemoteType of IBluetooth.aidl

Bring the device type from hal to app api
bug 8529188

Change-Id: Id4a9837afc7234cb50ab6abf73da4bdc010db392
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
6efae4264e5b216b37e8da5ced41a7898e18ca3a 14-Feb-2013 Matthew Xie <mattx@google.com> turn off getState debug message, not so useful now

Change-Id: I258cb35f3166ac8a6a4c4ee7965db527cf17c2e2
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java
bd704c741b8c523ad747214f6f0520ac3e2caf8f 17-Oct-2012 Zhihai Xu <zhihaixu@google.com> BT connection notification in not updated in status bar for second user
It is due to the system UI is always running as the first user. It can't receive
broadcast intent ACTION_CONNECTION_STATE_CHANGED and ACTION_BOND_STATE_CHANGED
from bluetooth service when We switch to second user. Also the system UI also
is running as uid 10055, which will also call function isEnabled, getState,
getBondedDevices, getAdapterConnectionState and getBondState in bluetooth service.
I allow these functions to be called by all the users.
I forget remove check for getBondState in my first patch set

bug 7333382

Change-Id: I57f39a722e78d6d2453ebfecaab043637fef4d9c
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
df9d0fe584874f8cafa6ecedb3c3c054c9e99cba 10-Oct-2012 Matthew Xie <mattx@google.com> Merge "Turn off dbg messages, be prepared for production build" into jb-mr1-dev
37510150ee738ccfa5913f7120e28f25ae7768df 09-Oct-2012 Zhihai Xu <zhihaixu@google.com> Bluetooth multi-user updates: change bluetooth service
to reject background user access.

bug 6925422

Change-Id: I11d5ebf007c2843a72a9870055fc96672daf8409
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.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/AdapterService.java
1c03c84f90991f6c9c740d72d91716d4b6a933e4 11-Sep-2012 zzy <zhenye@broadcom.com> fixed bt on off stress test issue

root cause: cleanup stack process overlapped with bt turning
on process sometime. The cleanup() call in adapterservice.java
need to be call from onUnbind() to synchronize the
BluetoothSererviceManager unbindandFinish() call.
bug 7083069

Change-Id: Ib4c64d7e5fc996277278471969f187bb5e915a76
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
9eb4a84924718019c35fc5b32e59a6750ecf4116 29-Aug-2012 Ravi Nagarajan <nravi@broadcom.com> Adjust profile priorities when setting auto-connect

At a given point only one device should be set to have
PRIORITY_AUTO_CONNECT per profile. When setting a device priority
adjust the other devices' priority to make sure auto-connect
is attempted with only one device
bug 7076087

Change-Id: I1e03945a06e7acc901b53f34429194b3c3e76cd7
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
ca6110d57998fee7c7b572ca29061ee99a82ba37 09-Aug-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Implement enableNoAutoconnect() for NFC handover

Implementation of BT enable in Quiet mode without initiating auto connect and not allowing
Incoming HFP, A2DP and HID connections.

Change-Id: I857aea8d95677f8287df4641ec0aeae58a9f7a99
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.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/AdapterService.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/AdapterService.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/AdapterService.java
e469f16e5a7d99471d7db1b216d422e8d12cc4cf 06-Jun-2012 Matthew Xie <mattx@google.com> matt: my fix to get it compile, change logx to alogx, and etc

Change-Id: I0b361ad6ba9a5f6ac4db9203a389ee309b04019a
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
a7e8ef3f77ac74449f817f36f570a3545285be85 11-May-2012 fredc <fredc@broadcom.com> Added support for enabling/disabling profiles

Change-Id: I819ca7920d9d866bd3aca88d4365a18e2369ee81
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.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/AdapterService.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/AdapterService.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/AdapterService.java
404743adf7bde44df9c8571f7890bc11f613d7ae 17-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> BT icon not getting updated on profile connection due to incorrect handling of the prevState

Change-Id: Ibd3836047faebcaacb335898cc3d7392ab7571f4
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
9a0efb0ee8c63797280b3b9309782541134e9205 16-Apr-2012 fredc <fredc@broadcom.com> adapter non persistent service. Fixed null exception when profile services connect/disconnect

Change-Id: Iefafd1115471256d3107f039897e2af16077cdae
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java
c55ac7d42cf2d78c7edc67abf6c66813245b2c93 06-Apr-2012 fredc <fredc@broadcom.com> Added support for BluetoothDevice.fetchUuidsWithSdp()

Change-Id: Icd260b0cafd7fee72a7ad0275b62052257c6fc13
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java
cc80b2261351dc74ad1bed237b0423c12d340514 14-Mar-2012 Matthew Xie <mattx@google.com> initial check in of rfcomm socket implementation Author: Zhenye Zhu, Matthew Xie

Change-Id: Ie3ab12c3bafc0a44e378a31c426c5eb41192f154
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
676cb1bdd1c14c7af56562bab51f168e7f8f6d62 23-Mar-2012 Matthew Xie <mattx@google.com> Initial implementation of hdp service and jni

Change-Id: Ieca906080835098383cabbc13fa914363459f555
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
35207a5638f61caca5b9abb31e5c6850a9478a52 22-Mar-2012 Matthew Xie <mattx@google.com> initial implementation of hid service and jni

Change-Id: I527651bd85ad3adddbf4b89802f4a6128c9fa047
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
6c91bc0a163cc7600c40d7fb979777fd911d1ef1 17-Feb-2012 Matthew Xie <mattx@google.com> Initial implementation of HFP and A2DP profile/service/statemachine.

Change-Id: Ic6e6d358b94313f237b7be61b70dcc6f4f7902e7
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.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/AdapterService.java
581bb31a8165ff0f9c7d638cfe4a81aaaafa2ded 06-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Remove passkey callback.

Use ssp callback for all 3 forms of 2.1 pairing.

Change-Id: I13af1eecc3469e4db8e656717700a1f9166177e3
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.java
fe90735bb6280ccaceb8a0a990781a810a2dd33e 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Fix scan mode bug.

The incorrect paramter was being passed.

Change-Id: Icc119811d61ffa537b837a6712a85ea9dcefaa87
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterService.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/AdapterService.java