• Home
  • History
  • Annotate
  • only in /packages/apps/Bluetooth/src/com/android/
History log of /packages/apps/Bluetooth/src/com/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3e25adee90d4594ff622bf5f5174333556b7c136 23-Jun-2017 Ajay Panicker <apanicke@google.com> AVRCP: Fix NowPlayingList looping

When a controller requested GetFolderItems, we would sometimes send a
NowPlayingListChanged before responding to GetFolderItems, prompting a
new GetFolderItems request. This put us in an infinite loop.

Test: connect to BMW and note it actually works
Bug: 62775732

Change-Id: Idc669a03f71ed9ec6b211bb5c33fc98548cc9f85
(cherry picked from commit d65422f9b47bff59b12162fc51032eb633f0722f)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpMediaRspInterface.java
1ab97a2f4868aeb050cc0eae6e3a22081af69f05 22-Jun-2017 Marie Janssen <jamuraa@google.com> Avrcp: Limit available players changed

According to the spec, we should only send an Available Players Changed
update when a player is added or removed. (AVRCP 1.6.1 Sec 6.9.4 p74)

Only send an update when a player is added or removed. If a player
would change feature bits, display name, major or minor type, present it
as a new player instead and remove the old player.

Sync available players notifications with other notifications.

Bug: 34471252
Test: switch players, note that Available Players Changed is not sent
all the time
Change-Id: Icd3730afa6e182810920f28fa7db17b98e53ceea
(cherry picked from commit f2f6a4ea02e9456f71ea0490112845110ca5d975)
(cherry picked from commit 85ff6903243d244d4342f390bb40aa99097a9a7c)
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
25343be15f408405433f873bbcd501175e507841 21-Jun-2017 Marie Janssen <jamuraa@google.com> Avrcp: refactor addressed player notifications

The time when audio players change is a time of great changes in the Media
Framework. Many things are updated at the same time, and controllers
are updating three or four times before Metadata is stable for sending
to the controller.

Accordingly, when media updates happen, we can wait a little bit to
update media info when it changes to let it settle.

Refactor sending addressed player changes, resetting notifications when
we are supposed to, and check for an update whenever we update media.

Only update media at max every second.

Test: connect to carkit, change apps, notice media appears
Bug: 34471252
Change-Id: I6f0a5e169bece69894d1139a2b6615fac6b08a48
(cherry picked from commit 59b1c77f883bd97816332046a3a98be4431ccedd)
(cherry picked from commit b631457c5ccc472a499334f65b88848bbaf3c605)
luetooth/avrcp/Avrcp.java
90cad4dd0ef3a0a2e8e50c65ba6b62e6e3f95690 22-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a missing check for null pointer during closing of PBAP Service" into oc-dev
029b34a866c2f4ab132412ec2814fd500813c565 21-Jun-2017 Marie Janssen <jamuraa@google.com> Avrcp: redact media info

Let's redact some of that media info when we're not on debug/eng builds.

Test: play some music, adb logcat and observe
Bug: 62826797
Change-Id: Icf7e926508215eae70cd75bef3cddcc001218c50
(cherry picked from commit cc07ee436d00418ecc69ae3aace986f7fbf0823a)
luetooth/Utils.java
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
75911dfffcd36542b340cd11729edc8553456646 21-Jun-2017 Pavlin Radoslavov <pavlin@google.com> Add a missing check for null pointer during closing of PBAP Service

This fixes NullPointerException when processing MSG_SERVERSESSION_CLOSE
from the Obex Server if Bluetooth itself is shutting down.

BluetoothPbapService.closeService() ->
BluetoothPbapObexServer.onClose() -> msg(MSG_SERVERSESSION_CLOSE) -> ...
-> BluetoothPbapService.stopObexServerSession()
-> mAdapter.isEnabled() -> NPE (mAdapter is null)

Bug: 62073087
Test: Code compilation
Change-Id: Ica98e1b784b3a51456c7709062074ea122eb8bdd
(cherry picked from commit d5a30661a5c51e5f02320868ec870709c1c0ecac)
luetooth/pbap/BluetoothPbapService.java
676768272f84bc3fef9068b6286b6f38cb1e8962 16-Jun-2017 Marie Janssen <jamuraa@google.com> AVRCP: Prevent multithread issues in cleanup

When cleaning up the object in doQuit it was possible to have multiple
threads updating at once, causing NullPointerExceptions in some cases.

Synchronize the startup and shutdown of the Avrcp object to prevent
this.

Test: toggle bluetooth rapidly
Bug: 62676895
Change-Id: I2618c7d7b21acb1f95cb67366d469da2fa88d4a4
(cherry picked from commit 9a5f80a6528d76153a7e97821f114f3370df89a5)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
d5b2445ec7ff3809c1c90a9b20784a6a861a037c 13-Jun-2017 Marie Janssen <jamuraa@google.com> AVRCP: Workaround Queue ID & metadata updates

When a player with a queue updates their track, it comes in two separate
parts from MediaController.Callback:
- Queue ID is in onPlaybackStateChanged
- Metadata is in onMetadataChanged

Because the ordering of these two is not specific, both must change
before we have a consistent data state to present the carkit if the
Media client has a queue.

Even though the only thing sent in the Track Changed notification is the
Queue ID, the request for metadata often comes before the Metadata has
been updated after that notification.

Refactor Track Changed notification to keep track of the last data we
sent to the controller, and send new tracks when both Queue ID and
Metadata have changed.

Test: various carkit testing with track skipping
Bug: 37707672
Change-Id: Ibf9f725f6912955a65421786068921489dbf8e45
(cherry picked from commit 5aca05c1d79f3412b6964b3b6335ad6f2d558756)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
0ce2c585150e29d4d8fa7157d9243d4760c77c7f 09-Jun-2017 Calvin On <con@google.com> Work around/prevent NPE in aclStateChangedCallback.

Bug: 62440980
Change-Id: I0fd02d80a9cb656a253e537a4ce2dd538df4c48d
luetooth/btservice/RemoteDevices.java
b716d637edded2ee0872aed5fb1259d2acded221 13-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AVRCP: reduce PLAY_INTERVAL_TIMEOUT logspam" into oc-dev
a06a7e90bac455c4bc440a1e03117dd6ae41a653 12-Jun-2017 Marie Janssen <jamuraa@google.com> AVRCP: reduce PLAY_INTERVAL_TIMEOUT logspam

Before:
06-10 20:38:36.926 1002 1520 2053 V Avrcp : MSG_NATIVE_REQ_REGISTER_NOTIFICATION:event=5 param=1
06-10 20:38:36.926 1002 1520 2053 D Avrcp : sendPlayPosNotificationRsp: (true) 193004 <=? 194015 <=? 195004
06-10 20:38:36.926 1002 1520 2053 D Avrcp : sendPlayPosNotificationRsp: currentPlayState PlaybackState {state=3, position=698, buffered position=0, speed=1.0, updated=76557851, actions=794551, custom actions=[Action:mName='Thumbs up, mIcon=2130838014, mExtras=Bundle[mParcelledData.dataSize=40], Action:mName='Thumbs down, mIcon=2130838013, mExtras=Bundle[mParcelledData.dataSize=44], Action:mName='Start radio, mIcon=2130837971, mExtras=Bundle[mParcelledData.dataSize=648], Action:mName='Shuffle, mIcon=2130837998, mExtras=null], active item id=27596, error=null}
06-10 20:38:36.926 1002 1520 2053 D Avrcp : PLAY_INTERVAL_TIMEOUT set for 1000ms from now
06-10 20:38:37.928 1002 1520 2053 V Avrcp : MSG_PLAY_INTERVAL_TIMEOUT
06-10 20:38:37.928 1002 1520 2053 D Avrcp : sendPlayPosNotificationRsp: (false) 193015 <=? 195017 <=? 195015
06-10 20:38:37.928 1002 1520 2053 D Avrcp : sendPlayPosNotificationRsp: currentPlayState PlaybackState {state=3, position=698, buffered position=0, speed=1.0, updated=76557851, actions=794551, custom actions=[Action:mName='Thumbs up, mIcon=2130838014, mExtras=Bundle[mParcelledData.dataSize=40], Action:mName='Thumbs down, mIcon=2130838013, mExtras=Bundle[mParcelledData.dataSize=44], Action:mName='Start radio, mIcon=2130837971, mExtras=Bundle[mParcelledData.dataSize=648], Action:mName='Shuffle, mIcon=2130837998, mExtras=null], active item id=27596, error=null}

After:
06-12 14:27:38.217 1217 1807 V Avrcp : MSG_NATIVE_REQ_REGISTER_NOTIFICATION:event=5 param=5
06-12 14:27:38.218 1217 1807 D Avrcp : sendPlayPosNotificationRsp: (true) 56305 <=? 61489 <=? 66305 Playing State: 3 Timeout 5000ms
06-12 14:27:43.225 1217 1807 D Avrcp : sendPlayPosNotificationRsp: (false) 56489 <=? 66495 <=? 66489 Playing State: 3

Test: adb logcat when playing music and connected to a device
Bug: 36802046
Change-Id: Icb3623c51ceaf0e70f3da9beb1f0a2896b4cfd65
(cherry picked from commit 0ace2d5941549e466ada4258c6c6fbb1debdf48d)
luetooth/avrcp/Avrcp.java
4ffc87667492e40e448efa2ef5b11ae3de2f449b 06-Jun-2017 Marie Janssen <jamuraa@google.com> AVRCP: fix single item queue Now Playing issues

When queried (and in track change notifications) we previously returned
an item ID not allowed by the spec (0xFFFFFFFFFFFFFFFF) to a controller
when presenting a "single item queue" because the player doesn't provide
one.

Refactor the code so that the single item queue is persisted and send
NOW_PLAYING_CONTENT_CHANGED when the single item queue updates.

Tweak debugging of mediacontrollers for easier player debugging.

Test: check media info on honda carkit w/fm.player app
Bug: 62288178
Change-Id: Ic37d0c4c837436e102e9642e1f8e36e17e0dc254
(cherry picked from commit 3a80469f095e51f9be3965d67fff595eabc00293)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/mockable/MediaController.java
91e595b5bef1b092975992e529b2c581eb1be08b 09-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> PBAP: Implement Folder Version Counter(s)

Primary version counter should be updated on any change to
contact. Secondary version counter should not update when
there is change to fields other than F, FN, TEL, EMAIL or
ADDRESS. There is no default API available in android to determine
which field is updated as required for updating secondary
version counter. Implemented logic to increment the secondary
version counter by comparing updated contacts with old cached
contacts of the contact database.

Test: Verified that folder version counter gets incremented for
change(s) in fields of Contacts as per PBAP specification.
TestTracker: 89053
Bug: 33011817
Change-Id: I90a1ced3713c369bcde0edd627bbde57a9676708
(cherry picked from commit cf92c2759b709461acf7c36c08f4eef9c8004c85)
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapUtils.java
luetooth/pbap/BluetoothPbapVcardManager.java
cecda8201dad0b6d2007f6c7e31b1113729d7850 17-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> PBAP: Add support for PBAP 1.2

Add changes required to do the SDP registration as
supported by 1.2, L2CAP related functionality and counter
related changes to support PBAP 1.2.

Test: Connected with Remote PBAP Client supporting PBAP 1.2 and
verified that connection and transfer happens over L2CAP.
Connected with Remote PBAP Client supporting PBAP 1.1 and
and verified that connection and transfer happens over RFCOMM.
TestTracker: 89053

Bug: 33011817
Change-Id: Iddace24f43a7618ccbe6a9b49bcab88dbaae0e06
(cherry picked from commit 5a37bc407ab1b8844c3541ff4e6653635b108bed)
luetooth/ObexServerSockets.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
75d921ee3bba53093facb1d8bc772ddd6483a0db 09-Jun-2017 Pavlin Radoslavov <pavlin@google.com> Initialize the RemoteDevice Class Of Device to UNCATEGORIZED

Bug: 37615863
Test: Manual with LG HBS1100 headset
Change-Id: I0420cd517f77a4c8965c6651a24f97c29ae99f7f
(cherry picked from commit 2c5969fcd9beac52e4218d66f7f47d8ea901647a)
luetooth/btservice/RemoteDevices.java
8239c5c797b26376ddef46aaae43ae72019873bc 07-Jun-2017 Ajay Panicker <apanicke@google.com> Prevent opportunistic scans from changing the hardware filter

Before this patch opportunistic scans could set the hardware filter
to be an all pass filter. This would result large amounts of scan
results as short filtered scans would act as if they were unfiltered.
Now if an app is scanning opportunistically, its filter doesn't
get added to the hardware filter.

Fixes: 62280037
Test: Do a filtered scan while another app is scanning opportunistically
and see that the scan results only increase marginally.

Change-Id: I6214a2dd14d2c5ee4c21faa440c48ce7bab0b3fe
(cherry picked from commit b5d5a9563793d32bdafacfe93e303a13d5afd364)
luetooth/gatt/ScanManager.java
39652bd0ad5daacf917299a2b2843649cea212aa 03-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AVRCP: Fix issues around trackChanged notification" into oc-dev
aa977ceda593239b1948570ccac6f5460cc0fb8c 02-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Fix OnAdvertisingSetStopped callback not being called

Bug: 62031687
Test: sl4a AdvertisingSetTest
Change-Id: I6de84bb68d8c54d8c9685e701ca5ee4967a7b6f0
luetooth/gatt/AdvertiseManager.java
827c417f70082918b965a5213c38395398389811 31-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix issues around trackChanged notification

When the track changes, sometimes the Queue ID changes before the
Metadata, and vice versa. Indicate that the track info has changed in
either case.

Guard against unsolicited responses since we are triggering more often.

Use the MediaController info for GetItemAttributes when the requested
id matches the current id.

Test: connect to Chrysler CK, switch to next track a few times, look for
good data.
Bug: 37707672
Change-Id: I6bffd419e22e1a029e11f9340afde54be00d3efc
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
1ed348039a1ecbf7ad480bfe41b80578c6eed0b1 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AVRCP: synchronize around mMediaController" into oc-dev
469e9bc6e1aa0cd5dacf51659e32bda38ddb7ab4 01-Jun-2017 Pavlin Radoslavov <pavlin@google.com> Improve internal state synchronization of the A2dpStateMachine

* Don't block entering Disconnected state
If the mCurrentDevice or mTargetDevice or mIncomingDevice
is not null, print an error message and reset the state
* Add consistency checks when entering each state: Disconnected,
Pending, Connected
* Add a missing "synchronized" statement

Bug: 62164051
Test: Manual
Change-Id: I5856a88e58b42aa55d9075aa507bfa706ea52512
(cherry picked from commit 459978de76c5d152208538f61180e4a790c6e8d9)
luetooth/a2dp/A2dpStateMachine.java
b4650c79c67ba13773724ef4af9a82c1bb7c808c 31-May-2017 Joe Onorato <joeo@google.com> Merge "Send ble scan type to Batterystats" into oc-dev
4a33b1ae722da6fba769e36808f75405c7685de8 31-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Turn off logspam (Bluetooth)" into oc-dev
86582543b9cd70a617e84c049c03b466653e9641 25-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: synchronize around mMediaController

There were small windows where mMediaController could be used and
modified by separate threads causing NullPointerExceptions. Synchronize
around mMediaController to avoid these issues.

Test: none
Bug: 62068020
Change-Id: I68acadefe793c4c0f7ffed108ec2e943ade138b8
(cherry picked from commit ad7a50ece55752b9b7e47cd86dc45de368c8c6d5)
luetooth/avrcp/Avrcp.java
792b3b63ea8109fb0d30135e9249256f3d891d9e 26-Apr-2017 Joe Onorato <joeo@google.com> Turn off logspam (Bluetooth)

For more information, see https://source.android.com/source/code-style#log-sparingly

Bug: 37252687
Test: development/tools/logblame/medium_idle_test
Change-Id: I8c839eff19fa0b00d1b6a04fbb554b39010884d9
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceConfig.java
luetooth/gatt/PeriodicScanManager.java
luetooth/gatt/ScanManager.java
ca4e714ae37050265379fc6604a4e01db9ecae15 24-May-2017 Ajay Panicker <apanicke@google.com> Switch GATT scan timekeeping to use a different clock

System.currentTimeMillis() could cause a scan to have a negative scan
time if the system time changed during a scan. Switch to
SystemClock.elapsedRealtime which is guaranteed to be monotonic.

Test: Start a scan and change system time
Bug: 62057540
Change-Id: Ie4d88df96c0a133955f46c355660756e587d29c5
(cherry picked from commit 4e58faa3aa59332e4d2394e6e54d8d1579e5cc73)
luetooth/gatt/AppScanStats.java
978986041010d3d2d72e1057743415e76c6f2ce9 11-May-2017 Hemant Gupta <hemantg@codeaurora.org> AVRCP: Fix GetItemAttributesCommand

Usecase:
1) Connect DUT with remote device supporting AVRCP 1.4
2) Connect browsing channel (if not already connected).
3) Send request to retrieve player list and select browsed player.
3) Send get item attribute commands to retrieve attributes of particular uid.

Expected Result:
Item attributes of particular UID are retrieved successfully.

Observation:
Get Item Attribute command does not return any response.

Root cause:
Media id passed as argument to MediaBrowse.subscribe is of children instead of
parent as required by the API

Fix:
Refactor to encapsulate requested ID in the subscribe callback, call the
MediaBrowser.subscribe with the correct id.

Test: connect to carkit and check if DUT responds correctly to GetItemAttribute
Bug: 37265436
Change-Id: Ifd7e17c600c0142cd29514eedf4ff8150f632570
(cherry picked from commit 3cd52581b21ef8c35382650170c9046119213f28)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/BrowsedMediaPlayer.java
b7350e83ebac9e86321791cb62b3e71fa3c54562 24-May-2017 Marie Janssen <jamuraa@google.com> Fix setFlags/addFlags typo

In aosp/352873 setFlags was used instead of addFlags which means wrong
semantics are used.

Test: sanity pairing tests with devices
Bug: 35853357
Change-Id: If27a870d880036aea60e8a07714a76af6de75081
(cherry picked from commit 117ee66c2a482df8ae99d4edbc1be1d03765d54a)
luetooth/btservice/BondStateMachine.java
90dcb467d4964f65bde4f847a2e8fe0fe048c3a7 24-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: don't remove inactive media controllers

Some players change their controllers to inactive when they are
buffering, paused, or changing songs which causes us to lose track of
the controller in these states when it makes sense to keep track still.

In the case where we actually have no controller, simplify the logic
around tracking play state using A2DP feedback.

Test: Pause / Play with troublesome headphones
Bug: 38497029
Change-Id: I8e1258b85007c070fc083d9522f9fa8caa13e6f2
(cherry picked from commit c9f4e0d24e39b372452fa809b12f9c588b29abd9)
luetooth/avrcp/Avrcp.java
ffec5afaea207f22ceeab0eeb73a4ec5000f91fc 23-May-2017 Bookatz <bookatz@google.com> Send ble scan type to Batterystats

Batterystats is now informed whether the ble scan is unoptimized or not.
In this context, unoptimized means that it is none of filtered, background,
or opportunistic.

Bug: 38461344
Test: run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testUnoptimizedBleScans
Change-Id: Idb199666830db24b2ef92797cdcc59e8eab16be3
luetooth/gatt/AppScanStats.java
85d0a3893b2aff55f0c57e319570d5e38e7b9cbd 23-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove logspam in service state changes" into oc-dev
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)
luetooth/btservice/AdapterService.java
566ab625deaccd0db8ae964bf07dd6db01a55c70 17-May-2017 Ajay Panicker <apanicke@google.com> Remove logspam for empty remote device properties

Some properties can have a length of zero, so don't display an error
message when this happens.

Bug: 37803501
Test: Code still compiles
Change-Id: If6a2f32505c61f31075b2fc87d0521020c3720ac
(cherry picked from commit 6ad1b92100edacaa55560c3df5179bafb49539c2)
luetooth/btservice/RemoteDevices.java
83955a5b052c70a080dac6b185170b3ba65d82e1 16-May-2017 Hemant Gupta <hemantg@codeaurora.org> Settings: Convert notifications to use NotificationChannel (1/2)

Test Setup:
===========
HW DUT: Pixel O
Remote: MecApp (SAP Client)

Usecase:
1) Connect from MecApp.
2) Accept SAP connection on DUT.

Expected Behaviour:
Notification popup for SAP connected should be displayed on UI
which provide option for user to disconnect SAP connection.

Observed Behaviour:
Notification popup for SAP connected is not displayed on UI so user
is not able to initiate disconnection from SAP server.

Root cause:
In Android O, notifications are hidden by default.
This must be changed to use notification channels so that the
priority of the notifications can be updated.

Fix:
Add notification channel before building notification from SAP.

Test: Checked if now notification for SAP connect can be seen in
notification bar when SAP is connected allowing user to disconnect.

Bug: 38331825
Change-Id: I67b0a3fd7f1df857c6288150edbef80d4a953490
(cherry picked from commit c5c434b205948c7bf6bea50fc55521904c896ce6)
luetooth/sap/SapServer.java
303c1c67dbc142822bc37e7c5a89fba82faf2ac0 16-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: increase log info density

AVRCP has a lot of log messages that have little to no info.
Particularly with carkits that poll for data all the time, this makes it hard
to debug anything.

Remove logs where there's no info, add info where it's available with the goal
of making every log message useful.

Remove variables that we don't use anymore.

Print Now Playing Queue data on the dumpsys and when we report it
back to the controller.

Test: connect to a carkit and grab a bugreport
Bug: 37707672
Bug: 36802046
Bug: 38264897
Change-Id: I4fcb5a1c625c2d212685b4df04a0ac42df3d7841
(cherry picked from commit e5384f02ec837a8f274ed59548cb6879849239f5)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
5bdc2bfcdf1dfd0a76c242468fc78f48d0c79771 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Track BLE Scanning statistics by UID instead of by package name" into oc-dev
0533d66ae0a334789c197cde425d3ad87a84dd7d 17-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: send track changed if queue id is the same

Since metadata lags behind queue id changes, we need to send another
track changed to present the correct media metadata to the controller.

Test: connect to carkit and next track a few times
Bug: 37707672
Change-Id: Ifc6f3219dbffb078e4de247c67083bdbc29c52bc
(cherry picked from commit 89cbf5bfe48e75aee016ffbc7824353ff9ce242e)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
d4f3f444bc09eaa0b447557900f2d9d82ef44e1c 15-May-2017 Ajay Panicker <apanicke@google.com> Track BLE Scanning statistics by UID instead of by package name

Bug: 38315257
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest
Change-Id: I8a705f6f8169bf074a0eacc39c015bb1af04207d
luetooth/gatt/ContextMap.java
55995e8f4bc667358f3106a18f0722f137c734bc 16-May-2017 Jakub Pawlowski <jpawlowski@google.com> Discover primary service by UUID for PTS tests (3/4)

Bug: 38123054
Test: manual
Change-Id: I1547f1dbd46e2d5e9a4e2b953b9973fb3f52a7d7
(cherry picked from commit 84685c0e90fc8ad9453157d6f2b6454974d594e8)
luetooth/gatt/GattService.java
214b7f0b959e2fb3474d43f99136c83e4e11c843 12-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix concurrency issues with MediaController

Some callbacks could null the MediaController when we are updating it -
only update in one place and synchronize.

Test: change players while player removes
Bug: 38228028
Change-Id: I4c5f7e9d51cddabeb7f3e48da58f89202f7362e4
(cherry picked from commit f6521ba818df22d8a853d25f7c6adc1e724875e6)
luetooth/avrcp/Avrcp.java
8dc1ac7b011ff262830a0a28f66ae53fe5f63f74 09-May-2017 Ajay Panicker <apanicke@google.com> Add scan result tracking to battery stats

Bug: 37720787
Test: View volta stats and check for results
Change-Id: I92f116686fe394b4205fc684fd4872bbc88766a5
luetooth/gatt/AppScanStats.java
b53db85ac64743580dee8bf31bf0ba3c4eab0c67 08-May-2017 Ajay Panicker <apanicke@google.com> Remove delay received from audio layer for A2DP state changes

Due to changes in the audio layer, the
setBluetoothA2dpDeviceConnectionState() function now returns a
delay of 0 on a state change from disconnecting to disconnected.
After a discussion with the audio team, the delay returned by
this function isn't actually relevant to the A2DP state machine
so instead remove the dependency on the delay returned.

Bug: 37906688
Test: Disconnect from headset multiple times and see that it is
not stuck disconnecting.

Change-Id: I108cc5230a571edbd26fcb1f985a0b14cb7123b6
(cherry picked from commit 895d2fc990ef39441731af44b3603355ddb05a46)
luetooth/a2dp/A2dpStateMachine.java
de5340b6cbe5e8bd62658131e87c551d0fc7a182 05-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Add PlaybackState for Track Changed

MediaController.getMetadata() updates out of sync with
MediaController.getPlaybackState(), causing issues because we use
PlaybackState.getCurrentQueueId() to sent track IDs to AVRCP CT.

Add getCurrentQueueId() as an indicator of track changes.

Remove counting how many tracks have played since it's inaccurate.

Test: connect to carkit, skip tracks, metadata is updating correctly
Bug: 37707672
Change-Id: I5d190933b847622ec858eab38828902cf798f8e1
(cherry picked from commit 29174eb9ad6e255d7ec216ab9a2ce8d20e2fe13c)
luetooth/avrcp/Avrcp.java
a7beda7b5cb38e757c4daf42996119b7c790cc35 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "PBAP: Convert notifications to use NotificationChannel" into oc-dev
557b7d5218c907beaac2d7e28807dd4752db5f18 08-May-2017 Hemant Gupta <hemantg@codeaurora.org> PBAP: Convert notifications to use NotificationChannel

Test Setup:
===========
HW DUT: Pixel O
Remote1: MecApp PBAP Client

Steps:
=====
1. Enable BT on DUT and bond with Remote.
2. Connect from MecApp PBAP Client Tab and observe.(Request
Authentication checkbox enabled in MecApp).

Expected Result:
================
Device should connect successfully.

Actual Result:
===========
In Step2, "The remote PBAP server did not accept the connect request error
popup is displayed."

Reproducibility:
===========
5/5

Log trace:
Line 6855: 05-08 14:04:23.453 10051 11015 D BluetoothPbapService:
Pbap state 0 -> 2, result = 1
Line 6868: 05-08 14:04:23.465 1615 1751 E NotificationService:
Cannot post notification
without channel ID when targeting O - notification=Notification
(pri=0 contentView=null vibrate=null
sound=default tick defaults=0x1 flags=0x18 color=0xff607d8b vis=PRIVATE)
Line 6947: 05-08 14:04:33.471 10051 10051 W BluetoothPbapService:
Release Wake Lock
Line 7155: 05-08 14:04:53.491 10051 11492 D BluetoothPbapObexServer:
onClose(): msg MSG_SERVERSESSION_CLOSE sent out.
Line 7172: 05-08 14:04:53.509 10051 10051 D BluetoothPbapService:
Pbap state 2 -> 0, result = 1

Root Cause:
In Android O, Bluetooth notifications are hidden by default.
This must be changed to use notification channels so that the
priority of the notifications can be updated.

Test: PBAP connection works fine when remote sends authentication
challenge.

Bug: 38149308
Change-Id: Ifff0a81912f1bf11edc73279a9a127b791188d02
luetooth/pbap/BluetoothPbapService.java
241af80129d66d60eea6e77e8962b7123e1c61c5 02-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Prevent concurrent access of Browser List

Concurrent access to mBrowsePlayerInfoList could happen still.

Test: none - concurrently change sessions and add a player?
Change-Id: Ibb2e1010eb1326387c04dae4ab2413d6aa3b2034
Bug: 37896665
(cherry picked from commit 5146bd27869df5473aa53e6271266f51733971ef)
luetooth/avrcp/Avrcp.java
d088653f84737b2216dda32384486430881662a2 28-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Stop MediaBrowser attempts on shutdown

Once we start our atttempts to connect to MediaBrowsers, we can get a
signal to shut down which means we could connect to a MediaBrowser and
then never disconnect, leaking a service connection.

Test: rapid on-off of the Bluetooth in settings
Change-Id: I0364b387f9b2e4ca1f65d122060ed4c153b9d70d
Fixes: 37634554
(cherry picked from commit be66a1bf5584a2a7985666ab20c5e9b54053e17d)
luetooth/avrcp/Avrcp.java
579be982d9d3ffa93c38fe27589db8eae80d1d34 04-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix crash when app change during shutdown

If you turned off Bluetooth and then immediately changed the app that
media keys went to, a NPE could be generated.

Test: shutdown bt then quick-switch to telecom immediately
Change-Id: Ifbca7446d94aa411b642b42131f603c8f9d1c31e
Bug: 37865933
(cherry picked from commit 7c7cc128e93e7e1db8a5ed7f69583ddc6d99493e)
luetooth/avrcp/Avrcp.java
0c3b4f4f77175b72061b356a54e2febaf1f19a6a 05-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: set addressed player on key dispatch

MediaSessionManager.Callback.onAddressedPlayerChanged isn't being called
consistently when the package that receives media keys changes.

This affects media metadata showing up because the addressed player
controls the mMediaController.

Update the addressed player for every media key press as a workaround.

Adjust logging to reduce logspam.

Test: connect to carkit, play from GPM then switch to Youtube.
Bug: 37789858
Bug: 34471252
Bug: 37998705
Bug: 37865298
Change-Id: Ic94bb97d51f48f9799edfca0d5f9a9b2872b0132
(cherry picked from commit 78d53f7d7133cb5a32e1160e1c1a23f2e8174978)
luetooth/avrcp/Avrcp.java
edbc90eb917a8a509d2d03fb304763b768ec5517 03-May-2017 Ajay Panicker <apanicke@google.com> Move Bluetooth battery stats tracking (2/2)

Move Bluetooth battery stats tracking to AppScanStats for a more
unified tracking system.

Bug: 37720787
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testBleScans
Perform BLE scan and check battery stats
Change-Id: I6129a83d275c7d72edc6abfc5cc72641adde8767
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
37b87504071b66b874d503d930f456149570f21a 05-May-2017 Ajay Panicker <apanicke@google.com> Merge "Limit btsnoop file size (2/9)" into oc-dev
9c2305404ac5caf31dbb6303b3dc44419efdb222 04-May-2017 Jakub Pawlowski <jpawlowski@google.com> Increase device name limit in the LE advertisement

The advertise data refactor:
https://android-review.git.corp.google.com/#/q/topic:btif-ad-data-refactor
introduced a change in behaviour. Previously, the device name was
included in full, or truncated if the device name was longer than the
advertisement. After the patch, name longer than 18 chars are truncated.

Increase the allowed device name length to 26 - the maximum size it can
get for legacy connectable advertisement.

Bug: 37870615
Test: none
Change-Id: I3464ffae32e73cefa10142c2f0509d9139475ddd
(cherry picked from commit c36b2ae522ab9bf7827cfca8f6cbb8efeaf2b8fa)
luetooth/gatt/AdvertiseHelper.java
2f71318cb054f98241ebeda6714a4d8d810d7603 04-May-2017 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Fix NPE in removeMediaController" into oc-dev
07331cbd302f65c1cc72be3f7f20004127cdd1fb 03-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Launch player when selected and not running

When a carkit selects a player, start it if we don't have a session
running, instead of trying to start it's browsing service instead.

Test: select browsable player as active player from carkit
Change-Id: I50a5817daf9e9a666871f01c22ffbe7fedb15ec1
Bug: 37919422
(cherry picked from commit eb3c55797d3ba16916327effa6b36acec5f1de36)
luetooth/avrcp/Avrcp.java
c721162e8198dbc1b4b3ec9d87beb083ba704307 04-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix NPE in removeMediaController

Test: make a SIP call, hang up.
Bug: 37976254
Change-Id: I975163aa85dc77f108d89064bbe6eadf682d3123
(cherry picked from commit a1e42e29b15323e1a4d0559235a0987200663b2f)
luetooth/avrcp/Avrcp.java
b5abf887db7cd7492899eb53058ab1bbbb7918c0 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AVRCP: Track players without active media sessions" into oc-dev
bdb553b83619e54dec3e386403cfb50293f6eb22 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add persistent state for Bluetooth high quality audio support" into oc-dev
d89304c6be6e1c332008dcbeab08889881064454 03-May-2017 Marie Janssen <jamuraa@google.com> AVRCP: Track players without active media sessions

Players can be selected as addressed by MediaSessionService, then
destroy and renew their MediaSession. We want them to continue to
be addressed.

Don't remove players that destroy their MediaSession, and just forget
the controller instead.

Remove players when their package is removed though.

Report "(unknown)" when we are asked for media info for an addressed
player that has no controller.

Fix a bug where we didn't send updated metadata when it changed.
Fix an ordering bug updating the media session.

Make logging more clear when we're adding / updating / removing players.
Add dumpsys log to confirm current mMediaController is correct.

Use @Nullable and @NonNull to help with distinguishing when
MediaController can be null in AddressedMediaPlayer.

Test: send pause / play from headset, look at bugreport to confirm
Change-Id: I083745f8988e67776716db2bec5e67b697e8ee67
Bug: 36357185
Fixes: 37865298
(cherry picked from commit 384011244f5a62ed34f198b8ba91341b4efb4fb6)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/mockable/MediaController.java
20155af8008337cb70ea0556472854abf46ca1eb 27-Apr-2017 Antony Sargent <asargent@google.com> Add persistent state for Bluetooth high quality audio support

This CL implements the storage/retrieval of flags for whether Bluetooth
A2DP sink devices support optional codecs and if they should be turned
on when that device is connected. It also contains code to listen for
device connections and do two things: (1) save whether that device
supports optional codecs, and (2) either enable or disable those codecs
for playback if we had a stored preference for the device.

Bug=37441685
Test: manually

Change-Id: I5f3113342d53aeeb9ede68602da8c7ff8c853457
luetooth/a2dp/A2dpService.java
1107f9516bf8866640247044deb9f780bb89e55c 28-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: fix crash on callback with no player

If MediaSessionService tells us there's no place for keys to go, then we
have no player.

Test: disable com.google.music, reboot
Change-Id: I2adf884f9db991975cd0ae72abf2238ce323c517
Fixes: 37681487
(cherry picked from commit 41527b2493a4ea59933c7cd4f8d1c761598509d8)
luetooth/avrcp/Avrcp.java
ee0e5e79e0ed6bd4a4b7dac33ac8aad90296d8b8 28-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Merge changes from topic 'bt5-cherry-pickerry-3' into oc-dev

* changes:
Expose LE advertiser address for easier PTS tests (2/6)
Read by UUID for PTS tests (2/5)
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
luetooth/btservice/AdapterService.java
93f177151f5b96ce3e06888884da3cd7f7858ecf 25-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: update metadata and state more consistently

When we get onMetadata it's not updated quite right, and the
PlaybackState gives the wrong answer for getActiveQueueItemId, which
means that we don't send the correct updated data. Update the metadata
when we get a onPlaybackStateChanged as well, so we refresh the
metadata and notify correctly for EVENT_TRACK_CHANGED.

Keep track of the last queue item we sent and don't send an update if
the queue item has not changed.

Use A2DP streaming state only when we don't have strong signals from
Media framework.

Use PlaybackState.getLastPositionUpdateTime() instead of trying to
figure it out on our own.

Trust MediaAttributes with the track length instead of duplicating it.

Test: connect to BMW kit and skip some tracks, new data will show up
correctly
Bug: 37209435
Bug: 36016671
Bug: 36357185
Bug: 36055995
Change-Id: I332aaadeabcfe8284084a34c964e5f0d07bfeef4

(cherry picked from commit 0a429916782c20980e7f0893c503c633b8341f88)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
0f9c79e8afa3e575dfd8c80c2c58b9321e18898d 26-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Gracefully handle missing item attributes

The source of our metadata sometimes doesn't even give us basic title
information, which causes a NullPointerException when we try to fill the
Displayable Name.

Fill it with "<unknown>" when we don't know the data.

Add more useful debugging for GetFolderItems and GetItemAttributes.

Test: Tested with Audi and Porche car kit
Bug: 37657532
Bug: 37718715
Change-Id: I183f2b9c5714ebacabc8093de1c2bc166e323fae
(cherry picked from commit 89728a4d50001ac76d05efa1c916711ef9f9c2b4)
luetooth/Utils.java
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/BrowsedMediaPlayer.java
00129680f9863701255425567f408e66ec84caf1 19-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Expose LE advertiser address for easier PTS tests (2/6)

This patchset adds a hidden method getOwnAddress, that lets app with
BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done
exclusively for PTS tests.

Bug: 35147497
Test: manual
Change-Id: I8da0128c1dac2995e488f1e0c48aa7d5fd399b4c
(cherry picked from commit f10e5516ed308be0493173fcd7982fb4f0a8cd0e)
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
f2b309cfa9c602760e88f3dca60f813438a9726b 14-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Read by UUID for PTS tests (2/5)

Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: I6ec848eac1ecfbd1a4ec2bc968faff8a082d9c79
(cherry picked from commit 5fc203008497b071dc583450a53c93e11dd561ff)
luetooth/gatt/GattService.java
810d960162d74ba291a085ee2b11a37e7cbdace7 25-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: fix PlayItem NPE with no Addressed Player

Test: connect to audi, note no crashes
Change-Id: I584244c98b5afbc697b491886e4205f3af9083ca
Fixes: 37657913
(cherry picked from commit db2d487ba559f0e4de02bc2ad4cc7e275878b2fc)
luetooth/avrcp/Avrcp.java
c6699acd010ddaf046dae92bec61707bd77fb667 27-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "A2DP sink audio focus" into oc-dev
8cd453176a070f0627d64fc2f3e34b8258d2e9a7 25-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: synchronize with better granularity

Make synchronization more granular by synchronizing on the objects
actually being used.

Fix missing synchronization on mMediaPlayerInfoList.

Test: basic smoke test with multiple players
Change-Id: Iec451dca2c51ec6f6f35a1d0a28f2c4dd52db722
Fixes: 37651901
(cherry picked from commit a303cd6e430b887aa2c74fe585a323617d1837ab)
luetooth/avrcp/Avrcp.java
b8bd002d207c8025cd298521d1ecd7515ac33b44 19-Apr-2017 Joseph Pirozzo <pirozzoj@google.com> A2DP sink audio focus

Resolved a bug where BT media fails to pause and subsequently resume during
a transient audio focus loss as is seen during voice recognition.
Resolved a bug where BT media may not resume after a phone call due to an
audio focus race condition.
Resolved a bug where BT phone notifications could interrupt and disrupt
an ongoing media session such as radio or local media player.

Bug: 34853256
Bug: 36529639
Bug: 37288772
Test: runtest bluetooth -c
com.android.bluetooth.a2dpsink.A2dpSinkStreamHandlerTest
Change-Id: I5261d24fd7bbe49bf61c48fdf2c9ae86934dcd3d

(cherry picked from commit 2938b62a0f172680d726a351b609e83c4b2e81f7)
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamHandler.java
189938f036ebfcc479187c15c6be3cc670a3437a 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AVRCP: Fix getFolderItems with all items request" into oc-dev
025568aec7a1e4bc32f00080d937f9b891d357b6 22-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Pick a media player ASAP

Fix things to pick a "default media player" as soon as we can so that
connected devices have something to send media commands to. This is
also in line with the spec.

Previously we were not detecting when we didn't have a media player
selected and selecting one.

Test: boot with com.android.music and connect to carkit, check logs
Bug: 36016671
Change-Id: I89175a3d513635d7cf8b75f5010967b99d5490aa
(cherry picked from commit 793470cef61d887cc26ce793e21e411733af8b38)
luetooth/avrcp/Avrcp.java
ce0f15c8598a1e570faf80bbc60e0568d2d20d45 15-Feb-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix getFolderItems with all items request

start item and end item are uint32_t
0xFFFFFFFF is commonly used as an indicator for "all items" end value.

Using a jint (int32_t) doesn't work, use jlong instead.

Test: browse with audi kit
Bug: 35385700
Bug: 36645066
Change-Id: I364f70a8b985796a6bcc83148a4ecc368a0c0493
(cherry picked from commit aabff2d74224e1d122a2ae767330a69b9324779e)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/BrowsedMediaPlayer.java
90005b32854f4ffd9d4f352aef91112702294a7e 22-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AdapterProperties: Track connection state change from more profiles" into oc-dev
122aff50aec1a1eb6cef8c94c84e33dae7194e31 21-Apr-2017 Jack He <siyuanh@google.com> AdapterProperties: Track connection state change from more profiles

* AdapterProperties should handle ACTION_CONNECTION_STATE_CHANGED intent
from more profiles
* AdapterProperties sends BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED
with STATE_CONNECTING and STATE_CONNECTED when first profile send out
the same intent, and with STATE_DISCONNECTING and STATE_DISCONNECTED
when last profile send out the same intent.
* At the same moment, AdapterProperties also update the return value for
BluetoothAdapter.getConnectionState()
* Currently, we are only tracking HEADSET (HFP), HEADSET_CLIENT (HFP), A2DP,
A2DP_SINK profiles, other profiles such as PAN, PBAP, HID profiles are
not tracked properly and their state change could be missed by
both intent users and BluetoothAdapter.getConnectionState()
* After this CL, the following profiles will be tracked:
AVRCP_CONTROLLER, A2DP, A2DP_SINK, HEADSET, HEADSET_CLIENT,
INPUT_HOST, INPUT_DEVICE, MAP, MAP_CLIENT, PAN, PBAP_CLIENT, SAP

Bug: 37546066
Test: make, test connect and disconnect each profiles
Change-Id: I2ef0e55f58e6f7891823137e2e4534e97a126c25
(cherry picked from commit cbdcb7e4fc76661793877f142f628864797cb970)
luetooth/btservice/AdapterProperties.java
30ab34382e41956c87be2f1632249b2f8a4da577 18-Apr-2017 Stanley Tng <stng@google.com> Allow the Bluetooth MAC address to be updated asynchronously (1/3)

There are intermittent issues where either the returned Bluetooth
MAC address to Java framework is uninitialized or this address update
arrives too late. This fix will do 2 things:
(1) Returns error when MAC address is unavailable in the native code.
(2) Updates the MAC address later by adding a new broadcast event.

Test: Check address for these cases: factory reset, system reboot, and
Bluetooth re-enable.
Bug: 36709382

Change-Id: I6b71100c2c03c6f365f0dbc27d4e37c734145e30
(cherry picked from commit 6d5da5e7ffb69614706ca030bfe194a493b24e99)
luetooth/btservice/AdapterProperties.java
306810af645cd2e2964a5ecea6c14cf1e86affd1 21-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Log battery stats before ScanClient gets removed" into oc-dev
a6d4a7939896c36c0448b2bb058d2c8c0397aa95 20-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix EvictingQueue

Fixes EvictingQueue to not overflow the stack when a thing is added.

Test: runtest bluetooth -c com.android.bluetooth.avrcp.EvictingQueueTest
Bug: 33828042
Change-Id: I35f7f89152ff45edfacfe2c7e673adc1f31e1b3e
(cherry picked from commit 5e65f55d906687a682b4c7bbc9372084e4df3e53)
luetooth/avrcp/AvrcpHelperClasses.java
3f33bbb6164a0b42eee2d9d469e9325c5395d680 20-Apr-2017 Ajay Panicker <apanicke@google.com> Log battery stats before ScanClient gets removed

Bug: 36977250
Test: run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest
Change-Id: I8b926b7eeb9bdd8b54c7655a4951d21e8dffddfc
luetooth/gatt/ScanManager.java
bdcf510515b5b251b0b88ba3c05937661ca5da3f 24-Mar-2017 Marie Janssen <jamuraa@google.com> AVRCP: Passthrough through MediaSessionService

Send passthrough keys through MediaSessionService instead of trying to
interpret them ourselves, and log who they get dispatched to.

Remove the hack around down fast-forward / rewind.

This should result in a lot less confusion about which app is addressed
when the user is sending a command (such as at car connection time).

Test: play / skip, switch app on phone, reboot, start from carkit, dumpsys logs
Bug: 33828042
Bug: 37476911

Change-Id: I8c8c40cb3792254a3720f64707e67fdcc940edaa
(cherry picked from commit 44a4da788f878d1946301dbf297dd7b938dfd730)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/AvrcpMediaRspInterface.java
b3436e976055f684050be9afdadc73645316806a 07-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Report current playing item for now playing

According to the Bluetooth AVRCP 1.6.1 (p79):
In the case where the media player does not natively support a Now
Playing folder, it may present a folder containing one item, the
currently playing media element, as would be returned by a
GetElementAttributes command with the now playing UID.

Send this one-item list back when we don't have a queue, and try to
refresh the queue from the current player when we need to.

When a browsable player is selected, it's illegal for us to send a
response to EVT_TRACK_CHANGED with the now playing UID, so make up a
fake qid for this one item list in this case, since ids are only valid
within the current folder for database-unaware players anyway.

Respond with "no players available" when we actually don't have a
player.

Also fixes a bug where we would try to send the current queue back twice,
and reduces logspam in the main message handler by half.

Test: connect to carkit, test basic playback
Bug: 32800406
Bug: 36645066
Bug: 36055995
Bug: 36645066
Change-Id: Ia16c05bfc849359ca857b03edd5a75e21f13d6fb
(cherry picked from commit 5cbc96dc8da6b455c0d0a142d27274708ac1f208)
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
180c9367c92b4dc1e0ba854e5cafe4641d756ab0 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Handle PendingIntent-based callback for scan results" into oc-dev
4c9e91aa0d4e92197311fd1496e7251101aa0b3d 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Convert OPP notifications to use NotificationChannel" into oc-dev
d03408c87f740be8d87e706d8f43db6870b2733a 14-Apr-2017 Amith Yamasani <yamasani@google.com> Handle PendingIntent-based callback for scan results

This allows scan results to be returned to an app that is
potentially not running at the moment.

Bug: 37254611
Test: WIP for new tests. Existing cts bluetooth tests pass.
Change-Id: Iaa24333605ebd06636bfd765cec4551692d0f4d4
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
d2f6bd176055ed6c707f3e27ff130318afd231b1 18-Apr-2017 Ajay Panicker <apanicke@google.com> Convert OPP notifications to use NotificationChannel

In O, Bluetooth notifications are hidden by default. This must be
changed to use notification channels so that the priority of the
notifications can be updated.

Bug: 36974285
Test: Send files/batches over OPP
Testtracker: 84338
Change-Id: Ie34123bbb559cc760c83a6bdc7094a3a72382c33
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiver.java
df2c7df9eb3df62cf13e9d2e82fc1c156c71f280 15-Apr-2017 Jack He <siyuanh@google.com> OPP: Initialize OPP FileProvider after user unlock

* The FileProvider used by Bluetooth OPP profile used to be initialized
before user unlock, resulting in file system access errors since
credential encrypted volumes are not mounted and unlocked yet
* Incomplete initialization also leads to NPE when getUriForFile is
called
* This change adds BluetoothOppProvider that only initializes after user
unlocks the device

Bug: 36274847
Test: make, Opp regression test
Change-Id: I323b9084de1ff72922c4dd9866c36dd172696a8f
(cherry picked from commit a19f73959d7e054b206633aa1592a874d0d623f2)
luetooth/opp/BluetoothOppFileProvider.java
luetooth/opp/BluetoothOppUtility.java
8165f54abe920fe688ffb14644a8c65cd342aa6a 06-Apr-2017 Joseph Pirozzo <pirozzoj@google.com> PBAP Client Account Authenticator

Update PBAP client account authenticator have the correct package
namespace and the Bluetooth icon.

Bug: 27724937
Test: With the PBAP client profile enabled visit Settings->Users &
accounts->Add account observe icon and name for bluetooth pbap account.

Change-Id: If197ac22733be5a54f4f76b399f37949b7cc4915
(cherry picked from commit 741218f261f751c55564a60b581d9b7151fc235e)
luetooth/pbapclient/AuthenticationService.java
luetooth/pbapclient/Authenticator.java
fe53cbf450c60ff0cadb5220d51403ceff27043b 05-Apr-2017 Joseph Pirozzo <pirozzoj@google.com> PBAP Client Call Log

Update PBAP Client to correctly handle cases where a call log has either
an unknown phone number or missing timestamp. Included are test cases
to verify proper parsing.

Bug: 26760364
Bug: 29230296

Test: runtest bluetooth -c com.android.bluetooth.pbapclient.PbapParserTest
Change-Id: Ibdabd0320f3bdd6dee0d7bd7b5ddd9400219f3d4
(cherry picked from commit e1ee0dace9e715e3d94339dc642b8767db83b89e)
luetooth/pbapclient/CallLogPullRequest.java
69e512126b50c5297710638ef4347103972a86e3 15-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Prevent OPP from opening files that aren't sent over Bluetooth" into oc-dev
24bc6f18757cec2d0e71829164c8616e697d442f 11-Apr-2017 Ajay Panicker <apanicke@google.com> Prevent OPP from opening files that aren't sent over Bluetooth

Before this patch an app could send an open intent to
BluetoothOppTransferService using a fake content provider to gain external
read and write access. We fix this by checking the Uri of the file before
opening it to see if it originated from the Bluetooth Share content provider.
We also stop graning write access to apps that we use to view the file.

Bug: 35385327
Test: PoC found in bug
Change-Id: Iad85490a0306b3e70767285393b204be22b11511
luetooth/opp/BluetoothOppUtility.java
97995b8ccbadc3d868adc70684b13bc0d199edc2 15-Apr-2017 Amith Yamasani <yamasani@google.com> Dummy implementation for BLE scan via PendingIntent

Actual implementation under construction. This is a placeholder
for the new APIs.

Bug: 37254611
Test: N/A
Change-Id: Id2226bb919b944268ff6e4bf53d609d5808419e4
luetooth/gatt/GattService.java
cd379e8f26d2335799c07144ae8d5965884d0652 09-Nov-2016 Jack He <siyuanh@google.com> Check support for in-band ringing during HFP init

* Check in-band ringing support for this platform during HFP init

Bug: 19171297
Test: mm -j 40, HFP regression testing, testplans/82144
Change-Id: I5a90b2218b0dc15eb92f32bf9b4ed3ff3b01980b
(cherry picked from commit 6eac09b725ed509b26e8f49d8442426f7816953a)
luetooth/hfp/HeadsetStateMachine.java
376a8d4bed6bfe20532acf2f4af58f49e06080b9 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "OPP: Restrict file based URI access to external storage" into oc-dev
fe1c54e3fcbb75af7e49aecbd27ab7327a631c64 13-Mar-2017 Jack He <siyuanh@google.com> OPP: Restrict file based URI access to external storage

* Allow only external storage paths in file based URI in
BluetoothOppSendFileInfo when the file send request comes from an
external source
* Fix a potential NPE when using Uri.getPath()

Bug: 35310991
Test: Make, test various cases of Bluetooth file share
Change-Id: I8ff00d63d3c880667302f8d7ff8eaa0c0b533921
(cherry picked from commit 3edd7f0a8aadf2f44bc62ea5b567c74d39a534c8)
luetooth/opp/BluetoothOppHandoverReceiver.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppUtility.java
9ab3d6841511bc7d58677f13a1f9862b6daa0c01 11-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Fix NPE on adding non-browsable player

Test: boot phone with unbrowsable app installed
Change-Id: I7131d49b4c3c5bb86f9206b4214b80de06ec025c
Fixes: 37224369
Bug: 37197672
(cherry picked from commit eb48cddfe0630c165baae581c65c1fe0c42a4842)
luetooth/avrcp/AvrcpHelperClasses.java
0b6cad4a9f1ab18f6b3627ce7cf6316466cdb95a 10-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Prevent NPEs with browsing-only players

When a player doesn't have an active controller, the MediaPlayerInfo
is identified by package name instead.

Add the list of media players to the dumpsys.

Test: connect with browsing player that has no active session
i.e. GPM right after reboot with no paired devices
Bug: 37197672
Change-Id: I064b1dcce33172ceb7bcad2af4b214ea4fc4198c

(cherry picked from commit b8faaf4863cfae62c32af644765a9190512925c9)
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
351ffc02e8c395d0eabe108e5b4909e7f41ffae6 28-Mar-2017 Marie Janssen <jamuraa@google.com> AVRCP: Rework available media player handling

Instead of rebuilding the available player list every time a player
changes, only add and remove the players that have changed.

Add browsable players that don't have an active media session to the
available players.

Update browsable players as they are connected to and refresh the list
(and notify clients) when we are done.

This has an effect of removing a lot of log lines, and reduces churn
of the MediaController callback registration.

Update logging that remains to be much less verbose.

Test: connect to various carkits, verify browsing, updated logs
Bug: 34249902
Bug: 36497125
Bug: 36802046
Change-Id: I9783c682a3f8c22b8b79cfd9023fac6078b21b9f
(cherry picked from commit eef486e7e3145cc7b302ee1b00bbd317481cdabd)
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
1beade1e45f1f82b411eac62cf13b60bb2ed1969 05-Apr-2017 Jack He <siyuanh@google.com> HFP: Check for service level connection when connecting SCO

* A service level connection (SLC) should be established before a SCO
connection could be created
* This CL creates a flag within HeadsetStateMachine to track the status
of service level connections
* BluetoothHeadset.connectAudio() will return false when an SLC is not
established

Bug: 36100309
Test: make, HFP regression, testplans/82424
Change-Id: Ibb52674ef6be75eeac66eb228e8b75d9bba1ddc6
(cherry picked from commit 7a895040f9654546a3ea6f5aca904a533a112dbd)
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
a7cf67c3e381792a7648b02d61b0fce75c4cc210 05-Apr-2017 Marie Janssen <jamuraa@google.com> AVRCP: Don't send notifications in callbacks

Since native code can have unbounded wait (for thread safety), only call
it on the main thread.

Some notifications are also idempotent so also eliminate duplicate
notifications if we might send multiple in a short time period.

Test: connect to tesla, observe no crashing
Change-Id: I4ca1ab6d8657ce4f02983101c68e95ebf9026753
Fixes: 36794139
(cherry picked from commit e2619781c799435cf0273d381069c754c5f89a20)
luetooth/avrcp/Avrcp.java
be74f02a2ff91427d331440b8b843aacfacc5852 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change radio related service names to slot1, slot2, slot3..." into oc-dev
160a5d973567ea4466f5be906cae350082b75174 31-Mar-2017 Jack He <siyuanh@google.com> Consolidate log messages in RemoteDevices.java

Test: make, no user visible effect
Change-Id: I8725b2d97cdc45e8751b45fc08e6943d48ce9ece
(cherry picked from commit ae62adac760fd5236fa1e8c3b7a18f3635333ae2)
luetooth/btservice/RemoteDevices.java
0e68b031093ca4776111da8babaf6ea1142b4755 28-Mar-2017 Amit Mahajan <amitmahajan@google.com> Change radio related service names to slot1, slot2, slot3...

Test: Basic telephony sanity
Bug: 36570718
Merged-in: I054a5e7cc396a78df95752218e52e92dd7616d88
Change-Id: I054a5e7cc396a78df95752218e52e92dd7616d88
luetooth/sap/SapRilReceiver.java
0f7c253837f9eff47557990fd1053f62b9600222 04-Apr-2017 Jack He <siyuanh@google.com> OPP: Check target device when receiving SDP search result

* Return and print warning message when target is null while
handling ACTION_SDP_RECORD
* Without this check, a NullPointerException could be triggered
when a previously successful SDP search result landed on a
BluetoothOppTransfer object will recently failed SDP search that would
render mDevice null

Bug: 36260940
Test: make, test sending file through Bluetooth Opp
Change-Id: I861e7e64a7c9b316d4540fd5134892c247753f74
(cherry picked from commit 8e94b07aeccfa09db9add50b116b04393e3d8f1a)
luetooth/opp/BluetoothOppTransfer.java
00afbc90278b80415c9e847a3e97f05abe7fe313 03-Apr-2017 Jakub Pawlowski <jpawlowski@google.com> Fix unregAll throwing Concurrent exception

unregAll does iterate over ContextMap.mApps without synchronization,
and then call unregisterClient, which also iterate over same variable,
and remove element. This cause ConcurrentModificationException. To fix
that, make sure mApps access is always guarded by synchronized block.
Also make mApps into private variable, to make sure no one would make
similar errors in the future.

Bug: 34805290
Test: manual
Change-Id: I6254c809423ecc3901b64f1a2d60324efd1c4834
(cherry-picked from commit 98ca87dd893a7a3d1545e00a2a9a2419d83e22ef)
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
7f4a31f44f61bf765dad1d3b570e314fa1a98f85 31-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 advertising duration refactoring (3/4)

Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I81ee59086f40b64d07eb43b32f1a59a6856ab886
(cherry picked from commit de068ddbc7bc4de68b178c5e32a44180ddf257a0)
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/PeriodicScanManager.java
7efb7c69c45e71e96a035cdd0b2f9e57064aa0fe 31-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Add missing mApps synchronization

Test: manual
Bug: 33227052
Change-Id: I29d50f706c64b3a46f4bcb868dee6e86484ebed7
(cherry picked from commit 9b093393eead74eb3f1a8c19418d3d3a6e86761c)
luetooth/gatt/ContextMap.java
c9cdb6c47f5b318291a0a321b22a2c830adf7ab0 28-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 periodic scan (1/3)

This patch wires calls/callbacks through stack to prepare for actual
implementation.

Test: manual
Bug: 30622771
Change-Id: I9e6d81ccbbe1626de96f766813b048909e9ef452
(cherry picked from commit 2feca0e43c7309a47275b643e499b590190463a7)
luetooth/gatt/GattService.java
luetooth/gatt/PeriodicScanManager.java
0e1abf2276c4bc7e940624da89113b23e526be7a 24-Feb-2017 Pavlin Radoslavov <pavlin@google.com> Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()

This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).

Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: I3f0dfc2e965e89647c03d032089dcccbd5fb8ffc
(cherry picked from commit 7aec8406176f8cef0b608c22b6e631df71ccd363)
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
7d26735cb7aefc4d6f30b28aa74c16d64d25b7d9 28-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove SAP socket"
0d06e0d707c80e339d3b5ba4fbfa3b37af6a3de2 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth GATT callback naming fix "Ext" -> "" (2/2)" am: 0d76e0b3c1 am: 2d30263860
am: a10df55a65

Change-Id: I1d47dc2975b1408daa2f30435f2db24257ad2c97
2d302638609b4b02f28b3b77b90ede83e41df895 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth GATT callback naming fix "Ext" -> "" (2/2)"
am: 0d76e0b3c1

Change-Id: I37d5414b3dc58b7eb10cbf2523578fd6044b3ad7
4d8cedbd24f654206090466a334482cc7334b3ee 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Add option to specify initial LE connection PHY (3/3)" am: 8ef68115ff am: 0327911138
am: 0d63782a13

Change-Id: Iece2baeb669c514779230be001b03cc18dd8c097
032791113821d8fd5cd18076772d5db4f9808007 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Add option to specify initial LE connection PHY (3/3)"
am: 8ef68115ff

Change-Id: I6823a2ce47ed40fd377c5400026ae36dd63ebf4c
02056166f907639f6088b78b6754bd55af8aa083 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth GATT callback naming fix "Ext" -> "" (2/2)

Gatt callback don't need the "Ext" postfix, as it was removed from new
API.

Test: manual
Bug: 30622771
Change-Id: Ie7f764062662277b8c82b9a9e4628ce9411a924f
luetooth/gatt/GattService.java
73a32dfbd2f283341b86385b58ac4f3761c83f7b 22-Mar-2017 Amit Mahajan <amitmahajan@google.com> Remove SAP socket

Test: Basic SAP sanity
Bug: 32020264
Change-Id: I57d34f1cb36e4a63848ebf0dda9795fc75352a37
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
95d31b5b2a12528114ec63f55cc06161a11e7cf4 25-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Add option to specify initial LE connection PHY (3/3)

For whitelist connections we always use all possible PHYs, for direct
connection use PHY specified by client.

Test: manual
Bug: 30622771
Change-Id: I6e4de425ab3f367eb6c00ce36dee1d59869c0061
luetooth/gatt/GattService.java
0c4eb6793749599bc3c7c4b8d7b9ad09e52a5c85 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix (again) bad scan record data length" am: 02634fce73 am: 4361ddf27e
am: 23dc8bb47f

Change-Id: I485d752aa5939212279481287ca78b0d73b15a42
4361ddf27ed2afcbc2c54981afcd91c75113e5a3 27-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix (again) bad scan record data length"
am: 02634fce73

Change-Id: I0b76cc39e4832cc6fed278a39ee03780be2de887
150d57466e21f2802d588ff6e8fab974fb91bfbf 25-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Fix (again) bad scan record data length

Bug: 36530831
Test: sl4a Bt5ScanTest:test_legacy_scan_result_raw_length
Change-Id: Ie7b04c40947f6419a665a8f6c1244effa63d8a7e
luetooth/gatt/GattService.java
ae151449126a546f9e53e352e4f67c42cad8c424 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Expose connection update callback (3/4)" am: ffca06958c am: 7b12bc9c49
am: e1c53baafb

Change-Id: I52413e8cf101ff2220c81dc279ed23fe6614ec8e
7b12bc9c49eed7412236ee32aef959349756fc72 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Expose connection update callback (3/4)"
am: ffca06958c

Change-Id: I53e75df168f3f907bd0849913cad6b4565520384
4982e11647f30b47e9e352013d561bed272cb7fc 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Expose connection update callback (3/4)

Test: manual
Bug: 30622771
Change-Id: Ie731cf45bbb0ef01c5c6c13d149d75fea82e38d8
luetooth/gatt/GattService.java
17f511eef41ab445e448708fd694737979fb7db1 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Set preferred PHY and read PHY implementation (1/3)" am: d84a18a54e am: a54ea98fcc
am: 4e4ff25e90

Change-Id: I87445175c2e418badf89844834db725f802698fc
a54ea98fcc43e02d515f2b9a7f18f88edfc9e812 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Set preferred PHY and read PHY implementation (1/3)"
am: d84a18a54e

Change-Id: I2a785efa6a06e8b694a58d01670d60cfde69c781
1878bcf7b85d6f6e88fe60b582c576f5bfb78e88 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Set preferred PHY and read PHY implementation (1/3)

Test: manual
Bug: 30622771
Change-Id: I43b7b036e50188f76d8ed0609f5142b2a4ad07ee
luetooth/gatt/GattService.java
8cd0a17a7d64e34178807f178be63b12f5cd4688 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 Enable->Enabled (2/2)" am: f5505ac184 am: fe39467aad
am: a46f78b758

Change-Id: I7aefa97a6dfc01eb8a0ad26ecf7a82cbbf55725d
fe39467aade71425d41162d24789178abe20ff51 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 Enable->Enabled (2/2)"
am: f5505ac184

Change-Id: I4d102d76670253d72c719b1ca99457ea05a45e32
f5505ac184173807652a1e9c7045a3d0099fe5e2 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 Enable->Enabled (2/2)"
8afb5229a27e775f16f920c43db30061a7a96593 22-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 Enable->Enabled (2/2)

Test: manual
Bug: 30622771
Change-Id: Ifce2fc20fde2c55f26cb54012c9ee4eb44b1c91e
luetooth/gatt/AdvertiseManager.java
5269dfe71bfefe287db723de5563dd7be77d065f 22-Mar-2017 Ajay Panicker <apanicke@google.com> Merge "Add rejected calls to Incomming Call History" am: 048d5aaff9 am: fce8d2a965
am: d76888650e

Change-Id: I3d05e3afad1e3b838c9134261f1d930d9486ffb2
fce8d2a965a2b23afcd6c1387b8a473051e405dd 22-Mar-2017 Ajay Panicker <apanicke@google.com> Merge "Add rejected calls to Incomming Call History"
am: 048d5aaff9

Change-Id: I3351863c632270fac223726a624ae0fe2d8e0bf7
048d5aaff9f9b545c09dd22042ae6d96137c5f7c 22-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add rejected calls to Incomming Call History"
4ad109a53e99b559909b3239a99cb0d4bf0744c6 22-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Remove un-supported formats from SDP" am: 65f0a7ea2c am: a3014f0f18
am: 462b2a5ec5

Change-Id: I3df17257fcc3f0e896772b8c7a239c0cdaeddf22
a3014f0f1855e329b4e5e40bf549ae08e62cdf95 22-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Remove un-supported formats from SDP"
am: 65f0a7ea2c

Change-Id: I8976455db62ecffc8df8b70eb8248191321c5c6d
52f2f2a6dc254ce5d715a9533f0e6faae3b5c2a1 22-Mar-2017 Ajay Panicker <apanicke@google.com> Add rejected calls to Incomming Call History

Bug: 36490575
Test: Connect to carkit after rejecting a call on test device
Change-Id: Ifa3593b5b26e13a3bd6d2b94f744254e3eb353fb
luetooth/pbap/BluetoothPbapObexServer.java
45d51acb639adebef03c9e6a0591586de649a4a6 22-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Replace deprecated API(s) with new API." am: a2f7b90981 am: 3b6dac5898
am: 32af253a3f

Change-Id: Ice9ba86ccc496ac8c0f2e03b6891a31af035f497
3b6dac58981802734418de741075549a25fbccfd 22-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Replace deprecated API(s) with new API."
am: a2f7b90981

Change-Id: Id018ab5d51c3f53f4fd208fbd82abf9b320cdbe5
560fb676a64f888d31e672a4b66e52a05abb5f26 21-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> OPP: Remove un-supported formats from SDP

Use case:
1. Send a vcalendar file to DUT
2. Verify file is received on DUT

Result:
DUT rejects vCalendar put request with reason unsupported media type
although DUT SDP records claim support for vcalendar format. Same is valid
for vNote and vMessage formats as well.

Rootcause:
ACCEPTABLE_SHARE_INBOUND_TYPES does not have support for above MIME formats.

Fix:
Remove vCal, vNote and vMessage from OPP Server supported format list.

Reproducibiltiy:
5/5

Test: All PTS tests that were enabled because of support for different OPP MIME
formats got disabled as by default OPP Rx will not support these MIME formats
leading to no OPP failures in PTS.

Bug: 36467777
Change-Id: I2503f5c61dd28fd3cf73d10939c6d931dbe0d6ea
luetooth/opp/BluetoothOppService.java
luetooth/sdp/SdpManager.java
9c11dad35ee454d303b4f56a87042fc094bb61d8 06-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> OPP: Replace deprecated API(s) with new API.

Remove unnecessary variable/functions and avoid using
deprecated API(s).

Test: OPP functionality (Tx/Rx) works fine without issues.

Bug: 35013632
Change-Id: Ice9314d599d0c0f4d7cc0e1ed70c7e87fa41e937
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppHandoverReceiver.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppTransfer.java
35a1b2d3448c9449b7461c5828ee5149d97f5467 22-Mar-2017 Jack He <siyuanh@google.com> Merge "Call System.exit(0) in onDestroy" am: 0214c82fd5 am: 30d0df8a3e
am: 219d962f1b

Change-Id: I9dbe6edba105476b2b4c423e019168c3d92948e4
30d0df8a3ed2b1dec01b2c6dc28ec048911d7912 22-Mar-2017 Jack He <siyuanh@google.com> Merge "Call System.exit(0) in onDestroy"
am: 0214c82fd5

Change-Id: I6c742028f19ca69badf29ef2268e064fec1fd085
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
luetooth/btservice/AdapterService.java
d8861915771e841bfb3a2d8d1ad7668e52cb64f1 20-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 AdvertisingSet implementation (2/4)" am: b9954db54b am: b8a0a458e2
am: 8899aaeb8d

Change-Id: I5e1dce7724a8d27b1f80c23cf8cd3a8f1a6aa706
b8a0a458e2fc3f47fe677bc1919c345222c264b8 20-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 AdvertisingSet implementation (2/4)"
am: b9954db54b

Change-Id: I718747628310e4a9af5b580e0a9752c0194fbb28
8cc4343c3b71c7a4d57c0b8c669b0a6188185f6b 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 AdvertisingSet implementation (2/4)

Test: manual
Bug: 30622771
Change-Id: I69e1ce6be3b776f783d2b2d18aee63a494b8cfd1
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
7e687a79280f60135dacd4723e45ed905d5bfb19 18-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 move timeout parameter (2/2)" am: 91aa86124b am: 0cff63044b
am: 26abda20bf

Change-Id: I9eeacd23ccd9155fc26fee45a897adbbda33b345
0cff63044ba6f05d7d6e64b1e37d647f1779d896 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 move timeout parameter (2/2)"
am: 91aa86124b

Change-Id: I9cdefa60cc696cb727a24f0d3a29969deeffc860
b3246f3a27d269b4c0ef19cb2c8772d039eb26cc 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 move timeout parameter (2/2)

Timeout is not a parameter, it is a property of enabling the
advertising. Move it into more proper place.

Test: manual
Bug: 30622771
Change-Id: Ib688f183bf71fe429da6b9c3c8eb3591e9c6ec1d
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
d9251e30cd3caf7b15fcce49c259e73aefeb9b51 17-Mar-2017 Jack He <siyuanh@google.com> Merge "Fix formatting issue on Headset State Machine"
am: 61345026a7

Change-Id: I7058f53b20e94b75042ae1127e0a3b6f099d50b9
61345026a788c4226a375adedbc3ef53db30818c 17-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix formatting issue on Headset State Machine"
c303b43b314abb34284182eee839217469ac51cd 09-Mar-2017 Jack He <siyuanh@google.com> Fix formatting issue on Headset State Machine

Test: build, no user visible effect
Merged-In: I482661d95ac6e30a6f55afa9970627e889907125
Change-Id: I482661d95ac6e30a6f55afa9970627e889907125
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
dbc1c61208e493caa17888848e7290717bcb32ec 17-Mar-2017 TreeHugger Robot <android-build-prod@system.gserviceaccount.com> Merge "Fix formatting issue on Headset State Machine"
3659dee2b21c7f269a2bef051483093fe07e5682 09-Mar-2017 Jack He <siyuanh@google.com> Fix formatting issue on Headset State Machine

Test: build, no user visible effect
Change-Id: I482661d95ac6e30a6f55afa9970627e889907125
(cherry picked from commit 79ea359530515b27f608e52cc53f33d3797f7d4c)
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
c17583b8c79588cce0611c5e40900065fa0c982a 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "LE Maximum Advertising Data Length (2/4)" am: 4cee47de11 am: 9a6a474ca6
am: d45acd0053

Change-Id: Ie13b1b78b9b21349f6490d5256ae5597f220cd62
9a6a474ca6d2415b8b53ca24444a5c89945319b6 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "LE Maximum Advertising Data Length (2/4)"
am: 4cee47de11

Change-Id: I2a26d6eb8a9b8372dc2a171e798aec5f122794b0
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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
752c435ef8ea48a2a0b97d313c6183f52c942672 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 AdvertisingSet implementation (2/4)" am: 92b2f24308 am: b0cefb9617
am: a1c00d1c01

Change-Id: I021d704fb92c155a5520a39a8d174dbb897d3982
b0cefb9617e3e5911b78b82924672e65319f6821 17-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 AdvertisingSet implementation (2/4)"
am: 92b2f24308

Change-Id: I5d070edb82d2b1d51339bb68e9dc1fdb46e035e0
917f34e18aa235e68ac0663e24f52100e95970b7 13-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 AdvertisingSet implementation (2/4)

This patch wires up fist methods of AdvertisingSet, making it possible
to start advertising and stop advertising. It also replaces legacy
implemementation with calls to new implementation.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I35e7db5df1945d101402299f78dd541e346d548c
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/AdvertiseHelper.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
8bf42fb4386aecb590a96e4055889c4c6e2bba54 16-Mar-2017 Jack He <siyuanh@google.com> Merge "AdapterService: Do not call System.exit() on onUnbind" am: 5cc1112d65 am: 97669e3cf2
am: d1bd91c832

Change-Id: I646ae82b85c5573a52e526aeb9c2892ca5c7a8f1
97669e3cf2e6b46545096d249b759fb44ce3e138 16-Mar-2017 Jack He <siyuanh@google.com> Merge "AdapterService: Do not call System.exit() on onUnbind"
am: 5cc1112d65

Change-Id: I6893a7be8a7676092efdb5bf49921616aff041f8
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
luetooth/btservice/AdapterService.java
2c7e241ae35137020d00f686692e4f90883f8074 16-Mar-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast ACTION_PAIRING_REQUEST to everyone again" am: 71da1cf06b am: a670256bf7
am: 2c85a2fb29

Change-Id: Iff29d77430a3133aa7de135e20fc8f3afbce1e6c
a670256bf7dd5623d17b1b3bb2afd2806ebdcb5c 16-Mar-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast ACTION_PAIRING_REQUEST to everyone again"
am: 71da1cf06b

Change-Id: I57f8a7673d28fcbe1e60d51e192564bf13189682
ed7769f8ae926290325cc81aca25da5923d9870c 15-Mar-2017 Marie Janssen <jamuraa@google.com> Broadcast ACTION_PAIRING_REQUEST to everyone again

ACTION_PAIRING_REQUEST to be sent to all packages while new methods for
handling automated pairing are developed.

Test: AAP pairing && SL4A connection tests
Bug: 36024655
Bug: 35853357
Change-Id: Ib07adf5253c1e051ab2abc6e2ed711d8bbf107c9
luetooth/btservice/BondStateMachine.java
21ac25fb3b89c761fb2617f89554482337c57331 15-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix advertise data length parsing" am: 91dca83714 am: cb43fe1b20
am: 3f2cfb78bc

Change-Id: I27ba5edef65a75802455435d9355ca3c04b9ee9b
cb43fe1b20064cbe38518129656d89e35a056f85 15-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix advertise data length parsing"
am: 91dca83714

Change-Id: I8328e4b789189d7f3320418553d9a5f5957e35c2
a8c9c053dfe53df74934e1210b4c0cee521bf036 15-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Fix advertise data length parsing

Bluetooth 5 advertise data can be longer than 128bytes. The length bit
must be properly converted to unsigned value for such long data.

Bug: 36086416
Test: manual
Change-Id: I7449ea99be2e78dd60dd90ec607b74f2bb02d213
luetooth/gatt/GattService.java
1c4f03e514ec8ca79bce9a9041a5d82540561b91 14-Mar-2017 Andre Eisenbach <eisenbach@google.com> Merge "Initialize the Media Player list at start" am: af66394a61 am: 4120a36bb1
am: 139f67c496

Change-Id: I45eaadd89b962b2d9d1fd0339d61dc44490ce2f5
4120a36bb10879f6d3221ad161ca29e8bb8e2745 14-Mar-2017 Andre Eisenbach <eisenbach@google.com> Merge "Initialize the Media Player list at start"
am: af66394a61

Change-Id: I50bf13adf13e46737b6bc5ecc4bef1d5b01b446c
11bf73ff614f48a41dc379763bc007f271197b26 14-Mar-2017 Ajay Panicker <apanicke@google.com> Initialize the Media Player list at start

If the browsable list builder fails to receive any connect callbacks when
connecting to media services, we could be left in a state where the media
player list is uninitialized. This is fixed by always initializing the
media player list at the start of AVRCP.

Change-Id: I15088c1f4e8ffa2ac8a101339c9b47989fc17a5e
Fixes: 36151636
Test: Manually tested connecting AVRCP with AVIC-8100NEX
luetooth/avrcp/Avrcp.java
3b1061a2d6ffe13f84e3d813e4955c31d4c593fa 11-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 feature check implementation (3/3)" am: af78536ab5 am: 9163d2b20c
am: 52f852db81

Change-Id: If1646c29d60d3fe083f3dfbc8a79f65b9654a1ed
9163d2b20c0293b7f34bf91a9e8a57e08336680d 11-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 feature check implementation (3/3)"
am: af78536ab5

Change-Id: Ie3d08bc680f1e3a93fda7cf90d0d693f379104fb
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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
a8511da7a301d94b85c7ea07ba13c5b5c3e55f7b 10-Mar-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP PropertySelector" am: e0f2564001 am: f6bfa2ab47
am: c7cf507694

Change-Id: I093436dd9bcc306362ba0f25dbfd90e92cb78144
f6bfa2ab474f9cef46919a1db7119c0402372c6a 10-Mar-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP PropertySelector"
am: e0f2564001

Change-Id: Ic85da3fffa537ec1651ea517ff7c8a0c41470009
ea6f5c72ed023255dd2350b4727c1c02dc33c04c 09-Mar-2017 Srinivas Visvanathan <sriniv@google.com> Updating contact extras in Unread-msg broadcast

- Contact uri/name are sent as string instead of string-array.

Bug: 33280056
Test: Manually
Change-Id: I4221c2a529009d02135dcfb8d15262bd5129a08b
luetooth/mapclient/MceStateMachine.java
33e2ea9f0756c2dc4f8dccd712e38b860a694922 01-Mar-2017 Joseph Pirozzo <pirozzoj@google.com> PBAP PropertySelector

Fill out and transmit the PropertySelector when requesting to download
the phonebook. Although the PropertySelector field is an optional field
and the default behavior is well specified when it is absent, some
phones do not adhere to the specification. By sending the
PropertySelector field we can improve interoperability and eliminate
unneeded data.

Bug: 35322439
Change-Id: I25bcfce8bf4c7648c7cc07387bf02ebef600cf44
Test: Verification of filter bits set in wireshark and successfull
transfer of contact images, names, and numbers.
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PhonebookPullRequest.java
fc7baa33a7590237fe8cbea234fe3d0c8c7dc502 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Use fixed size scan response data" am: cc295bbfee am: ece2d59522
am: 42466fc833

Change-Id: Ib3fc7e69c7e218623f05274100657f38284013ab
ece2d59522de439feb5d959d6deefa49a6d7323f 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Use fixed size scan response data"
am: cc295bbfee

Change-Id: I83c212284fe05204ed25bf02c2a2a73221487c71
3ae219d81403f905ed4efc3b6071acae075e7660 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Use fixed size scan response data

We used to return fixed size scan response data before commit ed3417a6,
and some applications rely on this behaviour. For now make sure that all
apps get fixed data.

Bug: 36003118
Test: manual
Change-Id: Ieff1a933c01e7fcb0ae36f740048ccba2b3481b9
luetooth/gatt/GattService.java
c38bf613d601a6b95eeaa91f22c4adf7d04bf9b0 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 Advertising API"
am: dcffb67e16

Change-Id: I28998dc9ff77349eb219d0511ca8af797fd10c4f
86508a4a5b0abd7e074eccfb36f69b6799a206ab 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 PHY change API"
am: d3e9d9f8b1

Change-Id: Ia9e2375ba0138e78077f4b4b7f9fac6ef8b65e9f
5bb6c3f0e8efaeaf92082e8414859eda1bf513a6 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 periodc scan API (2/2)"
am: d84aac6a34

Change-Id: I322c05d22c1cbfeff33f9fa7238b001071c58269
b8d9dd85f20a08631e1a4366f86bb18815dd4c68 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Propagate Bluetooth 5 scan result properties"
am: 30241a4d72

Change-Id: I4fbbec83552071bd756b8aabd43d3e62b94874bd
d5a798f579fdc89f39849c6843abfa4237192ac9 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 feature check API (2/2)"
am: b52e56f18b

Change-Id: I481dc74b86858e185798e65a48393470fc4d1496
ba699eadbd14de6561e65950adf6f4ad02546c52 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 Advertising API

Bug: 30622771
Test: manual
Change-Id: I3a670756e26345833ce595c9b22b8b39ae0ba41f
luetooth/gatt/GattService.java
21013566d951befa7a129f3e8e2f62c5ba401ebd 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 PHY change API

Bug: 30622771
Test: manual
Change-Id: I859d23e7db95585551675d09c0b009222a475dd2
luetooth/gatt/GattService.java
04feee00681f5ca88480a6700e1d6e4baf69293e 01-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 periodc scan API (2/2)

Bug: 30622771
Test: manual
Change-Id: I2bde2072f55949b195b64e0ce333a40b4f6d6673
luetooth/gatt/GattService.java
f37eca417f424c4900a48b8d95d10178cab5c543 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Propagate Bluetooth 5 scan result properties

Bug: 30622771
Test: manual tests
Change-Id: Icbb353aa3435a97035c81384fc9031175a934239
luetooth/gatt/GattService.java
c9456d3d91fc683a41354e16d1d4259323c8f032 08-Mar-2017 Srinivas Visvanathan <sriniv@google.com> Merge "Including Handle in Unread-message broadcast"
412c7264674341300bc1cb2bfbd8bcda92d468ee 08-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 feature check API (2/2)

Bug: 30622771
Test: manual
Change-Id: I90e2efe989745c07c2f2fb8f4ea5bc3b718382f6
luetooth/btservice/AdapterService.java
b1ad50fe30850472d91c86ec6c36763c243e4975 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 Advertising API

Bug: 30622771
Test: manual
Change-Id: I3a670756e26345833ce595c9b22b8b39ae0ba41f
luetooth/gatt/GattService.java
42cb5bfd06eacca873c2afc921738c5af8fd77f2 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 PHY change API

Bug: 30622771
Test: manual
Change-Id: I859d23e7db95585551675d09c0b009222a475dd2
luetooth/gatt/GattService.java
38a94db541f5eb50982d51d93fc594dd2b07b40e 01-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 periodc scan API (2/2)

Bug: 30622771
Test: manual
Change-Id: I2bde2072f55949b195b64e0ce333a40b4f6d6673
luetooth/gatt/GattService.java
f1a86cbf7b3268ba61851559b8869adca56999e6 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Propagate Bluetooth 5 scan result properties

Bug: 30622771
Test: manual tests
Change-Id: Icbb353aa3435a97035c81384fc9031175a934239
luetooth/gatt/GattService.java
ff9923489b7fb87b4fbd9a5ffb9b9a8e9079a0cf 08-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth 5 feature check API (2/2)"
97e134ff5c6add04c454e052f817e2e155d1e5a0 08-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Add OPP 1.2 feature." am: 3361ec466c am: d92e77006e
am: 30c1788597

Change-Id: I33a72bf2526a869f90fd213d52622fa4373859ae
d92e77006e7f60ff4580a65eceeaa22b5e0d751b 08-Mar-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Add OPP 1.2 feature."
am: 3361ec466c

Change-Id: I861f5aecb8721baa8cc7a8ffd4e215f0d9de1ddd
20a83dc11d22f3de0accaa0957c94c5b14496f88 08-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Bluetooth 5 feature check API (2/2)

Bug: 30622771
Test: manual
Change-Id: I90e2efe989745c07c2f2fb8f4ea5bc3b718382f6
luetooth/btservice/AdapterService.java
926eccc4833e86ba491efa651c5072fe3226b00c 07-Mar-2017 Srinivas Visvanathan <sriniv@google.com> Including Handle in Unread-message broadcast

- Including Handle in Unread-message broadcast. Clients can use this to
identify messages within a session.

Bug: 33280056
Test: Manually
Change-Id: I7b1d6f6e4016c4c8ecfe60345df052f3732d45f5
luetooth/mapclient/MceStateMachine.java
luetooth/mapclient/obex/RequestGetMessage.java
4aa5e4e2fe52c06d97481db0bf180349053dae48 16-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> OPP: Add OPP 1.2 feature.

Add changes to support OPP 1.2 which uses OBEX over L2CAP.

Test: Connect with Remote OPP Client supporting OPP 1.2 and verify
that connection and transfer happens over L2CAP. Connect with Remote
OPP Client supporting OPP 1.1 and verify that connection and transfer
happens over RFCOMM.

Bug: 33010988
Change-Id: I44c2f2f01fb04f4306d0eb121d66dc08954966c0
luetooth/ObexServerSockets.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/sdp/SdpManager.java
564b35e8f2ef5dd0015a49f1e52ea94dc0a42068 02-Mar-2017 Srinivas Visvanathan <sriniv@google.com> Updating fields in New Unread-message broadcast

- Including BT device that new message notification is for. This will be
helpful for messaging apps that need to handle incoming messages for
different possible devices. When a device disconnects, all messages
persisted from that device can be wiped.
- Switching extra used for sender fields. Using *RECIPIENT* fields was
confusing and hence switching to new *SENDER* fields defined in
BluetoothMapClient.

Bug: 33280056
Change-Id: I6bf410315801eeb7e869e86b807c8261e4ffae3f
Test: Manually
luetooth/mapclient/MceStateMachine.java
7e0bfa88762d8bb080705dc00c503ce25e1a8b98 23-Feb-2017 Amit Mahajan <amitmahajan@google.com> Merge "Exception and death notification handling for ISap." am: f2f1ecd69e am: f598dcd6b5
am: a909908155

Change-Id: Ia7487f95c4dda08c28b1ddb8e22baa5c32750f13
f598dcd6b545383732b3784f24fc4a0960d96d09 23-Feb-2017 Amit Mahajan <amitmahajan@google.com> Merge "Exception and death notification handling for ISap."
am: f2f1ecd69e

Change-Id: I83c55cc4d32d812415b164f89bffdbe58bb562ea
f2f1ecd69e42b9abf05a9b46779e29cda643c946 23-Feb-2017 Amit Mahajan <amitmahajan@google.com> Merge "Exception and death notification handling for ISap."
c33526f6999a5a8f74f40e2cbc9b480e8e3a9303 21-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "HID: Send connection state change broadcast during cleanup" am: 71f903cb3d am: 99c2b9f8fc
am: 959b195532

Change-Id: Ic89efbc6ffdc506a2c1bc322cec200a688f2da0e
99c2b9f8fcf1d7344edf3d800dd513bc1e5e5cae 21-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "HID: Send connection state change broadcast during cleanup"
am: 71f903cb3d

Change-Id: I35985711ac5708e021826a18a77ea3048d7bf829
c074ef3847cc28679509edd550c5d2a7f93268aa 02-Nov-2016 Hemant Gupta <hemantg@codeaurora.org> HID: Send connection state change broadcast during cleanup

Usecase:
1) Connect HID device with DUT
2) Turn Off BT

Observation:
HID state change is not received by application leading to
application showing connected even when BT is turned off and
HID was connected.

Rootcause:
HidService does not send state change to application if BT is turned off
while connected

Fix:
Send broadcast for HID connection state change during cleanup.

Test: Verified that connection state change intent is received by upper layers
during BT off if HID was connected.

Bug: 35013637
Change-Id: I5d7989887f9089876c78e43d97d066f384cc237e
luetooth/hid/HidService.java
a8e818c943d9b2046de1b61aaaeac877d87697ea 18-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Send ACL connect/disconnect broadcasts to manifest receivers"
512617997d76560cfcac1069495dff0c5d675654 18-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "PBAP: Fix Functionality failure for PBAP" am: fe641c1e38 am: 8e2b8940f1
am: c7b31065a5

Change-Id: I141ddc56865b9ee8ba204643278a86a935df1793
8e2b8940f1cff90d9cbd3d28decd2dd5d94f8963 18-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "PBAP: Fix Functionality failure for PBAP"
am: fe641c1e38

Change-Id: Ide835f7a3eb1dab26b7c9adff0a0b1710c9cff22
fe641c1e3817918c6673ad6fe1d88c21447edd77 18-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "PBAP: Fix Functionality failure for PBAP"
e7f838d89352ad39b3840311b4a40d4d7ef48e2f 17-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Fix Functionality failure for OPP Rx" am: 2cc49b962d am: 8977c829a4
am: 1fd8408561

Change-Id: I1d76f76332969ee5a17850b38a40faaa0f7f19eb
8977c829a481ec1d4d1dcd7f6dd7405445bb7a66 17-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Fix Functionality failure for OPP Rx"
am: 2cc49b962d

Change-Id: I6c139e1ca1e94dc8eeaaaf95912f56aed35474dc
b6bab63f4f973cfeda914f1fd3ee58fe0d922926 17-Feb-2017 Christopher Tate <ctate@google.com> Send ACL connect/disconnect broadcasts to manifest receivers

Bug 35403302

Change-Id: Ib2a9c177ec86f1a19ff26537da84f587c1d5270c
luetooth/btservice/RemoteDevices.java
8711aafd89ae152e9c8f228a21e52ba4fbdafd59 17-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> OPP: Fix Functionality failure for OPP Rx

Usecase:
Send file from Remote BT device to DUT

Expectation:
File should be received properly

Observation:
File reception popup does not occur on DUT

Root Cause:
Socket listener not started for OPP

Fix:
Add changes to properly start listeners for OPP

Test:
1) Verified that SDP records for OPP are exposed and can be browsed
by remote OPP Client.
2) File can be received without issues from OPP Client.

Bug: 35416619
Change-Id: I5b4f343f3fd7b957ce423ce2cb76cd0683e10c3a
luetooth/opp/BluetoothOppService.java
44c14217776ec48dc02fd8f25a60b7fcd193d92d 17-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fix Functionality failure for PBAP

Usecase:
Connect to DUT from PBAP Client (Carkit)

Expectation:
Carkit is able to browse PBAP SDP and connect to PBAP Profile
with DUT

Observation:
PBAP Connection is successful

Root Cause:
Socket listener not started for PBAP

Fix:
Add changes to properly start listeners for PBAP

Test:
1) Verified that SDP records for PBAP are exposed and can be browsed
by remote PBAP Client.
2) Connection happens fine and phonebook can eb downloaded properly.

Bug: 35416619
Change-Id: I52acb1c10b91dd5ffecc44badcfd60f0e27b0a55
luetooth/pbap/BluetoothPbapService.java
a176898857c96029d1d0838babb8db287ad70523 17-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast BOND_STATE_CHANGED to foreground." am: 6d3498fba2 am: 0864a05422 am: 90e812968b
am: cd875f04a9

Change-Id: I970eac7670f0600d76579a16f813398d3f54ad25
90e812968baead0adca392486afd2143bc84df98 17-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast BOND_STATE_CHANGED to foreground." am: 6d3498fba2
am: 0864a05422

Change-Id: Ia9999e7976b1b931637af472178df20ccf9ad489
6d3498fba2d74950cf4961c8d841c92a205e8165 16-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast BOND_STATE_CHANGED to foreground."
fc8677faf32ae6a2a6d132c9754c28aab6a9148f 15-Feb-2017 Marie Janssen <jamuraa@google.com> Broadcast BOND_STATE_CHANGED to foreground.

Limiting BOND_STATE_CHANGED to settings app meant accessories apps can't
determine when a device completes pairing.

Test: pairing tests with various devices
Bug: 35234069
Bug: 35325574
Change-Id: If9fffb3410ec051b96e65b867571e93ae56ca706
luetooth/btservice/BondStateMachine.java
73b643d20a5c20f370845569ccffd1fa6b634413 15-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Prevent getting Session Token if media browser isn't connected" am: cda194ce36 am: 5dd802d8d7 am: a0c275a817
am: 1c5ad86437

Change-Id: Ieafc0e19e7c019d54e5de67ecfd5ac8aac4270a1
a0c275a8179073cc9e00c50eed06187795638d9e 15-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Prevent getting Session Token if media browser isn't connected" am: cda194ce36
am: 5dd802d8d7

Change-Id: I2872bfbd6e7dcc64aa9a22629c4ef2125a1a968a
e03b71ad9c4c89ab36f836145d90120c6457479e 14-Feb-2017 Ajay Panicker <apanicke@google.com> Prevent getting Session Token if media browser isn't connected

Bug: 35348574
Test: Sanity test browsing with VW Carkit
Change-Id: I795a19f4bd0a95d36f64bc767fdeda108c20f5ed
luetooth/avrcp/BrowsedMediaPlayer.java
a11b41371f21dbf4865863e5d8dbc4b9fa8f8c5c 14-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Services: start PBAP and OPP like other services" am: 14280ec46c am: 6686a52270 am: 4701d38aa1
am: a5e304fc5d

Change-Id: Ied6cd2949a4853e1a1bf8c8f5692d2742c12b872
4701d38aa14da59bfa48d588826be716e5e5f0c0 14-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Services: start PBAP and OPP like other services" am: 14280ec46c
am: 6686a52270

Change-Id: If279435e68c4f8bd65487ab3cbd7f1a73a94bc21
72d0629dfc5db8ae48a512b47aa384f42b9ed71d 07-Feb-2017 Marie Janssen <jamuraa@google.com> Services: start PBAP and OPP like other services

PBAP and OPP are currently normal services that are started and stopped
by the system. Have AdapterService start them just like all of the
other profile services instead.

Bug: 34395439
Fix: 35216901
Test: connect to a carkit that does PBAP
Test: use beam to receive a file
Change-Id: I84e769886f6aa4e698bd07fb9900f124111b50b3
luetooth/btservice/Config.java
luetooth/btservice/ProfileService.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
5c01e8796f5ff6f9dfed215160612ac91493c9f1 13-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "Remove use of Contacts.IN_VISIBLE_GROUP" am: c8a531ab45 am: 2a5a9bee6e am: 29621d90da
am: 341400874e

Change-Id: I7fa86fa7fe95fda46228269a8ed3ea2fb3e3cdac
29621d90da6724c3a0c948a5bc616f288f9b1ebb 13-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "Remove use of Contacts.IN_VISIBLE_GROUP" am: c8a531ab45
am: 2a5a9bee6e

Change-Id: Ia59221960abf72d4fb231b9b44c36773ec740081
e93237d7f3ef9d50a6791708d3ad903e66aa7248 13-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Use resources for pairing ui package" am: 5c72d9a85a am: aa6795b9c9 am: 13cf7aa3d9
am: 028d19f5ad

Change-Id: I73c03f386f1626bf5463060fc3af8b6f8c666cb7
af64b66d0705f8e1f5b7d20a56f8f6997b60093a 13-Feb-2017 Amit Mahajan <amitmahajan@google.com> Exception and death notification handling for ISap.

Test: Basic telephony sanity
Bug: 32020264
Change-Id: I3d710fc59a397fe0054b286d422066f9ff149262
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
4f259e9aa3a3dbcef758902fe0769f584001f50b 11-Feb-2017 Hemant Gupta <hemantg@codeaurora.org> Remove use of Contacts.IN_VISIBLE_GROUP

IN_VISIBLE_GROUP is a column that should not be used by Bluetooth
and is only relevant for the Contacts App.

Change-Id: I05866ccdfd565643564bf4217a4dfaf196e26d16
Bug: 35013623
luetooth/hfp/AtPhonebook.java
13cf7aa3d997f333a82791b172f078e04d0c4743 13-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Use resources for pairing ui package" am: 5c72d9a85a
am: aa6795b9c9

Change-Id: I4e6c039d0e7bd3f3090f333bc83e64ffdbd644c6
5c72d9a85ab99f254cedfcd9a29a6686d121ea38 13-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Use resources for pairing ui package"
e38e481a756b0eeb50f72f6f9f3252046c65087b 11-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Use END:MSG to determine bMessage body end" am: cdc1edbe64 am: 883b0a1086 am: c68cf9dd22
am: 1a3401df72

Change-Id: I0685a8d0f8cc8890293b94556cf913590fff3763
c68cf9dd2271a7142e6bd69d83dd54f3c7fd7a7f 11-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Use END:MSG to determine bMessage body end" am: cdc1edbe64
am: 883b0a1086

Change-Id: I126162e0954c6be7cd4d60dc7e79a77fc901e36f
da6bccfffb75e8452faafa8906082dc192cd7ce9 07-Feb-2017 Ajay Panicker <apanicke@google.com> Use END:MSG to determine bMessage body end

Use END:MSG to determine the end of a message body instead of using
an incorrect length that was sent by the carkit,

Change-Id: Idf93a6fec50755ad5e9433e237ebca242e2d83aa
Fixes: 35102373
Test: Send multiple messages from Chrysler carkit and TestTracker:75287
luetooth/map/BluetoothMapbMessage.java
aed51b5e1151240567d990bacff01b66572fd45b 10-Feb-2017 Marie Janssen <jamuraa@google.com> Use resources for pairing ui package

The pairing package is set to "com.android.settings" which means
overlays can't change the package that's responsible for UI interaction
when pairing and access request events happen. Move it to a resource.

Test: pair a device, initiate pair from remote
Change-Id: I5731bcdcfed58b72b4e15e3e60035c7e8144b7d4
Bug: 35163738
Fix: 35219650
luetooth/btservice/BondStateMachine.java
luetooth/btservice/RemoteDevices.java
luetooth/hfp/AtPhonebook.java
luetooth/map/BluetoothMapService.java
luetooth/pbap/BluetoothPbapService.java
luetooth/sap/SapService.java
c38b6da77ffb536de6135f7c15eac07fa88c37f3 10-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Conference calling crash on null call object"
90ecb737f15de886ec646e66f5099d608b87d418 09-Feb-2017 Christopher Tate <ctate@google.com> Send Bt connection-state-changed broadcasts to manifest receivers

Connection-state notifications are intentionally allowed to launch apps
that have subscribed to them.

Bug 35207510

Change-Id: I8d2c9ff53f7338e3f7f43cdde9419cc29aaaab22
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
906b7250b6f57f2dbfb5daca8915db81f584725b 09-Feb-2017 Sanket Agarwal <sanketa@google.com> Conference calling crash on null call object

After conference call ends there are some NPE happening because the call
is being accessed after getting destroyed. Check that underlying call
object is not NULL

Bug: b/34983172
Test: Hangup conference call from CarKitt
Change-Id: I08bfc5478a4dce4e608d7dc5cf9688b65fbc6637
luetooth/hfpclient/connserv/HfpClientConnection.java
30b9b7738f1096cd85417c7d784947763e03c7b3 09-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Abort fetching items if remote sends us an error" am: 60a720c650 am: bc391cebd1 am: bb76e31813
am: 8e7219fff3

Change-Id: I492cc3585f9d60152a5a1055627ce8285dd3dc40
5674ca7041c11d2f9ca6a5b390600e932e2c8cba 09-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast pairing intents to settings package" am: d5cedd37c6 am: edbc3ed61e am: 43a12fbba6
am: 0acca779d4

Change-Id: Id46f737de88db91087e5df037728a252dd05f8bf
bb76e31813184f2dc1c36b89810d41485176d33a 09-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Abort fetching items if remote sends us an error" am: 60a720c650
am: bc391cebd1

Change-Id: Ib00e7a6023a9cde72bd17f115b11c022835bda67
43a12fbba67007f9d4b97c4c7eeca0f7ac542bf3 09-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast pairing intents to settings package" am: d5cedd37c6
am: edbc3ed61e

Change-Id: Ifa6c734384fe2d64cf9f4d9c08992a07daca4a5f
60a720c6507ed8ef5daea6a87e095b74caf494f1 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Abort fetching items if remote sends us an error"
d5cedd37c6a294bec25bc986233aaf3de0c52692 09-Feb-2017 Marie Janssen <jamuraa@google.com> Merge "Broadcast pairing intents to settings package"
3f360ed6148acc534ca6d790ed1b0486c6b3d65a 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Handle conference calling w/ multi device" am: f5c91a8e85 am: bec8c58b4d am: c4fcf42203
am: 354ec8b76f

Change-Id: I113fd5c9eb3c992595af17ae6a712c142f18575a
eaf14d30927109da6029700ce25303fde844ca9b 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Handle volume changes for multiple devices" am: 527cd9597f am: 6a4ab73f09 am: 8027fbac9f
am: cc7e54690b

Change-Id: I44a3a79ca188f61f10381d50ec2692ed5674eab3
c4fcf4220380d1cb0ee95cd85f68cb02270777a2 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Handle conference calling w/ multi device" am: f5c91a8e85
am: bec8c58b4d

Change-Id: I34d7c4240998f18ad1c6fe1727f98f2e423e9c3d
e5df60ac54d1d5d868f6fb674bc493fec144305f 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Abort fetching items if remote sends us an error

Currently most of errors from stack for GetFolderItems response come
back in form of a empty response list. Since we keep looping to get more
items, we often get stuck in a loop. Aborting is the right thing to do
here

Bug: b/35152188
Test: Try browsing over a folder which returns an error (not Out of
range) when trying to browse

Change-Id: I69bb90da71c55d46c04eaeab5a78026f22be9e02
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
f5c91a8e850b4b214a855113a3f5a3692780d05e 08-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Handle conference calling w/ multi device"
8027fbac9f23e0c88cec7d0bf2af5766db30d0f8 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "Handle volume changes for multiple devices" am: 527cd9597f
am: 6a4ab73f09

Change-Id: I5de70bdc9d51e9bfd91eaa2bc30fe3ad3c853125
527cd9597fa9cbdbf6d62d597a9cc90f485b7748 08-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Handle volume changes for multiple devices"
e0466c0155cfd92f195786e21e197bc7c6ba9497 08-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Remove use of Contacts.IN_VISIBLE_GROUP" am: bdb6f925a4 am: ffbc02aaea am: fa24aecf0d
am: c7917c831e

Change-Id: Ic56625974ff55751aae596232e0d3a29f2315899
fa24aecf0d8d40f708197cf61ab552ab5da5171f 08-Feb-2017 Ajay Panicker <apanicke@google.com> Merge "Remove use of Contacts.IN_VISIBLE_GROUP" am: bdb6f925a4
am: ffbc02aaea

Change-Id: I02e6c568320f8274ac37981b8acea57ea21fa428
515626a94a01807a5a9d49af9a8cdb1be6251808 08-Feb-2017 Sanket Agarwal <sanketa@google.com> Handle conference calling w/ multi device

Bug: b/34983172
Test: Make a conference call and hangup (hangup should not crash the
stack)

Change-Id: I5b9707e227071acfe13ebad1575fc12d22087f81
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
93d129a2679021c3275ba940405ba2609853b9ee 07-Feb-2017 Sanket Agarwal <sanketa@google.com> Handle volume changes for multiple devices

Since synchronizing volume of multiple HFP connected devices is rather
cumbersome as a UX, we will make the car control the volume of the call
and the phone's volume will remain unchanged. The only scenario that
this breaks is when the user is trying to change the phone volume while
being in a call and connected over Bluetooth. This scenario should
anyways not happen for dirving safety

Bug: b/34518638
Test: Volume change w/ multiple AG connected to HF
Change-Id: Ic4345a71bfb677f94cf6543b1b2c64fb99676ed3
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/NativeInterface.java
4ca05d6f02264b0eb2983e43d34ca4051434a4d4 07-Feb-2017 Ajay Panicker <apanicke@google.com> Remove use of Contacts.IN_VISIBLE_GROUP

IN_VISIBLE_GROUP is a column that should not be used by Bluetooth
and is only relevant for the Contacts App.

Change-Id: If7dc10a899ce820f61758dea8346b780319ed994
Fixes: 35064907
Test: PBAP sanity test with Ford Carkit and TestTracker:75170
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
9cdf0e2181334e8afd949b7060ca89172844437c 07-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "HF Client: SCO routing for multiple devices" am: 2e3cd65d5e am: ff0687091b am: c183f468c3
am: aa744e0385

Change-Id: I493080a250035388c1ad2018acfc71d3f16ea8ae
c183f468c3fa092caa481275fb27e55f05ab25fc 07-Feb-2017 Sanket Agarwal <sanketa@google.com> Merge "HF Client: SCO routing for multiple devices" am: 2e3cd65d5e
am: ff0687091b

Change-Id: Ic3db4e2173abd6e6078c34c3a870eecb081a32e5
fb7703a90e8a408f9032fb1ea86888087f8df52e 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Propagate BT5 specific scan result properties up the stack (3/3)" am: f609494e26 am: 08595859ac am: a0d24f8f39
am: 7391ff6219

Change-Id: I31704d8fd1d733497b6adee52cf29a68a9324992
434c2f1a75997c28e898eebf417fc7454a7d881f 07-Feb-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism to configure the default A2DP codec priorities" am: db5851f52a am: b96199f74f am: 435317f88a
am: 414bdc649c

Change-Id: I2f62260dc8ad98ddc19a2fe6f44a260e9bf09203
2d9c62894634e9c4aa947ddf2cc50f4482163cf1 07-Feb-2017 Sanket Agarwal <sanketa@google.com> HF Client: SCO routing for multiple devices

Bug: b/34518638
Test: Manual testing w/ multiple active calls and SCO switching

Change-Id: Ic5e2dc8da69ee6c0e93a8b57a5f41a26b7b09513
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
a0d24f8f393903050cccd1a7bee948c223db7772 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Propagate BT5 specific scan result properties up the stack (3/3)" am: f609494e26
am: 08595859ac

Change-Id: If20fb31e69b76da17ca638a1c021a1bebaca664e
f609494e26f09a0e0a537768f4a41220c46916e0 07-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Propagate BT5 specific scan result properties up the stack (3/3)"
435317f88a44a82da299d7949fd54607683deef0 07-Feb-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism to configure the default A2DP codec priorities" am: db5851f52a
am: b96199f74f

Change-Id: Icbcefe85e3f0e28ad9b4015547204c836f307e10
ad71e23e009fc9a808db3547bcb3e1923f87aeaa 30-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Propagate BT5 specific scan result properties up the stack (3/3)

Bug: 30622771
Test: sl4a FilteringTest
Change-Id: I0afb900871cbc2f556ad506e21515e4ca8c49142
luetooth/gatt/GattService.java
8a9f762c80d436719375de5d5f83c1c11e9f5723 02-Feb-2017 Pavlin Radoslavov <pavlin@google.com> Add a mechanism to configure the default A2DP codec priorities

Previously, the relative codec priorities were hard-codec internally.
The new mechanism uses the following configurable resources in
packages/apps/Bluetooth/res/values/config.xml to re-assign the
default codec priorities per device, or to explicitly disable a codec.

- a2dp_source_codec_priority_sbc
- a2dp_source_codec_priority_aac
- a2dp_source_codec_priority_aptx
- a2dp_source_codec_priority_aptx_hd
- a2dp_source_codec_priority_ldac

Those values are assigned on startup.
Also, they can be changed per device by using an overlay:
device/<VENDOR>/<DEVICE>/overlay/packages/apps/Bluetooth/res/values/config.xml

Test: Manually streaming to a headset
Change-Id: Ic3cf8549b46547dbeba93632c3178c6b7f2b810d
luetooth/a2dp/A2dpStateMachine.java
fbdf4f223574f48f8f3db83ea88e063a7551f799 20-Jan-2017 Marie Janssen <jamuraa@google.com> Broadcast pairing intents to settings package

Intent broadcasts intended directly for pairing dialogs should only be
specifically targetted to those packages.

Bug: 34395439
Test: pair a device, pair a device remotely, and connect devices
Change-Id: Ieb1354d534d4dc0457279aa3f1d3020b3a3ee37b
luetooth/btservice/BondStateMachine.java
luetooth/btservice/RemoteDevices.java
luetooth/map/BluetoothMapService.java
luetooth/pbap/BluetoothPbapService.java
luetooth/sap/SapService.java
ff6c27d74172b1b9bb81bdc4658e5a710a1e6446 02-Feb-2017 Amit Mahajan <amitmahajan@google.com> Merge "Client changes for BT SAP hidl." am: f856d7942f
am: ff6120a8bc

Change-Id: Iad9703807e0f11e400ccfa74e815aeea4b10cdff
549c5a7e95c7934d8d3ab10a8653564e42b0c937 11-Dec-2016 Amit Mahajan <amitmahajan@google.com> Client changes for BT SAP hidl.

Test: Basic SAP sanity.

Bug: 32020264
Change-Id: If001ff221e3240a31cfbb08df11cbf6188ebd07e
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
28ad49c7ebc69a0a3568d76d4514249b1d516008 31-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Update the A2DP Codec Config API" am: 0c5e1e15fa am: a50737f724 am: 526bb3ca92
am: 5afbb6aef7

Change-Id: I43ea78a15ce526364406c8f15a6d8a8dd4532896
526bb3ca925269f50d507521f4b05f79d7294506 31-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Update the A2DP Codec Config API" am: 0c5e1e15fa
am: a50737f724

Change-Id: I3e22d30a3c8057358ffc493239b6d1a156b0ef68
08d3925d3d72837e6f86c9e0beaed5f7b813ea37 26-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Update the A2DP Codec Config API

Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
1. The current codec config
2. The list of codecs containing the local codecs capabilities
3. The list of codecs containing the selectable codecs capabilities.
This list is the intersection of the local codecs capabilities
and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
* Added new class BluetoothCodecStatus that contains the extra info:
current codec config, local codecs capabilities and selectable
codecs capabilities
* Renamed method getCodecConfig() to getCodecStatus() and return the
corresponding BluetoothCodecStatus object.
* Updates to class BluetoothCodecConfig:
new methods isValid(), getCodecName(), and updated toString()
so it is more user friendly
* Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
EXTRA_PREVIOUS_CODEC_CONFIG.
The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: I18536cffc5c73abc31c3d6afa54f9d3c3b1d577e
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
30e7dcff41df9f65e736e3a7bb26e52c0fc130bc 30-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AdapterService: track last discovering timestamp" am: 9f230a5591 am: 42ecb419fd am: db09bdd069
am: b026115e97

Change-Id: If4575310e6e57b21c64cb2ffab287f51f1cabfe3
db09bdd06948235287800799d620a131a176f2fe 30-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AdapterService: track last discovering timestamp" am: 9f230a5591
am: 42ecb419fd

Change-Id: I191c55e041ace98b88313d05d0e1b298751c31fb
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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
70cc1e8d1a2386eb465bdb2cdfa1414defea4b21 27-Jan-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "A2DP Audio Focus" am: 705f8de019 am: 02af7401ff am: 0ecc58866d
am: f77a5f8d19

Change-Id: I30fb3699c53f89983337c6541393b052fb74bfa9
0ecc58866d2ba81586742b769bb69648ae26b6e8 27-Jan-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "A2DP Audio Focus" am: 705f8de019
am: 02af7401ff

Change-Id: I32089ea4180d5feccbd3b1e2caa3096911ea7600
b591f3801c7de7a12e52f47483e8c2a714c7c131 25-Jan-2017 Joseph Pirozzo <pirozzoj@google.com> A2DP Audio Focus

Update A2dpSinkStateMachine to handle audio focus for notifications and
navigation. Simplified state machine to boolean flags to track user
intent and availability of audio stream and audio focus.

Bug: 31215324
Test: Manual music streaming, navigation, and assistant. Tested
navigation, assistant and music streaming with phones from several major
manufacturers. Tests were to verify proper transitions in both audio
and playback state while music was playing locally and streamed via
Bluetooth. Additionally b/34722788 was written to capture unit tests.

Change-Id: If8e89588ca24bdedf2c57c989f8a960353ccbe9a
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamHandler.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
69ba6ad9dd4b8855692493eacd96ce10a789db3f 25-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Init JNI in Bluetooth Service not the Bluetooth State machine" am: 08cd928d03 am: 233b926489 am: 91ad5d6d1d
am: e95a72a1d9

Change-Id: Ic9ff54a8f308d8abba539f85b0848b2b9848eab7
91ad5d6d1dd5a0fc830f2cb003c57c8845940350 25-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Init JNI in Bluetooth Service not the Bluetooth State machine" am: 08cd928d03
am: 233b926489

Change-Id: I817e4c9a5e148af07aba764c3a480d0d5b190d64
727dc7918318d01b5f2308e55038b7fcba7765f8 24-Jan-2017 Sanket Agarwal <sanketa@google.com> Init JNI in Bluetooth Service not the Bluetooth State machine

Since we can have multiple state machines the right lifecycle management
should be done in the Bluetooth service with start and stop operations.
Otherwise, there could be JNI crashes, due to JNI callbacks before the
JNI is setup.

Bug: b/34681827
Test: Connect device over HFP and make a call
Change-Id: I3ebe9d035511ca830f131d5b09461ecccfcc4672
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
053981b483699c79ef40d1e3e74eaa8a04e5df7c 24-Jan-2017 Andre Eisenbach <eisenbach@google.com> Merge "Ignore ACTION_UUID intent when no uuids present" am: 613fe46161 am: 45cb6a47fe am: e36b3e406d
am: 1ad91a1311

Change-Id: Ia827ca53cc8331a53328effa430d4cb6db055265
4b4ab34efa3e4b576fd463beaf88ec8903f4ecc7 24-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Multi HFP connection handling"
e36b3e406dd0bd00b557c3b5b0b00163d387630e 24-Jan-2017 Andre Eisenbach <eisenbach@google.com> Merge "Ignore ACTION_UUID intent when no uuids present" am: 613fe46161
am: 45cb6a47fe

Change-Id: Ife45600307828c8e4bae766c437b6ed4dcc12ffc
0068bdad22ffd70c90de67b6e85c8a0dfa838d90 24-Jan-2017 Sanket Agarwal <sanketa@google.com> Ignore ACTION_UUID intent when no uuids present

When no uuids are present, parsing UUIDs throws NPE in PhonePolicy

Bug: b/34640345
Test: Manual test by trying various devices. Follow up unit tests
required

Change-Id: Ibe54ea7b62b644ba1d92ef4f1d850c09113875af
luetooth/btservice/PhonePolicy.java
63b19b09500efc4301f5d69b85e0e3e60b484c03 14-Dec-2016 Sanket Agarwal <sanketa@google.com> Multi HFP connection handling

The basic handling mechanism is to create multiple state machines for
each connection. We route the upper layer (application) and lower layer
(callbacks) appropriately depending on the BluetoothDevice.

The following are implemented:
-- StateMachine creation (garbage collection/deletion still needs work)
-- Device awareness in service to route the messages
-- Cleanup of code and creating a new class for handling native messages

You can do the following with this change:
-- Create multiple connections (simultaneously)
-- Tear down connections

Bug: b/33554547
Bug: b/30984220

Change-Id: If08f24f744b046a393e836c99fcf2288fd698cc2
(cherry picked from commit 98c5bfdf980d573042bec06588b7e6ddfc48d054)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/HeadsetClientStateMachineFactory.java
luetooth/hfpclient/NativeInterface.java
luetooth/hfpclient/StackEvent.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
luetooth/hfpclient/connserv/HfpClientDeviceBlock.java
5c9abb266ba99df3b89e93ca66fa448eef5bae81 23-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Change scan downgrading to be app independent" am: 7efcba6e5f am: 14c7ff2ce1 am: 07047bea5a
am: b6a414e295

Change-Id: I296f39faa0a7e87330277a1b81d59888bff49a82
07047bea5ab703bd0b875777b5cfefdd2bdb8628 23-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Change scan downgrading to be app independent" am: 7efcba6e5f
am: 14c7ff2ce1

Change-Id: If0b67882e5ff89cb4514a76afbfd3db64bf4805a
2d6cacb618941cc75179fe71c0a7ba659363dcf4 23-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Truncating receiving filename" am: 89e68b36bd am: 2fc97c9e15 am: 1bd73b96bc
am: 25f46fc2a0

Change-Id: Ia7997c989a53293ea8c548a7d025a42f3ba3b10e
7efcba6e5f566e84005216d1260682bd56e8846b 23-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Change scan downgrading to be app independent"
1bd73b96bc1a19bf224ebdfcd1b7f882c27e3d4e 23-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Truncating receiving filename" am: 89e68b36bd
am: 2fc97c9e15

Change-Id: Ib3085434f876e78fbc5bb34084c69ec5b5ca6e4b
89e68b36bdd39c637f5317889820e9b4d1b18a59 23-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "OPP: Truncating receiving filename"
e7b1bd3f752006a06b50d5b0372b9bbe6ff680e9 23-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Send proper share status of file once transfer is complete" am: a862c84069 am: 7c771f04ea am: 0d9ac0ea18
am: a69c2e8b62

Change-Id: If8648a8ab76d0bbcce501215dc9b59c97895bae7
0d9ac0ea18b6237275b49d2d0a25854c8431f309 23-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Send proper share status of file once transfer is complete" am: a862c84069
am: 7c771f04ea

Change-Id: I375fea157e975b357e36c4f80ecf10639945fc7b
65e839fa45222955a605f6270a240edc68b21617 20-Jan-2017 Ajay Panicker <apanicke@google.com> Change scan downgrading to be app independent

Before this patch, every time an app started a new scan it would reset the
timer to downgrade apps down to opportunistic. Now each app is kept track
of individually so that another app doing frequent short scans doesn't cause
a long scanning app to avoid downgrading.

Bug: 34224062
Test: Tested scanning multiple times with multiple apps / TestTracker:73279
Change-Id: Ibcae9115dcd0fb5325f7bc9fc5d6e0fe4bf6e062
luetooth/gatt/AppScanStats.java
luetooth/gatt/ScanManager.java
17109c836b13f1b3cf08f37db70fb8634d96f911 28-Apr-2016 Hemant Gupta <hemantg@codeaurora.org> OPP: Send proper share status of file once transfer is complete

Use Case:
1. Select >15 files from DUT and try to transfer it to
already paired device. Some file are of very small size.
2. Check whether all files received or not

Failure:
File transfer fails in between.

Fix:
Share status of the file will be sent with MSG_SHARE_COMPLETE to
avoid sending the file again during batch transfer. Otherwise, if
DUT is sending batch containing small files transfer will be completed
immediately and status may not be updated to correct state. This will
lead to sending of same file again and transfer will fail because file
info is already removed from the hashmap of pending shares.

Change-Id: Ibbb0d44b72796af4844ae6289ba8182b4bbd4445
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppService.java
9a7bfaca5eee899cabe435cb73d4858ebf7435f2 12-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> OPP: Truncating receiving filename

Truncating receiving filename if name exceeds MAX_LENGTH. Otherwise,
files having non-ascii characters as filename are failed to receive.

Change-Id: I0df7f81fe2d772ddeea54597231c1741d8918661
luetooth/opp/BluetoothOppReceiveFileInfo.java
84f977c60b8d7feea9c9b20d60a7eb8e3e4869a9 14-Dec-2016 Sanket Agarwal <sanketa@google.com> Multi HFP connection handling

The basic handling mechanism is to create multiple state machines for
each connection. We route the upper layer (application) and lower layer
(callbacks) appropriately depending on the BluetoothDevice.

The following are implemented:
-- StateMachine creation (garbage collection/deletion still needs work)
-- Device awareness in service to route the messages
-- Cleanup of code and creating a new class for handling native messages

You can do the following with this change:
-- Create multiple connections (simultaneously)
-- Tear down connections

Bug: b/33554547
Bug: b/30984220

Change-Id: If08f24f744b046a393e836c99fcf2288fd698cc2
(cherry picked from commit 98c5bfdf980d573042bec06588b7e6ddfc48d054)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/HeadsetClientStateMachineFactory.java
luetooth/hfpclient/NativeInterface.java
luetooth/hfpclient/StackEvent.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
luetooth/hfpclient/connserv/HfpClientDeviceBlock.java
795cce60d2afec1771f70c2eb32d884669a86cc3 21-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Multi HFP connection handling"
8b07c23fa3dcf7cb2f703d1eac796f110ede58b5 21-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Add flag to disable phone policy" am: d3c7d49769 am: 0d9fe557eb am: a59bab99b7
am: 9d42626010

Change-Id: I4ecf36d72c8110173ffeab8f746839acd357b7b5
a59bab99b7c5a746acfce6dea885d479926fe267 21-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Add flag to disable phone policy" am: d3c7d49769
am: 0d9fe557eb

Change-Id: Ib403679f92ea62ae76052045caa3dded9bcd5127
98c5bfdf980d573042bec06588b7e6ddfc48d054 14-Dec-2016 Sanket Agarwal <sanketa@google.com> Multi HFP connection handling

The basic handling mechanism is to create multiple state machines for
each connection. We route the upper layer (application) and lower layer
(callbacks) appropriately depending on the BluetoothDevice.

The following are implemented:
-- StateMachine creation (garbage collection/deletion still needs work)
-- Device awareness in service to route the messages
-- Cleanup of code and creating a new class for handling native messages

You can do the following with this change:
-- Create multiple connections (simultaneously)
-- Tear down connections

Bug: b/33554547
Bug: b/30984220

Change-Id: If08f24f744b046a393e836c99fcf2288fd698cc2
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/HeadsetClientStateMachineFactory.java
luetooth/hfpclient/NativeInterface.java
luetooth/hfpclient/StackEvent.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
luetooth/hfpclient/connserv/HfpClientDeviceBlock.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
luetooth/btservice/AdapterService.java
d371c46039f28bf00e17f0edaea93d9a5661952b 20-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove advertiser during unregistration" am: 10f36a1d60 am: 750a0a4354 am: 18bd46fbb7
am: 951d5c84f3

Change-Id: I6365f5cafdec01b6c54b593324cc13de5f033231
18bd46fbb7dddca45b80e3fd048e6b1ebcb0c9bf 20-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove advertiser during unregistration" am: 10f36a1d60
am: 750a0a4354

Change-Id: Ia1c7bddd61c9d6ea0f32bb97fc5937185e5723cc
7bdbdb9c5c81e08957c442f91d70fb34d8b34dde 20-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Remove advertiser during unregistration

When advertiser is being unregistered in non-regular flow, i.e. due to
failure to start advertising, or when started with timeout, remove
client instance from map.

Bug: 34440704
Test: sl4a ConcurrentBleAdvertising:test_timeout
Change-Id: Id7b2079bf7936b344afada80f079666dc0ea6440
luetooth/gatt/AdvertiseManager.java
9151f1d76335e751c0ee23272b00dfaa2f3fd62a 20-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Separate Phone Policy from mechanism" am: ab9c1344b6 am: d45695faef am: 9d738dc281
am: f12307c33f

Change-Id: I24979d2312918559081634904def891f4215b5ae
9d738dc281192e4601efcef0a3d98766ce9bf4e8 20-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Separate Phone Policy from mechanism" am: ab9c1344b6
am: d45695faef

Change-Id: I131a0c23824041576942cffcee6e05ee1f80ff49
ab9c1344b617d77eb20bc4bd32231833f0932b4e 20-Jan-2017 Sanket Agarwal <sanketa@google.com> Merge "Separate Phone Policy from mechanism"
83df1b46c066c5d1d8a7e0fa9bd98c2a39c20890 20-Jan-2017 Jack He <siyuanh@google.com> Merge "Add counters for true number of events being logged" am: 35940f3f94 am: fe5bd2a008 am: 9e94f943e8
am: e2d039beb5

Change-Id: Ib77b6a33770498597693b2d9da87f2a9beb8d414
9e94f943e8c174100ec6dbd37f7e68b565bf0010 20-Jan-2017 Jack He <siyuanh@google.com> Merge "Add counters for true number of events being logged" am: 35940f3f94
am: fe5bd2a008

Change-Id: Ic855294c115a442689d6f70ecdaa9ebb2bf18569
d0021fed4912dbf4bfa492bdf7a9c10a6405cc6c 18-Jan-2017 Jack He <siyuanh@google.com> Add counters for true number of events being logged

* The metrics module drops oldest event when event size goes beyond its
logging capacity
* The understand whether events were dropped, we want to log the true
number of events.

Bug: 33694310
Test: Code compilation
Change-Id: I381e1cbdf6d08ec2d6e98a53cd27593b700b3d2a
(cherry picked from commit b5633d92c0debaf5b07dc3973a880c31a940421c)
luetooth/btservice/bluetooth.proto
17a6280084abb18f05b77e3ccefbe15bd54051f6 19-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Don't reopen finished transfer list." am: d259049966 am: 7b9c523e75 am: 93f42487ab
am: 767aac95d5

Change-Id: Id0b173b4130cac6c38c70a0f84b171b5bca6e304
93f42487ab09f62fccc56a66f1c881edaff68fa1 19-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Don't reopen finished transfer list." am: d259049966
am: 7b9c523e75

Change-Id: If5226cc706095de9d25cf6d73128407d860c763d
d808638cd1715e39c4dcd5a12ed4371a8eb709d0 10-Aug-2015 Hemant Gupta <hemantg@codeaurora.org> OPP: Don't reopen finished transfer list.

Prevent opening selected file from transfer history
list after it's cleared from notification to avoid crash.

Step by Step procedure:
=======================
1. Pair remote phone with DUT.
2. Receive a file to DUT and accept.
3. Now Drag the notification bar and select history.
4. Long press any file to select.
5. Again drag notification bar and press clear to clear notifications.
6. Press clear file on popup which observed in step 3.

Expected Result:
================
Should not crash Bluetooth.

Actual Result:
===========
Bluetooth crashing by selecting clear list

Change-Id: Ib5f4d3edbd32af298cfe439389b8e77864cb5462
luetooth/opp/BluetoothOppTransferHistory.java
e1c2e4c2476f48cba66db2e2a9e891b87964999d 18-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Add additional logging to root cause IOExceptions for OPP" am: 75c9708271 am: 05f8b02d70 am: c3d2c50ca1
am: 8ab5bdede2

Change-Id: I40d66e4851bc9492651f68644459e6eece213b61
c3d2c50ca15ea4c7613cbf93fe5152d6fffc8ba4 18-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Add additional logging to root cause IOExceptions for OPP" am: 75c9708271
am: 05f8b02d70

Change-Id: I13e1438b45753efd925d2c16c9a9c85d568c2b49
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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/PhonePolicy.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/btservice/ServiceFactory.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hid/HidDevService.java
luetooth/hid/HidService.java
luetooth/map/BluetoothMapService.java
luetooth/mapclient/MceStateMachine.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbapclient/PbapClientStateMachine.java
luetooth/sap/SapService.java
cc284c80ef076eb33b99521cbb1cf3d6982fa341 18-Jan-2017 Ajay Panicker <apanicke@google.com> Add additional logging to root cause IOExceptions for OPP

Bug: 34007014
Test: Code still compiles
Change-Id: I74e33a124dc1792541e464eeb1150d8e10fc4fd6
luetooth/opp/BluetoothOppObexServerSession.java
e41e8b1060d6ed73ea5e0daa838bfe2843b352f7 18-Jan-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Multi Connection" am: b25160eb6f am: d21e0cd458 am: 47ad22dbfc
am: 512939001f

Change-Id: I15a32ddb3b86e6012598356e23d7583be6f800ab
47ad22dbfcc419657c08db5a1f41e9cb7cc2495d 18-Jan-2017 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Multi Connection" am: b25160eb6f
am: d21e0cd458

Change-Id: I6b8c79b3412ff53205a566653482a9c6f2641621
b25160eb6f0c9c65f51072242cb11aabfddf10b0 18-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "PBAP Multi Connection"
3a197b3259b8906c60534bc8a533f2d38c0d6b52 13-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Fix file sending error by calculating size of file properly." am: 7e97344391 am: 5a3d5db5b9 am: 8bac873a08
am: b37f867330

Change-Id: Idd3bf188e5f95c01c3c93ea4d773d3c7946b6089
8bac873a082bed6d77b07560765fbb456c31b456 13-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Fix file sending error by calculating size of file properly." am: 7e97344391
am: 5a3d5db5b9

Change-Id: I5fb521a9d95ca7f35f95d2b6f4ec7c0c7c35cd4f
7e9734439152ce8405ddae72ef104d90fb1843f5 13-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "OPP: Fix file sending error by calculating size of file properly."
b96340e8cef5df637d3d28906f31a6a5ff853d6f 09-Dec-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Multi Connection

Add support for multiple state machine instances such that PBAP can
download contacts from multiple connected phones at once.

Bug: 33075066
Test: SL4A BtCarPbapTest:test_multiple_phones
Change-Id: I8364df622395eb15d43183190a9895246091750e
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
b80576437611cfe2bbc1a0088dd7cf3077af8a13 13-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Report no track playing correctly." am: cd801c800d am: 372eae966b am: 9e979bebfc
am: 283fd8aa7f

Change-Id: I7411ace66381a75ad91e4f8b3c0e0d865ff8bb16
9e979bebfc45c6b407d2a5d6e541d96a2ecfc693 13-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Report no track playing correctly." am: cd801c800d
am: 372eae966b

Change-Id: Ie683d89d7bca22b8e47857cd463ef780dade294e
e23a886e79f60a3f7f5b8e87f8c5ffc26134bd32 04-Jan-2017 Marie Janssen <jamuraa@google.com> AVRCP: Report no track playing correctly.

If browsing is supported, we cannot use 0x0 (Track selected) as a
generic response per the AVRCP 1.6.1 spec p64.

Rename mTrackNumber => mTracksPlayed to be more accurate, and use media
info to determine if a track is selected instead of whether we've played any.

Test: check with Carkit && PTS: TC_TG_NFY_BV_04_C
Bug: 33414166
Change-Id: I004aa5596ff9aef001ce74c463da0e1ed77b9ff4
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpConstants.java
f4e8a77a42e791c4cbb8ab85106c81086688cb9f 14-Nov-2016 Hemant Gupta <hemantg@codeaurora.org> OPP: Fix file sending error by calculating size of file properly.

Use case:
Send and receive vcard file through OBEX multiple times (above 30 times)

Result:
Sometimes DUT is unable to begin the vcard sharing and a message is displayed
saying "File unknown file could not be sent".

Root cause:
In Some race conditions InputStream.available() returns zero which causing error.
According to java documentation InputStream.available() method provides a weak
guarantee so it isn't guaranteed to return the total number of bytes in the stream.

Fix:
Read the InputStream by read() API to calculate the actual length of data.

Change-Id: I3448d6d3c410ae9dc8213c1c1d5f23dba4a56982
luetooth/opp/BluetoothOppSendFileInfo.java
4d272c8a2763c2fd36e819422236ea69df7bc24b 11-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Client changes for BT SAP hidl."
3b8e3a168e5851dc5a1414f9e5d82e51018af3e5 11-Dec-2016 Amit Mahajan <amitmahajan@google.com> Client changes for BT SAP hidl.

Test: Basic SAP sanity.

Bug: 32020264
Change-Id: If001ff221e3240a31cfbb08df11cbf6188ebd07e
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
8f0396f8153e14e8f550e5078f3c1c1e91b8acbc 10-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Close RFCOMM connection immediately if access is denied." am: b02ffbde21 am: 5b852e0b7a am: 4eacbdb6ea
am: 34a3faf9ed

Change-Id: I2f1271d08ab9fe243a6dae9f91a6d41752c7d160
f1254d40e07eae44424fdb25666aa292a8de3f65 10-Jan-2017 Sravan Kumar V <sravankumar@codeaurora.org> Merge "OPP: Check file size before send to prevent crash" am: 8e6ece2ad4 am: 5f12709a2d am: b497d8e620
am: 45d46dac5a

Change-Id: I8b8bde7a87ca15e0a37e5634bbad5e23d11d90c3
4eacbdb6ea1e86c7741e6e80a054e8331eca5560 10-Jan-2017 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Close RFCOMM connection immediately if access is denied." am: b02ffbde21
am: 5b852e0b7a

Change-Id: I152ef414c08da47ae4415b124cc0fd39166e6262
b497d8e62029e784fc1efda3335405a7a2d410c1 10-Jan-2017 Sravan Kumar V <sravankumar@codeaurora.org> Merge "OPP: Check file size before send to prevent crash" am: 8e6ece2ad4
am: 5f12709a2d

Change-Id: Ic5e5128e9da74f5cfe50196904733d28ac50cb2e
b02ffbde217d679c00e0963cba552f49407199bd 10-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SAP: Close RFCOMM connection immediately if access is denied."
95ba9eb75fe596dd231bf142fd3535ea489469ce 08-Sep-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Close RFCOMM connection immediately if access is denied.

Usecase
1) Pair with carkit and connect HF and A2DP/AVRCP.
2) Carkit sends SAP connect request. Reject this request from DUT.
3) Power off/on carkit.
4) Carkit sends SAP connection request to DUT.

Expectation:
SAP connection is rejected, but carkit can reconnect HF and A2DP/AVRCP

Observation:
Unable to connect any profiles after power cycling carkit.

Root Cause:
Even thought DUT rejects incoming SAP RFCOMM connection request whose access
was previously rejected by DUT, RFCOMM connection is not closed from DUT until
time out of 30 seconds. This prevents carkit from sending new connect request
for previously connected profiles like HFP, A2DP/AVRCP.

Fix:
Close RFCOMM connection in case request is from remote device whose access is
already denied by DUT in previous attempt.

Change-Id: I31bd2dfd862f7f69e46b8012924942e08e850c95
luetooth/sap/SapService.java
a4e626056b2d8dff1b624b5d79664ba27ae2777f 09-Jan-2017 Sravan Kumar V <sravankumar@codeaurora.org> OPP: Check file size before send to prevent crash

Use case :
1. Send large file to dut (Above 4 GB)
Failure:
Crash in com.android.bluetooth.
Process: com.android.bluetooth
java.lang.IllegalArgumentException: Length must be
between 0 and 0xFFFFFFFF
at javax.obex.HeaderSet.setHeader(HeaderSet.java:333)
at com.android.bluetooth.opp.BluetoothOppObexClientSession$ClientThread
.sendFile(BluetoothOppObexClientSession.java:411)
at com.android.bluetooth.opp.BluetoothOppObexClientSession$ClientThread
.doSend(BluetoothOppObexClientSession.java:337)

Root cause :
Largest length in OBEX message header is unsigned 4 bytes, so actual
file length (4 GB) cannot be written into Obex header which leads
to exception in OBEX code.

Fix :
Add length check before push file and skip sendfile if length is above
4GB to prevent crash.

Change-Id: I9066fb7456d85fdc197fe21fed26fb2bb89ff09e
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppSendFileInfo.java
d56590e2df3256fbbb1d92b9187b5e62318e63c0 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix improper unregistration of scanner for app that died" am: b171d8b460 am: 5d32f22364 am: 2fe8a775d2
am: 9f7d1d9ac6

Change-Id: I020b3318c45f4c2706d791a31538e32d4c590cbc
2fe8a775d219615f09e91c73a0c9359855ed484d 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix improper unregistration of scanner for app that died" am: b171d8b460
am: 5d32f22364

Change-Id: I9ab26db919a4d061a9db2c6de5c79ddd7cd4674b
b171d8b4605061f3e32b01090850df8228d0b688 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix improper unregistration of scanner for app that died"
9d3c43d748cc17e3c19ac8134cc3fc93e60304e2 10-Jan-2017 Jakub Pawlowski <jpawlowski@google.com> Fix improper unregistration of scanner for app that died

When scanner died, it should be unregistered as scanner, not as GATT
client. Otherwise app will not be able to start scan when it's
restarted.

This bug was introduced when separating GATT client from LE scan
clients.

Bug: 33556286
Test: start scanning, kill app, restart the app
Change-Id: If8da5512081e1986bbee7362984091f298500f4e
luetooth/gatt/ScanManager.java
537e9e177646a577eddfe08d34c09bdfbe3063e6 05-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Add the Filter statistic to scan statistics" am: 640eeeafa7 am: 675b533c53 am: bcd906d64c
am: 8bc3ccdb52

Change-Id: Ic899680aed521516512210e10396543b4fe8f3c4
bcd906d64c5da98dcb963f9696c0f6688f4cf945 05-Jan-2017 Ajay Panicker <apanicke@google.com> Merge "Add the Filter statistic to scan statistics" am: 640eeeafa7
am: 675b533c53

Change-Id: Ia80c7c4d33d816563240b9814cf744cbdbf13c85
bd11ad34482a898a53bbd9f55bf3607c40c648ec 04-Jan-2017 Ajay Panicker <apanicke@google.com> Add the Filter statistic to scan statistics

Test: sl4a FilterTest
Change-Id: Ic16e523524022803107b5e0653a35e3f2cbc5186
luetooth/gatt/AppScanStats.java
luetooth/gatt/GattService.java
4d466218ef15e80c6841d9635cacd4b056305e76 05-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "Remove debug logging from report sending in HID Device mode." am: 94c5334109 am: e7845653d7 am: 3436052813
am: b24f416030

Change-Id: I8f99d0520149f9d5611ad8825333ac2faab231e2
3436052813342e9fe64aa8fcf83dd15a08cde4f7 05-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "Remove debug logging from report sending in HID Device mode." am: 94c5334109
am: e7845653d7

Change-Id: I0660ce1d657833f0a21822a118c1fe8444e8fcc7
94c5334109c8c53c5c3b502fc26c757ed6884711 05-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "Remove debug logging from report sending in HID Device mode."
3ecc45db86e05c3ebd098ea7b0d9bfc9072648b6 05-Jan-2017 Jack He <siyuanh@google.com> Merge "Fix A2DP metrics session duration" am: fdd72a76aa am: f2ede323d3 am: c4c874ad73
am: 989a3d9dd4

Change-Id: I8e9a0811fc136749f216212166bfc761b34eaf61
c4c874ad73d150ed27afc59b489b7c5b1775eefb 05-Jan-2017 Jack He <siyuanh@google.com> Merge "Fix A2DP metrics session duration" am: fdd72a76aa
am: f2ede323d3

Change-Id: I209ad9066e000cb60200416abcef4345f8802b4a
4308e8f5f34b668f48cb50fbbdac77e45d04e432 22-Dec-2016 Jack He <siyuanh@google.com> Fix A2DP metrics session duration

* Add one extra item in the A2DPSession message to keep track of audio
playback time for A2DP source

Bug: 33694310
Test: code compilation
Change-Id: Iee1e47997bf9cf9ba3f7f812c965eab36f19c0f4
luetooth/btservice/bluetooth.proto
989c69f6f315e1decd44b30c1c1d8d7092cbecbe 05-Jan-2017 Ivan Podogov <ginkage@google.com> Remove debug logging from report sending in HID Device mode.

When the app acts as a pointing device, it (according to the
specification) generates ~80 reports per second.
Removing 5 log lines per report makes logs shorter by 400 lines
per second.

Test: build, run, logcat
Change-Id: Ief2300294b7c7ed56cb67bcf1b77f70187291b8e
luetooth/hid/HidDevService.java
23013c7a8ca277fb39281a812f93cb3cfe7a851d 04-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "Don't print dumpsys info twice in bugreport" am: 61df78ee30 am: bc7c356839 am: ac69240b1c
am: 07a263d593

Change-Id: I854751cbc6347e521ee523e1462183201cdfe07f
ac69240b1cab532dd125ef7029560f72f80e81a2 04-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "Don't print dumpsys info twice in bugreport" am: 61df78ee30
am: bc7c356839

Change-Id: I328d0ee2d17d67074b9ecc56bf6ebd14bfbe0134
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
luetooth/btservice/AdapterService.java
913de42d7bb6c6c7b2f277a6367f4509f1226483 04-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "Allow HID Device to connect to a specific device" am: 9ab658fda6 am: 6057300665 am: aee2411af0
am: 72723ecdc4

Change-Id: Ibad0400e86a70a96e4fd6ca824771e0574e6e8df
aee2411af079c4a5a3721b2890b408b13773eae1 04-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "Allow HID Device to connect to a specific device" am: 9ab658fda6
am: 6057300665

Change-Id: If5606f3e7087dd90412996c562e17272fb8273ee
9ab658fda62275301722af7b36b4068f61041d34 04-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Allow HID Device to connect to a specific device"
0a5a0e715e320ac2f0d8e8fb92719331ad00dc17 04-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "HID Device role API fixes" am: 641928be18 am: a72a0b6958 am: 570d850055
am: 772f5096d6

Change-Id: I1ca0c3f477012b068aaa3bbb7dfa2f12f4af24fc
570d8500557fca6b467bc4ff15bb457b56940a03 04-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "HID Device role API fixes" am: 641928be18
am: a72a0b6958

Change-Id: Icbe765ac505f118553b36203ee8899572423c144
641928be18e670aa53ab3861c2ead87b9ffb2ea0 04-Jan-2017 Ivan Podogov <ginkage@google.com> Merge "HID Device role API fixes"
58456617296aa39cde978dfe63a3aa1b3f1ecb44 04-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for configuring the A2DP Source codecs" am: ae635ea9e4 am: 69f120140d am: 6ffec16e86
am: 2e25db8449

Change-Id: I03f666f37a975a1361174877bb4979ed0b69216c
6ffec16e868658defc51eb4ac26ab0f3874071b4 04-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for configuring the A2DP Source codecs" am: ae635ea9e4
am: 69f120140d

Change-Id: I2f8b2cd61fa44f727fb87defb4082b08e22f49d1
33b6b7d2b08dcd7ced1809e2ac653c5e8c2514af 21-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Add a mechanism for configuring the A2DP Source codecs

* Extended the Bluetooth A2DP AIDL interface to get/set the current
codec configuration

* If the current codec config is changed such that the audio feeding
parameters have changed, then inform the Audio Manager so it can
reset accordingly the audio feeding parameters in the Audio HAL to
the Bluetooth stack.

Also, fix the BT_BOND_STATE_* values (unused) in the
AbstractionLayer.java class so they match the corresponding
BT_BOND_STATE_* values in
hardware/libhardware/include/hardware/bluetooth.h

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: Ic3e35154d9dbc32b66522322cd5d2a96bc5a977c
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AbstractionLayer.java
82973b036b68cf2a0a0c105e7666afa58c1a38d8 03-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Test MediaBrowsers before trying to use" am: 8ca327ce49 am: 5d0fdd60a5 am: e83357f042
am: b66c15cc54

Change-Id: Idc658be423d256d2b78dbe4314d49954df6290a0
e83357f042b27fb222be863f9f6b0ef4e8dbf63a 03-Jan-2017 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Test MediaBrowsers before trying to use" am: 8ca327ce49
am: 5d0fdd60a5

Change-Id: Ie6d159cdf484e5f6086a036312e6f0ec2eea5b9b
3843256f294cfd3e9b1d883e71ed7306738b6ca1 10-Dec-2016 Marie Janssen <jamuraa@google.com> AVRCP: Test MediaBrowsers before trying to use

MediaBrowserService can reject the connection from a MediaBrowser.

Test packages beforehand so we don't advertise browsing for a player we
can't browse to.

Refactor and cleanup some code around building media player lists and
remove some dead code.

Bug: 33390650
Bug: 32382082
Test: use carkit to browse to different players
Change-Id: I5a4c18ab77a24f3cf2aa34d1c15e3213edfed61d
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/BrowsedMediaPlayer.java
b6aa20542f9e6d42ae840e19ce7e85b20087cfb3 30-Dec-2016 Ivan Podogov <ginkage@google.com> Allow HID Device to connect to a specific device

Test: make
Change-Id: I1322eb7fb5d253c0968a8bbe11a19cca8f1834f9
luetooth/hid/HidDevService.java
2769ac313a195a805bb2189ca5b8ba8797300fb6 30-Dec-2016 Ivan Podogov <ginkage@google.com> HID Device role API fixes

This change reflects the API update, and also fixes a couple
issues with the code (non-initialized, wrongly compared and
otherwise unused mHidDevice field).

It keeps the current logic of using a single device at a time,
yet introduces checks that the application is actually
addressing the right device.

Test: make
Change-Id: I088417046907c8310692cf9205075d6da0cd81e6
luetooth/hid/HidDevService.java
a3b737b82ffd21d350cef9f706209b70d7e0efba 29-Dec-2016 Marie Janssen <jamuraa@google.com> Merge "Move state dumpsys (to BluetoothManagerService)" am: 320a508c59 am: 998638650c am: 5254b2274a
am: 0298dd0391

Change-Id: I83e19aa1f8727e6bc0d2788e5519cf0ff1e821a4
5254b2274a1e7ba0815b202c195675b490509759 29-Dec-2016 Marie Janssen <jamuraa@google.com> Merge "Move state dumpsys (to BluetoothManagerService)" am: 320a508c59
am: 998638650c

Change-Id: I51b866545ea2aa5be8e2cac04e3a08a9f7cba497
a04407b49c89c9f2c3119126e23e302907eca768 29-Dec-2016 Ivan Podogov <ginkage@google.com> Rename the Bluetooth profile classes for HID Device role. am: b7aaa47ba5 am: a1e61f62e1 am: 282f0da4fa
am: 7ff30fc747

Change-Id: Ia11a98d13f5d461e0be7756e3241af8ee3b161c2
1f56ca1de54bbfeaf5bede0af4d95d1ed9585e4e 29-Dec-2016 Hemant Gupta <hemantg@codeaurora.org> HIDD: Add support for HID Device Role am: cf27f0ddf9 am: d7188b8a90 am: 190456f980
am: 0e88017618

Change-Id: I4725a418db9a1b42248b7305c9a8d7e53d872cb7
282f0da4fad80ae90a7ed2b77717b17f8043ca43 29-Dec-2016 Ivan Podogov <ginkage@google.com> Rename the Bluetooth profile classes for HID Device role. am: b7aaa47ba5
am: a1e61f62e1

Change-Id: Ib6cd4abc149293cf773ae020706d7e8ac0da7af7
190456f9800e87aa905191112a455bfa80fc1f0a 29-Dec-2016 Hemant Gupta <hemantg@codeaurora.org> HIDD: Add support for HID Device Role am: cf27f0ddf9
am: d7188b8a90

Change-Id: Ic892bd2dec0897bb5539328873bd8d2bbf8dc40f
320a508c59c2a940ec70096019c9e56ab71fbd97 29-Dec-2016 Marie Janssen <jamuraa@google.com> Merge "Move state dumpsys (to BluetoothManagerService)"
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
luetooth/btservice/AdapterService.java
b7aaa47ba556ba2e09e07d04c09c0cbd8d836d87 23-Dec-2016 Ivan Podogov <ginkage@google.com> Rename the Bluetooth profile classes for HID Device role.

This CL reflects the changes from frameworks/base.

Test: make
Change-Id: I0e3a3335572f6ab4683e8a3b5335f3b51afba2f5
luetooth/btservice/Config.java
luetooth/hid/HidDevService.java
cf27f0ddf906a8f76a22b8a30ff4262526e33477 18-Apr-2014 Hemant Gupta <hemantg@codeaurora.org> HIDD: Add support for HID Device Role

This patch adds support for HID Device Role which enables phone being
used as a Bluetooth keyboad or mouse.

Change-Id: I931867442111ad997a34a166c7b2ec1daf317ddd
luetooth/btservice/Config.java
luetooth/hid/HidDevService.java
5b16ef0e5fd3576eedc5d10e926a5d4fce0f9062 20-Dec-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix cleanup of dead GATT clients" am: 6621044f48 am: 14c316072c am: 61cd4c83b4
am: fd4e46b156

Change-Id: Id19bb6720e237d006c80ac35120f62273d21fa78
61cd4c83b4f8fb3b6366332cb837688de4490832 20-Dec-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix cleanup of dead GATT clients" am: 6621044f48
am: 14c316072c

Change-Id: I0200299e9a99a54fabfd0cbe75779784e3d88625
6621044f48ea355da914cfd64d29cf696ac91327 20-Dec-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix cleanup of dead GATT clients"
7286c32288222252f6b1d232befb21d6f4f8a8db 20-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Expose Bluetooth 5.0 properties to JNI" am: 944da24342 am: a3a4ca722a am: a88290c072
am: 5e1f5cab14

Change-Id: I00c786bbc2a3d41e95543fa95816ac1dab362052
a88290c072c21c70d3b1396211dfcda7aadfa450 20-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Expose Bluetooth 5.0 properties to JNI" am: 944da24342
am: a3a4ca722a

Change-Id: I12609287a5fd5d681f1b2684bd516e87113d1224
c8ffb102474da9834e70ab72641fea143f5f3a3d 05-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Expose Bluetooth 5.0 properties to JNI

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I1cfdd29075a41057ae99b5b458876a4a9916e845
luetooth/gatt/AdvertiseHelper.java
luetooth/gatt/AdvertiseManager.java
d4f5965598faf465e21f8254bcee0cef4b365840 15-Dec-2016 Emil Lenngren <emil.lenngren@gmail.com> Fix cleanup of dead GATT clients

A bug was introduced in commit
d828b42ed91213bd6115b84bc16809f13fc7afe6 which causes normal
GATT clients (neither scanners nor advertisers) not being freed
properly when remote process terminates, leading to out of space
of available GATT clients after some time.

This patch adds back a ClientDeathRecipient to handle this.

Test: kill an app that has gatt client, restart it and create new
gatt client, verify the client id is same as before in logcat

Change-Id: I318cb1693984444a172cb81be2023a064dbc02a4
luetooth/gatt/GattService.java
dedd8b0b057c2d777d5c873e73318fd7a90a01a2 16-Dec-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP performance" am: c0ea41ba0e am: 3bfa299328 am: 970a2d254d
am: daf0c903ad

Change-Id: I14c354bd168a41d30c76ced5ae1aadf8b821fc2d
970a2d254d9a5d25891d3434b0ff90e9b3f82f4e 16-Dec-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP performance" am: c0ea41ba0e
am: 3bfa299328

Change-Id: I26a0db18286e8d9c687f2e4d1b476ca07a6d1ea9
ce13981723f7e227ac5e51478cded5741f788796 16-Dec-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent SQL query from having a bad where clause" am: 6c58f22c09
am: 47f23e1d25

Change-Id: I7bb275568ea5a8c5d8fc12f356005331320a79f9
458e7b842a2cb5d04ed7dd92be1d2de4dc70cdcf 15-Dec-2016 Ajay Panicker <apanicke@google.com> Prevent SQL query from having a bad where clause am: 046debbf87
am: 427341d580

Change-Id: I8a3b8ac03a729c5400a65ddf1eaf9030b561d098
427341d5804c9f71c91204ca8339e82545b30005 15-Dec-2016 Ajay Panicker <apanicke@google.com> Prevent SQL query from having a bad where clause
am: 046debbf87

Change-Id: I3abeab386e5047faaa66d3863bbfdd7dd8f7496c
c0ea41ba0e71ad595f4f0b445480077c9ae639a7 15-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "PBAP performance"
046debbf8704ce4a0e0e318567cddcba76b026e6 15-Dec-2016 Ajay Panicker <apanicke@google.com> Prevent SQL query from having a bad where clause

Bug: 33092708
Test: Sanity test MAP on carkit
Change-Id: I6c7f54f60877cf2c57df9b3521604660321214ff
(cherry picked from commit 0552994436e2afdec3d35fed5aac0f87e8e3e0bb)
luetooth/map/BluetoothMapContent.java
0552994436e2afdec3d35fed5aac0f87e8e3e0bb 15-Dec-2016 Ajay Panicker <apanicke@google.com> Prevent SQL query from having a bad where clause

Bug: 33092708
Test: Sanity test MAP on carkit
Change-Id: I6c7f54f60877cf2c57df9b3521604660321214ff
luetooth/map/BluetoothMapContent.java
b44a18cd53b3dadf4a81d0822c091b8fdca82305 06-Dec-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP performance

Change behavior of onPullComplete to group insert operations for
contacts and apply together. This batching of operations reduces cross
process communications and improves performace about 3x from 100 seconds
for 1000 contacts to 34.

Bug: 27343808
Test: SL4A test BtCarPbapTest:test_contact_download.
Change-Id: I56bc23c69bc93cf44f2a8e132dea8dce8de109dc
luetooth/pbapclient/PhonebookPullRequest.java
89aaa72b21e05161ba1e86f3742367b7c9a01b7d 15-Dec-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent Null Pointer Exception caused by empty remote device properties" am: 4b4f533766 am: 249bbe4611 am: 9ef833f81f
am: 58d8f60c45

Change-Id: Ib48ff63c7b8a4508a45e5b2c5d3abed29a6a7aca
9ef833f81f464ce95b2d848a76f6957777d4b2e7 15-Dec-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent Null Pointer Exception caused by empty remote device properties" am: 4b4f533766
am: 249bbe4611

Change-Id: I1acad92fea490fd2c81b092f505d4f26c2574e18
9f2682b75aab6ac9eff1d4ac5956df402d98d1c1 15-Dec-2016 Ajay Panicker <apanicke@google.com> Prevent Null Pointer Exception caused by empty remote device properties

Bug: 33092708
Test: runtest bluetooth
Change-Id: I6d7bfd9baaa428692183a64cc7ae87438862d518
luetooth/btservice/RemoteDevices.java
818acdd7951f1dde8a7909fcb4afafb3d184b0a1 14-Dec-2016 Jack He <siyuanh@google.com> Merge "Remove disk IO read/write blocks in AdapterService for main thread" am: 8723086a83 am: 287e7ea1bf am: 0bd2c74ba5
am: d62d5804cf

Change-Id: Id6a14cebea9de76a09ac7ca16b39f7154029eb13
0bd2c74ba53623f657e9ba24cfe9ea2b615685b8 14-Dec-2016 Jack He <siyuanh@google.com> Merge "Remove disk IO read/write blocks in AdapterService for main thread" am: 8723086a83
am: 287e7ea1bf

Change-Id: Icaa7098686be6658f33eb35bd0babe6780d3d439
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
luetooth/avrcp/Avrcp.java
luetooth/btservice/AdapterService.java
52e8773c5c27257aad4602fb0f4539645f7d7b74 12-Dec-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Catch Intent.startService SecurityException" am: 1b559e9463 am: ad08eafd60 am: 61d0dafd3f
am: a9065f3b38

Change-Id: I0bfa99b8b082aff3da9e5a0e7798da432b8c8858
61d0dafd3fcd9905f9933e6e8929b686b0c01eb5 12-Dec-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Catch Intent.startService SecurityException" am: 1b559e9463
am: ad08eafd60

Change-Id: I62d317443299707348faf67ed98d23f25b1d8503
f65765e71b2a6552c319eb5199914045a1ecdb04 24-Nov-2016 Marie Janssen <jamuraa@google.com> AVRCP: Catch Intent.startService SecurityException

If a package is being upgraded it is frozen and we can't start the
MediaBrowseService on it.

Test: runtest bluetooth

Bug: 32977865
Change-Id: Ie0c47f6db370be70259c5e7cde67b2e89c07ab75
luetooth/avrcp/Avrcp.java
6cda653b577ed785a11b476bbe6d59409e12fb94 08-Dec-2016 Ajay Panicker <apanicke@google.com> Merge "Use the correct ContextMap for scan statistics" am: 2e7125a257 am: 319bece190 am: 5acbd2f421
am: 324e57e3d0

Change-Id: If4a35488c49416d7ac5516bdc71d96d595356a94
5acbd2f4211477d865466d483181051da7ae1efa 08-Dec-2016 Ajay Panicker <apanicke@google.com> Merge "Use the correct ContextMap for scan statistics" am: 2e7125a257
am: 319bece190

Change-Id: I51f1ed40be28bb7f10a78f72d0bac523e0db0727
f3863dec6d1ac2f83a5b0ab4df379ca1e87d5df3 07-Dec-2016 Ajay Panicker <apanicke@google.com> Use the correct ContextMap for scan statistics

Test: "adb shell dumpsys bluetooth_manager" after scanning with an LE app
Change-Id: Id8c16aa171d9ceee9b3ce83ae5afbefa0d6fd9ed
luetooth/gatt/GattService.java
609c916ecf0c68dd6c9becaee88c870615a094ee 06-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "AdapterService: enforce new user restriction for disallowing Bluetooth." am: 80343eba78 am: f87e5650c9 am: 1c072190bc
am: 738a98cf2d

Change-Id: If8f9ad05cd24b488cbe030d8032a9b5de71ee47e
1c072190bc14127c36fee2ae61a25b34f61d5217 06-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "AdapterService: enforce new user restriction for disallowing Bluetooth." am: 80343eba78
am: f87e5650c9

Change-Id: I38d759c37e00e4e266cad5de3e8f3be5ffc6c26a
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
luetooth/btservice/AdapterService.java
cfb8afd0a26603585fe6f05241bd0ac2d4d43026 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "Revert "AdapterService: enforce new user restriction for disallowing Bluetooth."" am: 490b7a3bbe am: a7da3b78f1 am: 56c36936a7
am: 35b4deede9

Change-Id: I624aa134d9551382ffc4dccaffc12dce6a15d31a
b4558e8b9ef47f968c1eca2d73e9ed2824b2fc8a 01-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix null settings in AdvertiseCallback.onStartSuccess" am: 67969eff13 am: 2e230c6a96 am: bf8a7f12e4
am: 6c86b7c38b

Change-Id: Ie1f658cf77f0dd98c6c41229e5bb9432b7b11b66
a4d4bcb7bcfe49880991dca9a15ebd07bb6c19c4 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "AdapterService: enforce new user restriction for disallowing Bluetooth." am: 6add0e7b31 am: aca88a2c5d am: 0a3fa3c7ab
am: e39ac56d74

Change-Id: I6967aa39b877722f250ed645a1bbe5905de27c9b
56c36936a70e29e339bbbd99803b31e4e73a7734 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "Revert "AdapterService: enforce new user restriction for disallowing Bluetooth."" am: 490b7a3bbe
am: a7da3b78f1

Change-Id: I15af93485e71244435c0524746546f524cd08cba
bf8a7f12e4ad73abfb3357f1803099d9f2f5ae66 01-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix null settings in AdvertiseCallback.onStartSuccess" am: 67969eff13
am: 2e230c6a96

Change-Id: I911246bd9be13ed919a68920fa4ed138b7833341
a7da3b78f135e774feb542d6e67442e45fea809d 01-Dec-2016 ltrochtova <ltrochtova@google.com> Merge "Revert "AdapterService: enforce new user restriction for disallowing Bluetooth.""
am: 490b7a3bbe

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

Change-Id: If3aaceacd0b330b10ce7d87c686997a1ef0f5f96
2e230c6a96deda76acd46fe8539d7cb6f32f1480 01-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix null settings in AdvertiseCallback.onStartSuccess"
am: 67969eff13

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

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

This reverts commit 1f802f2473b5f8b8a401bcd9c7273d21b27d4bc2.

Change-Id: Ic5ffcf4e1ad9d024646363fa83094997058dd05b
luetooth/btservice/AdapterService.java
4d6c42f3481f1ef7657b10f1ba5198216b67c498 01-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Fix null settings in AdvertiseCallback.onStartSuccess

Test: acts FilteringTest
Bug: 33171815
Bug: 30622771
Change-Id: Ib3df1d13535999ede0e820651fc6d69daeb8ef17
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.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
luetooth/btservice/AdapterService.java
a7bac2a6dc381423a8d76f2c70d327bca01ff661 30-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Add Bluetooth device address parameter to HF Client APIs" am: f7d1e331cb am: e3f300d6f2 am: 8d610eeb2d
am: 2d715e5cc4

Change-Id: I6964a60d4afda99d478aa7b6e9977ca1ac146cee
8d610eeb2d290106464a4371e7da5c7d30f42e0e 30-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Add Bluetooth device address parameter to HF Client APIs" am: f7d1e331cb
am: e3f300d6f2

Change-Id: I8c339d3341e55fd9ed1e5ad6519ea4fdd77f09d9
e3f300d6f226c75032503857e12ce7979dc8cf81 30-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Add Bluetooth device address parameter to HF Client APIs"
am: f7d1e331cb

Change-Id: Ifdb0b617841ea38e4afe2d9ea8faeb65a4c3e1a1
9b923688bf84c08df2a1c569540ddefaff7964a1 29-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Disable HFP audio path when HFP call goes on hold/resume when goes off hold"
am: d13d573c0a

Change-Id: I358a75c0b793d81c56107094f46cea37c07185a4
ef3a3b50a70aea2b4583395198aa7572553d2846 29-Nov-2016 Sanket Agarwal <sanketa@google.com> Add Bluetooth device address parameter to HF Client APIs

Bug: 30984220
Test: SL4A tests for HFP

Change-Id: Ic03dd8fab87c3ed7ea83a617fc18426427020182
luetooth/hfpclient/HeadsetClientStateMachine.java
849169b3530d0da7fddd1e6884ab713aa4554f94 27-Oct-2016 Christine Hallstrom <hallstrom@google.com> Disable HFP audio path when HFP call goes on hold/resume when goes off hold

This fixes the issue where a cellular call made to a watch when an
HFP call is in progress causes the cellular audio to go through the
HFP path.

Bug: 32164561
Change-Id: I179ba4e1f1a1e76496f3062cc29bc20014fe5661
(cherry picked from commit 3ee63fdfb7fa5896bff7e172be60c763919c9f63)
luetooth/hfpclient/HeadsetClientStateMachine.java
e35958ff5f53addb1d74094559a897926bb1374f 28-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Cleanup startAdvertising call" am: 676347ddce am: 2fb1b4a04a am: 80e09bb7c7
am: c380dd5088

Change-Id: If65c2f46c87c9246d2af3eccc25634027b95ea6b
80e09bb7c7b73c1fb53ecd681aa12c7bb500548e 28-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Cleanup startAdvertising call" am: 676347ddce
am: 2fb1b4a04a

Change-Id: Ia074d895655d2b6ddae5f72378f65eb7c49dacd9
2fb1b4a04acbdf1dce86b7569458aeb33e10b075 28-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Cleanup startAdvertising call"
am: 676347ddce

Change-Id: Icc388d93446ddd689af2d4e040e5d44565fcd379
52ec4e757eff12405d0d074d58822b061cd77d84 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Cleanup startAdvertising call

AdvertiseManager.startAdvertising no longer sends multiple commands.
Its native counterpart, BleAdvertisingManagerImpl.RegisterAdvertiser,
thanks to better tests, guarantees that it either sends a success or
error callback. Therefore, no additional synchronization is required.

The only cases when the native code can get executed without a callback
are when the controller sends no response, or the bta thread is stuck.
Both of those cases should result in a crash and restart of bluetooth.

This patch also fixes an error, where if a timeout happens, the error
callback gets called twice.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertising
Change-Id: I72a729f4da2bd8d5d62a81a6f93dbadab088a036
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
2235686b8aef18cab3eb6760939df76c5f4984cb 24-Nov-2016 Christine Hallstrom <hallstrom@google.com> Disable HFP audio path when HFP call goes on hold/resume when goes off hold
am: 3ee63fdfb7

Change-Id: I0f35f2a743cbd963686e6ba41c632e52234f53de
59d4f0e9d674721b2f539436ce2efed0bb644604 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove unnecessary advertiser count check" am: 8fc01bd0eb am: 7eaee06a7c am: 91bc804f98
am: b820be3f76

Change-Id: Idf38b6c3cc429884aea36785b6cec3def548c62c
b820be3f76d0a5039cd5d41216d74cac3594f69f 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove unnecessary advertiser count check" am: 8fc01bd0eb am: 7eaee06a7c
am: 91bc804f98

Change-Id: Ie91a259cfee5ee6e6302e4e1568e1f1f91a75cd2
91bc804f98f1ed01732352e717eb055d4520faa5 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove unnecessary advertiser count check" am: 8fc01bd0eb
am: 7eaee06a7c

Change-Id: I59464159b27222784ad054e74c945af5c6f8d143
7eaee06a7c90a437f4096f4ba103b031a69e8371 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove unnecessary advertiser count check"
am: 8fc01bd0eb

Change-Id: Ie5e41217486cbe2558f28c8d82d4aeef02c1a486
7770f07e7444ff63d56df3ff48a335296c11fcf4 23-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Remove unnecessary advertiser count check

Bluetooth stack won't allow to register more advertisers that it can
handle, so checking count of registered advertisers make no sense when
calling startAdvertising.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: Ifbaf583871cf59ce8e345d7bca8e9a9ea1540734
luetooth/gatt/AdvertiseManager.java
22c68791d27a9c4e4317dd96d87bec26cb746664 19-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move some AdvertiseManager methods into separate helper am: 335fb7b425 am: f9b212f2f4 am: 12ca1af305
am: 1798f56e66

Change-Id: I4a645ce039db7a0165f424796334048c1d808580
1798f56e660932c464e0115f8f471d6b5d290770 19-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move some AdvertiseManager methods into separate helper am: 335fb7b425 am: f9b212f2f4
am: 12ca1af305

Change-Id: I6ab096f32fc0b683a90c9ee0cf5382b874f62160
12ca1af305b32d4a2a645eeda0dd518ae30433c8 19-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move some AdvertiseManager methods into separate helper am: 335fb7b425
am: f9b212f2f4

Change-Id: I46d6490e38a4bf2d4b562d6b150eb6da9694b2d7
f9b212f2f4cd804a16d5f7950045019215cc3400 19-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move some AdvertiseManager methods into separate helper
am: 335fb7b425

Change-Id: I9336088e214841f6f7530f2b54209891ff4302bd
335fb7b425b0a585c271ae34901ea443ec88be38 19-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move some AdvertiseManager methods into separate helper

This patch is moving some methods from AdvertiseManager into a
AdvertiseHelper. This is a preparation to add tests to
advertiseDataToBytes and others.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest BleAdvertiseApiTest
Change-Id: I41f857379c892f76a5cec807879722764ef3cfa7
luetooth/gatt/AdvertiseHelper.java
luetooth/gatt/AdvertiseManager.java
6eac7f5c5614bedb580d6cade16708031466b4c9 18-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move startAdvertising() logic into native code (1/3) am: e82cce565b am: 9ecd25b8ef am: 350497f07d
am: 9973ce87c7

Change-Id: Id2915cae0f2ff1b6b6800a08013d0c884fc9b201
9973ce87c7a130924731ba4471d17b11be904f86 18-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move startAdvertising() logic into native code (1/3) am: e82cce565b am: 9ecd25b8ef
am: 350497f07d

Change-Id: If9c8a0ceea9970f3d8d9aca95e431fdcb7bbefb1
350497f07dff2ac487c2da9ce268cd7318959d6b 18-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move startAdvertising() logic into native code (1/3) am: e82cce565b
am: 9ecd25b8ef

Change-Id: I2e278f6d46572c325a4ff8021196fb1e8282a078
9ecd25b8ef9a2168d8a5b14e9f2188518c94d13a 18-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move startAdvertising() logic into native code (1/3)
am: e82cce565b

Change-Id: I6e9cf2db1974c893bfed648cffae627e2b53b9c5
e82cce565b1549001f5a70526239c2d92106f85a 17-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Move startAdvertising() logic into native code (1/3)

AdvertiseManager.startAdvertising() was implemented in Java layer for
historical reasons. Now that we have nice native callbacks and tests,
it can be moved into native code, where it will be shared between
Android daemon and bluetoothtbd.

Bug: 30622771
Test: native tests added to cover startAdvertising
Change-Id: Ifee1fc74ad3e749ffc0c6a734e450c540b5b59bb
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
576d9f67a261275a87d338e65cf128a1cdf51ae9 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond" am: 2beef8d589 am: f17f8cf739 am: 8c9d2e36bc
am: ce288efcc9

Change-Id: I1bb90c79850e4e9bff7b385236f2930a869b4d95
ce288efcc911672d13715f8cda8b8842ea7de019 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond" am: 2beef8d589 am: f17f8cf739
am: 8c9d2e36bc

Change-Id: Iae3a23967f90bcf3b29f19c421f36f33394a458d
8c9d2e36bc77879cfe7c2c610e74bb908a7417cb 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond" am: 2beef8d589
am: f17f8cf739

Change-Id: I6e92eb2a114a3da0febad730faaf30edee28be50
f17f8cf7392727c18ee1b2c5ac75699d926ba05c 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond"
am: 2beef8d589

Change-Id: I97256a6d98bfcd694e2abd55e8892228615c09e8
2beef8d58967ba6ed33d5da97fff13ca729e64a7 16-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in createBond"
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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
07154c1614247067a5dd718d8779e7f952598e3c 15-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against SQLiteException crash in MAP init" am: a0753c2c96 am: bf077b3e5d am: 50288fdadd
am: 32eeb9a589

Change-Id: Ib5b77aecf3ce5a267d5fb49a72c29205c6fc2def
32eeb9a5898d1472f8af6402c7ac2088af5ab5cf 15-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against SQLiteException crash in MAP init" am: a0753c2c96 am: bf077b3e5d
am: 50288fdadd

Change-Id: I2043501cfae4f56f3dd34c31a9988ae1ade2f35d
50288fdadd4f2c6719ba5100a5b7984353cc215d 15-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against SQLiteException crash in MAP init" am: a0753c2c96
am: bf077b3e5d

Change-Id: I5ec78e3d5f58ffc294f5d866d70f532c46369795
bf077b3e5d54df12bfb9e3150cb96045a9d68a6a 15-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against SQLiteException crash in MAP init"
am: a0753c2c96

Change-Id: I0ac00f14ee5c1a95472d14ac036f845df86f7d60
a0753c2c964957aac18b3a7b4690e0268147c481 15-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Protect against SQLiteException crash in MAP init"
0905a86a66d6754469c00b5d154ffafe35f630b7 10-Nov-2016 Ajay Panicker <apanicke@google.com> Protect against SQLiteException crash in MAP init

Bug: 32717472
Test: runtest bluetooth
Change-Id: I533d7ca0b281291f931f4aca271ea9ff3214bdf2
luetooth/map/BluetoothMapContentObserver.java
9f70e8d5cf5075198e669497ba8df1ce43a85a4d 15-Nov-2016 Yoshiharu Kurita <yoshiharu.x.kurita@sonymobile.com> Merge "Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI" am: 5b71cc4c23 am: 226ac8d582 am: dc4d95a2e5
am: 3116c5ba44

Change-Id: Iff6162284500e62352c20e08e6ae57a61d313682
3116c5ba44bd983a7ec83294e8219dcb32688ac5 15-Nov-2016 Yoshiharu Kurita <yoshiharu.x.kurita@sonymobile.com> Merge "Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI" am: 5b71cc4c23 am: 226ac8d582
am: dc4d95a2e5

Change-Id: I5d4a3f96100c4e3bb1b4dd2d0543f6924b53831b
dc4d95a2e57a78c95167b8a97158d6e45c585ca9 15-Nov-2016 Yoshiharu Kurita <yoshiharu.x.kurita@sonymobile.com> Merge "Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI" am: 5b71cc4c23
am: 226ac8d582

Change-Id: I839f15f50e8d9cfe7819e3f4e94c67bf607fe4ad
226ac8d5828e83a2e1f73155f8ebb93d70ffe709 15-Nov-2016 Yoshiharu Kurita <yoshiharu.x.kurita@sonymobile.com> Merge "Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI"
am: 5b71cc4c23

Change-Id: Ie838a43f90e7f167ffe290bccf97f400718b4e23
ff27bef23cb3dc1a6b0fbb4fef71e52948f4849b 07-Dec-2015 Yoshiharu Kurita <yoshiharu.x.kurita@sonymobile.com> Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI

To retrieve not only personal caller-id but also corporate caller-id,
we need to use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI
instead of CONTENT_FILTER_URI.
This modification is required by Android for Work.

Bug: 28947490
Change-Id: Iee51c1bebf8ee41668bec305cf37d2cdfdda5e2e
luetooth/map/SmsMmsContacts.java
04ce6ce3e742f54e6de651e887358713c0e0c98e 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
luetooth/btservice/AdapterService.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
9efbac114fcfa9ac60d4f952033d6201b61a7b6f 12-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Unify advertising API (3/3)" am: e19d38fd41 am: 728915cdfd
am: 346ae998f7

Change-Id: I072b494a9009befb06ebbb5ac1685016cd404411
346ae998f72cf6752f5469e1879b0043e61db498 12-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Unify advertising API (3/3)" am: e19d38fd41
am: 728915cdfd

Change-Id: Ia0a11cf04ad8527752b7d196014298773de422ba
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
luetooth/btservice/AdapterService.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
7b929a5f67433636ac7651e6160abf8122705cfc 03-Nov-2016 Chris Manton <cmanton@google.com> Merge "BLE Check and send scan response data" am: 97f86114a4
am: 1794060bb6

Change-Id: Ic6b73fc114c56e0698c4f688ee21c5b861176611
1794060bb69d54f3bd027d9b41a6feaa21b1b88e 03-Nov-2016 Chris Manton <cmanton@google.com> Merge "BLE Check and send scan response data"
am: 97f86114a4

Change-Id: I34d73f42bd2403aea99621838ab55b8c0f1c2d56
97f86114a40281176c8feb81874427ee79c78745 03-Nov-2016 Chris Manton <cmanton@google.com> Merge "BLE Check and send scan response data"
e5b2af01a39c819f8bf20ca1ef46d6b05d84d20c 03-Nov-2016 Chris Manton <cmanton@google.com> DO NOT MERGE BLE Check and send scan response data am: 6bb2114adf
am: f48e98fe54

Change-Id: I5a00c0fcd551fcb4b351f27e18d8866901b724e6
f48e98fe5426fff27cc43c1f62117d506295f003 03-Nov-2016 Chris Manton <cmanton@google.com> DO NOT MERGE BLE Check and send scan response data
am: 6bb2114adf

Change-Id: I97ebca38b9a8d5e05decaa1b8a79d6ed789fb078
6bb2114adfde5e3dcd78860e6ea0a2271e0335b4 01-Nov-2016 Chris Manton <cmanton@google.com> DO NOT MERGE BLE Check and send scan response data

If there is scan response data, load it up during
when start advertising. The current stack does
not provide callback for these calls.

Bug: 32539880

Test: Verified scan response occurs with CL

Change-Id: I33effbf3aa3a60c3353d4ca7708ea06df8a05a7d
luetooth/gatt/AdvertiseManager.java
1bc4b2cc785b95ce3c702379a619fc77ece5b240 02-Nov-2016 Ram Periathiruvadi <ramperry@google.com> Fixing A2dpSinkStreamingStateMachine thread leak. am: f00c68aeda am: 2d98ead211 am: 7b55f9616c
am: 53a6d69c61

Change-Id: I223212657d8b0e0a792e8d8daaa683d2d3be2d2b
336f3def7331fd6d16df1c2d9d16f3209103cf34 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Now Playing List gets stuck in a loop am: 609f94bb87 am: 90c909d063 am: 982e9fd60e
am: b8e6858277

Change-Id: I663adb690e805023cb66377ed67b0569286ec872
0af860d51aa3a3580a951ce974ef3ba63fd2c570 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client am: 2ad555291d am: fb4eaf84e9 am: 171b6d19a3
am: 99ba123635

Change-Id: I3c6ce84fa0c8c7aff005ffc6d6a218ac0f1750b7
7e1e3e26a4ac4cb07fee3c1917a330463f1f72e9 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE iPhone connectivity am: c1c6d1d504 am: da21d7195c am: db2f50804e
am: 3925b745ec

Change-Id: Ie1e0e60c70d13c05110f96ac61532e3c62b2838c
dc463e06926036ed5e4c52bf725619a2f00f4acb 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE disconnecting automatically am: 7adf1f5877 am: 4be2ecfc28 am: 625b226af2
am: e85218701b

Change-Id: I7272d21aebee2d163914b3879f7c02dba5607581
a73b3040f8c8ebceb3c03007f50c0054382fc8a1 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE message filtering am: 12ae7442e5 am: 152e8de4cb am: f90514e44e
am: 2aca3035ad

Change-Id: I0defc5c3540c18dbd6418b2406f285d09c2b81e2
0cbf31862c9cce5e56923bf77e7f22666c7493f5 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Set debug flags to false am: 763f0e3db6 am: 753ae396ef am: 8c01c5bc54
am: fba9311f1c

Change-Id: Id1de13d2dc7644e264499a6fdeafced9b0f6376b
53a6d69c61a058241c55f966357ca9a3d3e4b725 02-Nov-2016 Ram Periathiruvadi <ramperry@google.com> Fixing A2dpSinkStreamingStateMachine thread leak. am: f00c68aeda am: 2d98ead211
am: 7b55f9616c

Change-Id: I60d3b45f2ff681d40155e9c0add3dcf1d47e9b25
b8e685827790658dff9c83593ad1ae9b04e6f65c 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Now Playing List gets stuck in a loop am: 609f94bb87 am: 90c909d063
am: 982e9fd60e

Change-Id: I8b61b2ff996d3b81009467b7819223e6f0ef9eb3
99ba1236351b1d57d042947ae9e92fb9019ce8d1 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client am: 2ad555291d am: fb4eaf84e9
am: 171b6d19a3

Change-Id: If1dad59318eba70512a4fa05663f2e07a1638dae
3925b745ec2c9fddad3d21333a72c1aafe1e71f6 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE iPhone connectivity am: c1c6d1d504 am: da21d7195c
am: db2f50804e

Change-Id: I95f1b452f4616e8c323259241b15cce14e287bcb
e85218701bf2e6ea3da1d0a978103befc366d61d 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE disconnecting automatically am: 7adf1f5877 am: 4be2ecfc28
am: 625b226af2

Change-Id: Ieb742b71d4e68814e07fd8f3aaed62fb05f064f3
2aca3035add86522e7c8d65f20f64d36130030f2 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE message filtering am: 12ae7442e5 am: 152e8de4cb
am: f90514e44e

Change-Id: I32d875a0e1b3572e387cbd298c20a3b320cd3e60
fba9311f1cc2b9f31ae558aed4b1ea529dbb2817 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Set debug flags to false am: 763f0e3db6 am: 753ae396ef
am: 8c01c5bc54

Change-Id: Ie158417007f1e43aa0bd249865eb5101f94350df
7b55f9616c783ba1c5092060e233461fa725e48c 02-Nov-2016 Ram Periathiruvadi <ramperry@google.com> Fixing A2dpSinkStreamingStateMachine thread leak. am: f00c68aeda
am: 2d98ead211

Change-Id: I3cf3a90a044ae57c740c13e19f702b7e5bd98667
982e9fd60ede5f32b2fe91229983e8ce4dd0a4bb 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Now Playing List gets stuck in a loop am: 609f94bb87
am: 90c909d063

Change-Id: I107c5c574cea56889cab5e48bc17c9e7c97011f3
171b6d19a3a2a792ed37edef7cf6da1063fe1ed1 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client am: 2ad555291d
am: fb4eaf84e9

Change-Id: I6e46eb2dec6d71146ec34ddc2a0091273ba303e0
db2f50804e2dc6d2fb625aaaa38df5689af38791 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE iPhone connectivity am: c1c6d1d504
am: da21d7195c

Change-Id: Icccc1b7ab6272b06943de09a4c2e79f96aef8b90
625b226af276d847bb719a318352b17bc77e2c43 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE disconnecting automatically am: 7adf1f5877
am: 4be2ecfc28

Change-Id: I2a8567ab486539e08ca1c618d27b3d0cf652b8fe
f90514e44e52d06f864c1134f4d1f8c4e9e27f36 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE message filtering am: 12ae7442e5
am: 152e8de4cb

Change-Id: I6c4f1cac46410ad6b79f1d1eb37a734db314d3ab
8c01c5bc548dfdc7a62acd55af13408d9babf3d0 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Set debug flags to false am: 763f0e3db6
am: 753ae396ef

Change-Id: I1dcc8f3c051bb251769c3c20b2a8a94acf6ea0fb
2d98ead211b35b4d1203a6eb95bfee25c198bf89 02-Nov-2016 Ram Periathiruvadi <ramperry@google.com> Fixing A2dpSinkStreamingStateMachine thread leak.
am: f00c68aeda

Change-Id: I1119f2ec7a050a0f76633f842e51b3aef778ec69
90c909d063314da3b91772e2e146d4d02baa4d0e 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Now Playing List gets stuck in a loop
am: 609f94bb87

Change-Id: Icd7d8a87b3d1840e37dbe80097a1c638e4923d45
fb4eaf84e9435cb77b9b579a1eee7de169038226 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP Client connect after PBAP Client
am: 2ad555291d

Change-Id: I1d54810f796fbad50b95a5f3552001826cd5d9c8
da21d7195c04275bebed22a9f9b75fc21595bd98 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE iPhone connectivity
am: c1c6d1d504

Change-Id: Ic40593a9bd0682ae099153995340b58e5008c1cb
4be2ecfc28aca6f70bbffbf8ff2ca943a1bfdd3d 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE disconnecting automatically
am: 7adf1f5877

Change-Id: I7dc26938faa42847a6de2c30bf0617b1dd8a5820
152e8de4cb8ce4a7e5c4893798d966c07f10676f 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE message filtering
am: 12ae7442e5

Change-Id: I16d85f63df0c390c4f437e9bda143725f3ae5f4c
753ae396ef16c5cfe386e7e86156300d2d4deb20 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Set debug flags to false
am: 763f0e3db6

Change-Id: I2732c0f72d32d6b3cdc9fb1596bc4a00b5135a9a
f00c68aeda2ec97a4382677754a1eab4429a235d 14-Oct-2016 Ram Periathiruvadi <ramperry@google.com> Fixing A2dpSinkStreamingStateMachine thread leak.

A2dpSinkStreamingStateMachine was being created on every Connection
leading to a leak. Fix is to Quit the A2dpSinkStreamingStateMachine
on A2dpSinkStateMachine's Quit() and create a new Streaming
StateMachine only if it is null.
Note that both the Sink and SinkStreaming State machines quit only
on Adapter off, not on BT disconnect.

Bug: b/32097580
Tested: On Mojave and Angler with bat_mas-userdebug

Change-Id: I7f2e3ac01ce5ff965afe407e3605cac00497af36
(cherry picked from commit af41a720081dd4e9d12e1b3f082e9202ae84252d)
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
609f94bb870727471a8c571ede2aa8cbbaf70f76 12-Oct-2016 Sanket Agarwal <sanketa@google.com> Now Playing List gets stuck in a loop

We are incorrectly setting the status of the Now Playing List folder to
uncached which makes it fetch the folder in a loop if there is possible
pagination going on

Bug: b/32051433
Change-Id: Ibcd26731c7ed4ac24d816c2f4529970e3a2f29cd
(cherry picked from commit ffded42f4a30a399738f23a4d36068e484fea8cb)
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
luetooth/avrcpcontroller/BrowseTree.java
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)
luetooth/btservice/AdapterService.java
c1c6d1d504fbf0344631b4416e51c8b0f61958a7 13-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE iPhone connectivity

iPhones do not fill in the tel: field in the originators vCard upon
receipt of a text message, this was causing parsing to fail as it was
assumed that every SMS message will have an associated phone number.
Updated logic to check fields more riggorously.

Bug: 32110763
Change-Id: Ie9135167ad957a2a8054ea414d3e9ec576d3271b
(cherry picked from commit b2e57a501b1719406776c795cfed4fd271707d79)
luetooth/mapclient/MceStateMachine.java
7adf1f5877056e639044a0620355e87888fdc799 11-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE disconnecting automatically

Disconnect commands were getting queued even if bluetooth wasn't
connected. This would cause the disconnect command to get processed
immediately after the connection succeeded. Updated logic to defer all
commands while "Connecting" or "Disconnecting" throw out any disconnect
commands at the head of the queue while "Disconnected" and generate
implied disconnect commands when a connect command arived while already
Connected.

Bug: 32080718
Change-Id: Ib02c74c753e88cf4876835ee8e5e0c8f2a6ebc34
(cherry picked from commit 2e8805b2ad2e8b70fb82fde37498922c92d15cb6)
luetooth/mapclient/MceStateMachine.java
12ae7442e59511a9e9d85eb5f76bc3bc5f3bec4c 07-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> MAP MCE message filtering

Remove message filtering from getUnreadMessages to allow all message
types supported by the MAS Server to be sent.

Bug: 32004537
Change-Id: Id88401bd290c3a33deb99da3d1673becebe40c7f
(cherry picked from commit 625bb6b6ad191d128b1404f457225cb94b7e70f4)
luetooth/mapclient/MceStateMachine.java
763f0e3db67879294d045fbca0f55b3b0244b266 06-Oct-2016 Sanket Agarwal <sanketa@google.com> Set debug flags to false

- Reduces the log spam
- Eliminates any PII information in the logs

Bug: b/31811551
Change-Id: I5c421ad50706043765ef3e82cb37a44d520ecb6e
(cherry picked from commit 8964818100fb71fa1f962aeb55fc1dd54e7a9fbd)
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
661793b4503cf3e7f723053cc77942a3be411184 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Logging" am: 1826359356 am: d5a4e1d6b3 am: 15acc96fd7
am: 011b36f286

Change-Id: I0d6f77868b99ec44fa1813dd6b9f48e4233424b3
011b36f286ad9e7638227034214988159fdffd2a 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Logging" am: 1826359356 am: d5a4e1d6b3
am: 15acc96fd7

Change-Id: I4cfdaeb5937113f1d731ea0d2e4121988658162b
15acc96fd7288a35402fce6896032408d8d8e335 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Logging" am: 1826359356
am: d5a4e1d6b3

Change-Id: I11a712fb891fce0da8ba612c263a7e97d2bbdf20
d5a4e1d6b330953d950c88ad3b4862d8c1b7caf9 02-Nov-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP Logging"
am: 1826359356

Change-Id: I3416940523563faaefe112564fb01344f0f579af
18ef7045b04916a7b29b50371de6b1b3efb0cbe9 06-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Logging

Move information about how many entries were synced to VDBG (and
disable) to protect any possible PII in logs.

Bug: 31855210
Change-Id: I67b0566d063411997ffda926cecd2e889f309b13
(cherry picked from commit ec955102ce72d61635f9eca1d904d803698949ac)
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/CallLogPullRequest.java
luetooth/pbapclient/PhonebookPullRequest.java
e4c14b7af0360e86e6057662324a06d7f9f609c3 02-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against adding a null config for the BT health profile" am: f8727080ea am: 868c01a6ba am: 5d09395a63
am: aa1e49fc9d

Change-Id: I53c58fba39966fe0c5580c947e8a05ca347c38a3
8811955e1d1f2f05a0b1061ac87e8a20d9a55d18 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "MAP MCE" am: db95af257e am: 577700754e am: ad6c649a1a
am: aea3aa12dd

Change-Id: I903844453d5289dec23f94a9d9b4fea233835f07
aa1e49fc9d82b4a71c9d421007f7724d2cc127ae 02-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against adding a null config for the BT health profile" am: f8727080ea am: 868c01a6ba
am: 5d09395a63

Change-Id: I57cd03674d71cf16e0382ed7f35be9e6e9c7c2ed
5d09395a632d3dd3579bebc821f48a541a45a236 02-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against adding a null config for the BT health profile" am: f8727080ea
am: 868c01a6ba

Change-Id: Id317a63729be7bebcdda167fe3d4f417252ed9e6
aea3aa12ddf8d247dce29536fc5e3cb6b9a99e40 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "MAP MCE" am: db95af257e am: 577700754e
am: ad6c649a1a

Change-Id: I8df7b50fe04c707824f396f6e07f296ce97f1961
868c01a6baa7a6a6703dc16695a53cfa2a5e914a 02-Nov-2016 Ajay Panicker <apanicke@google.com> Merge "Protect against adding a null config for the BT health profile"
am: f8727080ea

Change-Id: I96dc9eb3b033518474700ef05942d1e8a18d645b
f8727080ea27c6669095a0c942165508a05dfb80 02-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Protect against adding a null config for the BT health profile"
ad6c649a1a2d728337f8e7012e7b409e533500c7 02-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "MAP MCE" am: db95af257e
am: 577700754e

Change-Id: Ibe8375c60af53335f2c32fe6960bb0b9ba29c3bb
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)
luetooth/ObexServerSockets.java
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
luetooth/mapclient/MapClientService.java
luetooth/mapclient/MasClient.java
luetooth/mapclient/MceStateMachine.java
luetooth/mapclient/MnsObexServer.java
luetooth/mapclient/MnsService.java
luetooth/mapclient/obex/Bmessage.java
luetooth/mapclient/obex/BmessageBuilder.java
luetooth/mapclient/obex/BmessageParser.java
luetooth/mapclient/obex/BmsgTokenizer.java
luetooth/mapclient/obex/EventReport.java
luetooth/mapclient/obex/FolderListing.java
luetooth/mapclient/obex/Message.java
luetooth/mapclient/obex/MessagesFilter.java
luetooth/mapclient/obex/MessagesListing.java
luetooth/mapclient/obex/ObexAppParameters.java
luetooth/mapclient/obex/ObexTime.java
luetooth/mapclient/obex/Request.java
luetooth/mapclient/obex/RequestGetFolderListing.java
luetooth/mapclient/obex/RequestGetMessage.java
luetooth/mapclient/obex/RequestGetMessagesListing.java
luetooth/mapclient/obex/RequestPushMessage.java
luetooth/mapclient/obex/RequestSetNotificationRegistration.java
luetooth/mapclient/obex/RequestSetPath.java
abc538d128b495c2c05ba0a69f7c502354a06d40 01-Nov-2016 Ajay Panicker <apanicke@google.com> Protect against adding a null config for the BT health profile

Bug: 25340134
Test: Manual and UnitTest
Change-Id: I595a61050c88787d79db2527aa4387966680e166
luetooth/hdp/HealthService.java
094664ac823f9e00ae0ad7d0d1bf24fce25ff4bb 02-Nov-2016 Bryce Lee <brycelee@google.com> Merge "Implement new API for retrieving supported Bluetooth profiles."
am: fe33cb11e0

Change-Id: I2e50ad4fb53ac80e49e4ee72197beea3251e2216
fe33cb11e0dd1239a7503e069d1c1a099fa5e1b9 02-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Implement new API for retrieving supported Bluetooth profiles."
52fe544610fc30974fec62c5d79aad632c90d4fe 01-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Move start advertise method to advertising interface (1/3)" am: 108f20709b am: ec6d280be0 am: cb1300acc1
am: ad34482594

Change-Id: I0c8993eab1c8e7f41199120d973f05a864b9397f
ad344825946e8dea33c1c79a9472751f2741e51e 01-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Move start advertise method to advertising interface (1/3)" am: 108f20709b am: ec6d280be0
am: cb1300acc1

Change-Id: I2ead6cc74cdc7847a29a2ab18ebde28483f9a372
cb1300acc1126393f2ba8e816b541566a4ca5f9d 01-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Move start advertise method to advertising interface (1/3)" am: 108f20709b
am: ec6d280be0

Change-Id: Ia3d9d38ecac7f7868a7f36b464a7ab31841b7fd6
ec6d280be0abd084df14ee4c711bbba2aab47b7d 01-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Move start advertise method to advertising interface (1/3)"
am: 108f20709b

Change-Id: I9cfd2d12f5064ab5764db4c7cf600f22cb349a5a
108f20709b11dbdbaf0adcd47d2e123423dcce1c 01-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Move start advertise method to advertising interface (1/3)"
4ded021f96d858848e68b0a901848211694bbe92 01-Nov-2016 Chris Manton <cmanton@google.com> BLE Check and send scan response data

If there is scan response data, load it up during
when start advertising. The current stack does
not provide callback for these calls.

Bug: 32539880

Test: Verified scan response occurs with CL

Change-Id: I33effbf3aa3a60c3353d4ca7708ea06df8a05a7d
luetooth/gatt/AdvertiseManager.java
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)
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
55e02560b3399399052d465525eef98fbb1a5fee 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Fix connection state broadcasts" am: be63faf318 am: 45b8871b4e am: ec6a16ba8d
am: 9e5fdf9598

Change-Id: I05ce6b132936bc28d89fd9d2602f79ec7ac32dec
fe9a889d171cda7f66b4d1f5a1e777884246ff2e 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Return bool in AVRCP Controller API" am: 9dc8695a42 am: 10615a1e31 am: 4b1b1e6262
am: 836b6115ea

Change-Id: I85056c7d1775a593e3361084e755cf696c3ecf32
f9fa4736b4032fdd206a5102d54e75f66787d6d0 01-Nov-2016 Christine Hallstrom <hallstrom@google.com> Disable HFP audio path when HFP call goes on hold/resume when goes off hold am: 3ee63fdfb7 am: a76d5985c4
am: 2f712df63a

Change-Id: I87c54a3e38f0276ac7eecfb00574f788b18fc9dd
9e5fdf95986053306d07f644b9095d42c3cd90eb 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Fix connection state broadcasts" am: be63faf318 am: 45b8871b4e
am: ec6a16ba8d

Change-Id: I2a76816796c3767aa46002352372501d4268eec8
836b6115eafbacb53e8adb062750e01544bcbf1b 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Return bool in AVRCP Controller API" am: 9dc8695a42 am: 10615a1e31
am: 4b1b1e6262

Change-Id: I53aa1758f78c57925dd7bbe9705d46b6053d88dc
ec6a16ba8d71f44913041c01c5f64162169984b0 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Fix connection state broadcasts" am: be63faf318
am: 45b8871b4e

Change-Id: I6094c6e9e6774cbd342cc97bfc36969acbe16821
2f712df63a7861d0bca1e1fbac5411d0db05e2dd 01-Nov-2016 Christine Hallstrom <hallstrom@google.com> Disable HFP audio path when HFP call goes on hold/resume when goes off hold am: 3ee63fdfb7
am: a76d5985c4

Change-Id: Id074b069efa559420bf6f6bf0e1601e9605da2be
4b1b1e6262597330b110c349528c8e05e1c9c6d1 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Return bool in AVRCP Controller API" am: 9dc8695a42
am: 10615a1e31

Change-Id: Ifac5edcb1847bcbe0f8b5035e09a7286d3874e04
45b8871b4ecfd74f945c8ae38ac9699a5721ff70 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Fix connection state broadcasts"
am: be63faf318

Change-Id: I6d8a1b8771a7f20eaba6fc17092522fbdba7a87b
10615a1e3145c3e40aec56608e1c8af032f2a2df 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Return bool in AVRCP Controller API"
am: 9dc8695a42

Change-Id: I7eb500eb40baf8cefdb56c208be28021852c4ccc
1aa7d25cdc80a4653d5e9465f58008398ac03d96 04-Oct-2016 Sanket Agarwal <sanketa@google.com> Fix connection state broadcasts

- HFP was flipping states in case of timeout
- A2DP was not sending a disconnect when the native changed its mind
about which device was actually connected

Change-Id: Ic89292fe0d6730b8bbbc4746f8e5afabcd59a943
(cherry picked from commit d7e1c13d177fac7d6ef1dd36663f362470372070)
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/hfpclient/HeadsetClientStateMachine.java
4aad8ce02068598e90dd2cdcb8165dba9d152e22 31-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Move start advertise method to advertising interface (1/3)

Advertising related code should be exposed through
BleAdvertiserInterface. Move client.listen function into this interface.
Remove reduntant clientif parameter.

Bug: 30622771
Bug: 24099160
Test: no tests necessary
Change-Id: Ifa3ba482993264f2e737cb1ca44028941056631a
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
33d1e341bf1556f111881004f23c8cda7189e159 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "AVRCP CT: Add getPlayStatus API" am: 5ad0b29afa am: 7a6d3525a8 am: 5cb9b65147
am: 0b0f123d7c

Change-Id: Icde202ae45e2a0ec649d1eba2404050381dc92ae
5cb9b651479479066e1ea91cd899412c01cf2d69 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "AVRCP CT: Add getPlayStatus API" am: 5ad0b29afa
am: 7a6d3525a8

Change-Id: I269c73f71081870f08859a8d2a2313f0c27f498c
7a6d3525a85992bf3bfa0039061716271f451e34 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "AVRCP CT: Add getPlayStatus API"
am: 5ad0b29afa

Change-Id: I7f1d643f55e8a37e98977de8772eef2c522b1a18
2610dbb678b0bfb44f4dbef3bf1491a86c670e72 29-Sep-2016 Sanket Agarwal <sanketa@google.com> Return bool in AVRCP Controller API

If a feature is not supported then instead of timing out the return
value from the API can lead to a quicker UI experience.

Bug: b/31754876
Change-Id: I4f23700a5318c9b98e3c464f18f73a3ac41fbfcd
(cherry picked from commit 629c041bea58d7b48e81f222167e2ac0233d389a)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcpcontroller/AvrcpControllerService.java
ea14e69d8b1c7293869c0e4ae9180f36149a95b7 22-Sep-2016 Sanket Agarwal <sanketa@google.com> AVRCP CT: Add getPlayStatus API

- Required for PTS test case TC_CT_MDI_BV_01_C

Bug: b/31684931
Change-Id: Ieef8b408657931505f02b9ea408d9658ecb4a3e3
(cherry picked from commit 6eeb548cd2d00695c3492496b32780cda9e34795)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcpcontroller/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
3094e297ff2f74b54a5d424086f8a00be5214480 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Fixes for HFP & AVRCP am: 92926b8d8f am: 383bbcb844 am: ab7c4851a9
am: 3de0cb6ba0

Change-Id: I10b15ba30da4a1b47518b082ce686d5a5b243c8a
cf7f65c158b5c124a876407033b135793730a5a8 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Support Rewind and FF transport controls am: 827955c0a5 am: 5f29f638d7 am: 66b081047e
am: 412279553c

Change-Id: I567c16d288b363d1a16e09a6db6ecefccad88cb1
0f9bba2be46d87eac20db7068b437bcfe1a50283 01-Nov-2016 AnubhavGupta <anubhavg@codeaurora.org> AVRCP CT: Add support to send stop command am: 8955f548d6 am: a7b76a47f1 am: 7fbd374a67
am: 1fa7408b2f

Change-Id: I10f61b0da7de1d59035ed68c376eff3f35520cfb
ab7c4851a9ee15dd3cb517078c6807a432d64150 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Fixes for HFP & AVRCP am: 92926b8d8f
am: 383bbcb844

Change-Id: I7dd4de8c4a04cbc05815296d58c06f9fe3f81984
66b081047e8d4ed56eaffd592fd287e109df2be5 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Support Rewind and FF transport controls am: 827955c0a5
am: 5f29f638d7

Change-Id: I0868a8b2960d1733065200e91b73ac25fe458919
7fbd374a67808ace2ec208099df3eb8b7587e244 01-Nov-2016 AnubhavGupta <anubhavg@codeaurora.org> AVRCP CT: Add support to send stop command am: 8955f548d6
am: a7b76a47f1

Change-Id: I901f977e9ef3aae5c83d29c790fa3b8e81c4163d
383bbcb844bc6d994a9b73c1d131213110a6a588 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Fixes for HFP & AVRCP
am: 92926b8d8f

Change-Id: I65723818220c8ba4f27708f001e38d1cb8de4855
5f29f638d7becb37f1fe01ea32422d19e07c7589 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Support Rewind and FF transport controls
am: 827955c0a5

Change-Id: If55017dafbc03cb25528eadb4209b875fea5f8cf
a7b76a47f1e8646512f2ec1b582c14f7b1b78be6 01-Nov-2016 AnubhavGupta <anubhavg@codeaurora.org> AVRCP CT: Add support to send stop command
am: 8955f548d6

Change-Id: I1471ca86ce3f04d517a2594738bb57b71d1af72c
57502f92c164cdfc666890dfbed3523b9c7cd0ca 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement set addressed player functionality." am: ec761e2ee4 am: 6c18a401c5 am: 12259d157e
am: 4388579472

Change-Id: I9ca371a3e486460b037325964b0c039023fb0916
12259d157e5a930c4543ca1624744ce9f61c9739 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement set addressed player functionality." am: ec761e2ee4
am: 6c18a401c5

Change-Id: I1717bbcd8d67aba8064acb0c332f1f9d8b2ef13b
6c18a401c568f6c31f6ae84c05d34f5fc707adf2 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement set addressed player functionality."
am: ec761e2ee4

Change-Id: I521e25cc02f3574b1c1a8fccb7b90529dd443bd1
92926b8d8f6c2c1bd97868919204f5447603ea38 22-Sep-2016 Sanket Agarwal <sanketa@google.com> Fixes for HFP & AVRCP

1. Fix NPE for when the phone does not respond to a call
2. Add PTS hooks for changing vol up/dn.

Bug: 31661223
Change-Id: I3423fcf67a2ea0fad6b9efde7ef239dbb683b737
(cherry picked from commit ddc157dec97fc1e6c8272b27835a599f82a02e5e)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
827955c0a52a19c9ce15d34b10bc3bc8203690f6 21-Sep-2016 Sanket Agarwal <sanketa@google.com> Support Rewind and FF transport controls

- Mainly to support PTS use cases

Change-Id: If595d89f783c6bee4249fe5fc995ef2997eb2b0a
(cherry picked from commit bd2b6578e1b047aedcee6f8f3628ca793e482f3c)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
8955f548d6b4fe8dd7cb1b59280ba7f073b46d88 09-Sep-2016 AnubhavGupta <anubhavg@codeaurora.org> AVRCP CT: Add support to send stop command

Change-Id: I586b6c0657100a3d1c6fd59eaa2411cc31ca0297
(cherry picked from commit 8a0b4621c3c4c005447529970bb6f3db58bf7c3a)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
a7c3906cd449598a2960f9574a79edbadb96f034 16-Sep-2016 Sanket Agarwal <sanketa@google.com> Implement set addressed player functionality.

Bug: b/31554234

Change-Id: Ibe1170bae58e3a3d68dc942b998ca2deee3b27f8
(cherry picked from commit f178c8072f4478a8773fcda5759d825f0b41efd2)
luetooth/avrcpcontroller/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
luetooth/avrcpcontroller/BrowseTree.java
242cfb36b3c56b1a3b5fb192e1990ea58e13bfbd 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement non-blocking pagination for a long song list." am: 2e9d0c75a5 am: 248663d57d am: a10220a9cb
am: 2523236785

Change-Id: If25e97b55205fc040cc1b6d85094db607c2a5c5f
a10220a9cb69f74944d92b3ba7d83bf0b720035e 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement non-blocking pagination for a long song list." am: 2e9d0c75a5
am: 248663d57d

Change-Id: Ia6491ecba91599220c42d2a6a58a965e47f632a4
248663d57d54b04df37d6c010e7ea4f4834a0b6e 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement non-blocking pagination for a long song list."
am: 2e9d0c75a5

Change-Id: Ib7f8c48517b6001363cbf87d3851b964129a76bc
a42566d2001ad48046d3eb5743e1d90209acf91b 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Remove hashcode() override for Connection am: 6b7afaa650 am: 09301508f4 am: f0927455a9
am: 9152694d67

Change-Id: I57aed3878de6523c9c7bae9039588fc5d21d71d8
652eeb25d5ff05ff22de1edc186d6c2fe7f36842 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Handle the case of disconnecting -> active for PTS am: b88c0d7495 am: 52b2f37f2e am: 1f5ff49071
am: f42414976d

Change-Id: Ica75310228ce55f8b1e4583bd2ee85d054cc79a7
708dbf877120974e9f98bcff8fa8c86a473c603d 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Cleanup state while transitioning to disconnected. am: 4132738814 am: 7cdcca2d7a am: 3f0e495e43
am: d348a055cf

Change-Id: I9bb05f4485ca67f272b9c2b0870a6834fa343f92
f0927455a94dbebc6b8b5925b0b5309ce47611d6 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Remove hashcode() override for Connection am: 6b7afaa650
am: 09301508f4

Change-Id: Icbf51fce69233e33151d4790ae56eea94beb6ad7
1f5ff490719eb9487d2a0599e768f2b9b98f6a83 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Handle the case of disconnecting -> active for PTS am: b88c0d7495
am: 52b2f37f2e

Change-Id: I027254796e977dfc0360129047f5f7e08e5ed7ac
3f0e495e4313168543bd22c8f2068fb74edb3c5c 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Cleanup state while transitioning to disconnected. am: 4132738814
am: 7cdcca2d7a

Change-Id: I2c87365b95f61857f8a57740e9fd55667f383c22
09301508f4ebac529cce4fb76746d98e77844d72 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Remove hashcode() override for Connection
am: 6b7afaa650

Change-Id: Idff494034926074f4d569f55433ddf836a5552d6
52b2f37f2ec3f4cae224fb7e0cdcb404d5a9924c 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Handle the case of disconnecting -> active for PTS
am: b88c0d7495

Change-Id: Ied286050a3b8025a407a7bdedb688b7c4ec29cb5
7cdcca2d7a639c263e99f0a5972cf37965984671 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Cleanup state while transitioning to disconnected.
am: 4132738814

Change-Id: If3c6fb2a03f7383853610e0fcd18991365e54c82
8e509db28e65be858598365b3ad25d08532a32f9 26-Aug-2016 Sanket Agarwal <sanketa@google.com> Implement non-blocking pagination for a long song list.

Bug: b/31253501

Change-Id: I39f7ba180a33729301618db8191821ad2745917f
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcpcontroller/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
luetooth/avrcpcontroller/BrowseTree.java
c00ea05da87571946299e241996654d59765d6fc 01-Nov-2016 Sanket Agarwal <sanketa@google.com> Merge changes If009c2e0,Ib2097456,I032efd2d

* changes:
Remove hashcode() override for Connection
Handle the case of disconnecting -> active for PTS
Cleanup state while transitioning to disconnected.
b591388d33256915f8ba246ae3acfd798dcf16cd 31-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Make Bluetooth SQL query strict to prevent injection" am: 1b1bd218e6
am: 7dacffe598

Change-Id: I5c683cd4082ecf176d92e04fdc1b1da8264a4817
7dacffe5988fbad84aae40e8f8842eef59bb6a21 31-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Make Bluetooth SQL query strict to prevent injection"
am: 1b1bd218e6

Change-Id: I6d4c993987c673592d35349601d4805c5a0c90f1
1b1bd218e64873fce9ca632b449655c19a4562af 31-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Make Bluetooth SQL query strict to prevent injection"
7ee01948fa06e356d0da7cce88aae90f57d85a87 31-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement autoconnect for PAN." am: 63552e3412 am: d66ddc133a am: 3e0feaa6a3
am: beb0031397

Change-Id: Ie9615319e591a4db22e5c1308d7848737045a027
3e0feaa6a3377cb1cd9a5010f97fd2485f4474b7 31-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement autoconnect for PAN." am: 63552e3412
am: d66ddc133a

Change-Id: I957739007480bad7eda13c5c9b73c1ba5f1f6f00
d66ddc133abb68e91e4b7b1e62e53ec5ca0a57ca 31-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Implement autoconnect for PAN."
am: 63552e3412

Change-Id: I3c324a21a5d4f4f173084825d0e58a5da046195e
6b7afaa650ff89cc8f6a6580760307dc2657df92 08-Sep-2016 Sanket Agarwal <sanketa@google.com> Remove hashcode() override for Connection

hashCode is relying on the number of call which creates a race condition
when two phone calls with same number are created. It basically confuses
the stack about the object equality.

Bug: b/31271037
Change-Id: If009c2e0924fad540cf91bc8b0fa9b2f13404b7b
luetooth/hfpclient/connserv/HfpClientConnection.java
b88c0d7495471f3986844e8c8b2aca7f7f2f4c8e 29-Aug-2016 Sanket Agarwal <sanketa@google.com> Handle the case of disconnecting -> active for PTS

In case that a call goes from disconnecting to active and bluetooth
does not have time to realize that the call actually got destroyed,
we can get the telecom in a transition DISCONNECTING -> ACTIVE (or
RINGING etc) which it will not honor.

Bug: b/31159015
Change-Id: Ib2097456bc435810bb82ecdf79110f0bbcb63023
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
413273881431c8e88e81e6f4e8e969938d6d29e0 26-Aug-2016 Sanket Agarwal <sanketa@google.com> Cleanup state while transitioning to disconnected.

If we forgot to reset state while transitioning to disconnected in HFP
it could meant that further processing is stopped since the state is
unclean.

Bug: b/31088373
Change-Id: I032efd2dfd4f39db901c9f82bccdf452060e4d86
luetooth/hfpclient/HeadsetClientStateMachine.java
41922a948e47d8f7752211e8ded6dcd0280f23f3 05-Aug-2016 Sanket Agarwal <sanketa@google.com> Implement autoconnect for PAN.

Bug: b/30679978
Change-Id: I52c9ac49ec72a419e5f02c656abc46f2c7e4c7cc
(cherry picked from commit 599c56d2b8f09ee126b734b9c62727d255f3e8b3)
luetooth/btservice/AdapterService.java
luetooth/pan/PanService.java
luetooth/pbapclient/PbapClientService.java
bde9072307960ac90f44bfdc9dc80ee84f00bf18 23-Sep-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth SQL query strict to prevent injection

Bug: 20531462
Change-Id: I8a90c81b727415fa566547f66bf0f64872850189
(cherry picked from commit 760fe9462f8fd177a7c626742fa81486ef1ab770)
luetooth/opp/BluetoothOppProvider.java
760fe9462f8fd177a7c626742fa81486ef1ab770 23-Sep-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth SQL query strict to prevent injection

Bug: 20531462
Change-Id: I8a90c81b727415fa566547f66bf0f64872850189
luetooth/opp/BluetoothOppProvider.java
656e9afbf0e6ea26897742fd75c4937fedecfc7e 29-Oct-2016 Victor Chan <victorchan@google.com> Set session to active for A2dpMediaBrowserService. am: 887b468292 am: 945f1506d6 am: 65f8d89e12
am: 7a086467ce

Change-Id: Ia8b82ff84d46e304d462d1e847214c0ee2550b82
681804283974f4b4ea8a06a571b9aefdfe789a6f 29-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> handlePassthroughRsp parameter update am: 4d59223bd4 am: 60d5b131ba am: 707cd5d7ef
am: dcb58e3aca

Change-Id: I1b46cbbd88c0f7c0e535dc951a76f37e6f7c84a2
65f8d89e1284a72845a568b5638842a89f9337b8 29-Oct-2016 Victor Chan <victorchan@google.com> Set session to active for A2dpMediaBrowserService. am: 887b468292
am: 945f1506d6

Change-Id: I89e0d63ea837072d01bdedcc3608973a4d671ca4
707cd5d7ef3e5ae7df246e5bccdfd2691991c394 29-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> handlePassthroughRsp parameter update am: 4d59223bd4
am: 60d5b131ba

Change-Id: I2885571fdde995e3f8b6bbe8c210e14da2bef3e1
945f1506d634b9b064c0dd9e3233016276cc751c 29-Oct-2016 Victor Chan <victorchan@google.com> Set session to active for A2dpMediaBrowserService.
am: 887b468292

Change-Id: I7b3456e157fb0ad9a485687390f4011154e5a9df
60d5b131baf55ae762dcd27ddd0318643348ff9f 29-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> handlePassthroughRsp parameter update
am: 4d59223bd4

Change-Id: Iad003e602be0b1e0ed1785ee9b8a5f3fe88d4d7d
2b42a4906be952d3761d8b47134fba5a277a7765 29-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I2e454747,I780186f5

* changes:
Set session to active for A2dpMediaBrowserService.
handlePassthroughRsp parameter update
a7b8ff8d1eb13325a57df87509819e5a5ba2d7f2 29-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent bonded device from being removed from the property map"
am: 24f283e25f

Change-Id: If300ffa03ef3598a789c9139be24c6aba9659693
c2e323fb6c2a9499751736c06661ceb372bde67b 22-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent bonded device from being removed from the property map

Bug: 31947953
Test: Manual
Change-Id: Ia2d25b305c07949a9251af83e855db4511ff887f
(cherry picked from commit c4b1ccb46884a0e23e5411f2bbb2da72fcb267ca)
luetooth/btservice/RemoteDevices.java
350d235bb2ea295d21dea6b935e446827a20eba0 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Improve connection handling logic in ConnService am: 2a32ce9915 am: cbcfc80014 am: 75805c1776
am: b08daa60d9

Change-Id: I611de9172cf2eb13da8859513c164b8a7d05064a
42efd1fb6cff82730d227ddd4353198df5847764 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Let audio HAL know when BT is turned off" am: cfd98a3959
am: 371374f26b

Change-Id: I576f834b784f7d45b2bebc0a9d0a8fc642474fdd
bafcd881332329c37034e188caef1c60d5b6f19f 28-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP over L2CAP am: b2c3dc9562
am: a93f49fbdd

Change-Id: Ib9b7b9a66330c1ef697e1d48a36fe75040694f0f
243796884fd490da09523e7aa7af50e9130b4a4b 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Unset the priorities for car profiles on unpair. am: cdc84a399a
am: 926cb6d179

Change-Id: I2443419b1fe1187e87f5110c16baac749479f8a3
34f9dc8954e9f14ff60f20e451dcf3acc41f4470 28-Oct-2016 Sanket Agarwal <sanketa@google.com> HFP should timeout in Java services if Native never replied am: 525bb0caa0
am: eba3bd322b

Change-Id: Idc4c3763f9b627f4807e016216aee2e05140eedc
ed5e8c93e26468401a3f3c431602566d7837be2b 28-Oct-2016 Sanket Agarwal <sanketa@google.com> HF should wait for AG to change conference am: 1ec9ba7d55
am: 3ca51430ac

Change-Id: I60a146aae2caff6784e84aa036cd0cf4e1b3da41
48dd7359e10673485405b2b49b16dd67cebcd749 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Conference calling via HFP am: edb38dfa0a
am: c22c1370b2

Change-Id: I0d0579120cd979bdb72b339e641e0b539cc7e324
75805c1776693b52d35cfe6d475c61bde1b44dd6 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Improve connection handling logic in ConnService am: 2a32ce9915
am: cbcfc80014

Change-Id: Ic08adb7d1c663762ff3698071d64b1ce874a3d06
371374f26b1527d1efdbc82929b0286da61a66b5 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Let audio HAL know when BT is turned off"
am: cfd98a3959

Change-Id: Ia3c9f7592d25b6426ee5260d90abe98badeea838
a93f49fbdd78ac55fa0681f4043c086b87e1346f 28-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP over L2CAP
am: b2c3dc9562

Change-Id: I1731e397c57289b0894d54f69c54765ce30782c5
926cb6d179292a5423600455300c4623f274b18e 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Unset the priorities for car profiles on unpair.
am: cdc84a399a

Change-Id: If11d1ee390146ac9d88a9e766a82a9086145361b
eba3bd322b81a6b8aff9df8af724d6ad93d209d9 28-Oct-2016 Sanket Agarwal <sanketa@google.com> HFP should timeout in Java services if Native never replied
am: 525bb0caa0

Change-Id: I6e9deec5b80689ac1916900eb5ed9834848edecd
3ca51430ac3e3d740559a9e700996d3dade43e2d 28-Oct-2016 Sanket Agarwal <sanketa@google.com> HF should wait for AG to change conference
am: 1ec9ba7d55

Change-Id: Ia1f3bec0f045b53617632ecc026c0d3c135e36ad
c22c1370b2f3e63eaa9a702df8440186d23abcb0 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Conference calling via HFP
am: edb38dfa0a

Change-Id: I66987c64796a88b861fd81c8f9729216a3419d91
cbcfc80014b0a8f4343b8d9b25091080df79e01a 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Improve connection handling logic in ConnService
am: 2a32ce9915

Change-Id: I042b3a58fe83a76252096ba1db18a69a4a1c2f54
887b46829235828923e4952db84fb8250c35dcc4 26-Mar-2016 Victor Chan <victorchan@google.com> Set session to active for A2dpMediaBrowserService.

Bluetooth Audio playbackstate was not appearing in the overview since the session was inactive.

bug:27859156
Change-Id: I2e454747efe8724daa8c5375b193cf00638aec5d
(cherry picked from commit c1b48cf21758e627fb9738a176fb1aae36c27c65)
(cherry picked from commit 519bb218e810383f12182e3fa4b68234339a2861)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
4d59223bd4d3b8a0bea746dd41ac1a4babf5478a 25-Oct-2016 Joseph Pirozzo <pirozzoj@google.com> handlePassthroughRsp parameter update

JNI changed the parameters to include the bluetooth address to support
concurrent connections but did not update the Java side.

Bug: 32404445
Test: Start bluetooth adapter with avrcpcontroller enabled observe that
bluetooth stays on.

Change-Id: I780186f5ea7e6e4b1a4f1c110df7e94e775f6019
(cherry picked from commit cbea1c575b95e219fcbbd5c4bcab8efd19b19976)
luetooth/avrcpcontroller/AvrcpControllerService.java
0127919805131d25a3470522ec28ca67f37b7adf 21-Oct-2015 Satish Kodishala <skodisha@codeaurora.org> Let audio HAL know when BT is turned off

Audio HAL needs setParams("hfp_enable=false") when BT is turned off since if it does not, then
the next enable setParams("hfp_enable=true") does not succeed due to
audio HAL being in a weird stage.

Bug: b/29937812

Change-Id: I111e38cbe578fe3eca66b07da8ad9204d064a02c
(cherry picked from commit fcc828915490c65f7c9ae2073a57ee9f0efadb15)
luetooth/hfpclient/HeadsetClientStateMachine.java
d4be1bd1fd36f9f0c8f412484217a923d854351f 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge changes from topic 'merge_remaining_car_dev'

* changes:
PBAP over L2CAP
Unset the priorities for car profiles on unpair.
HFP should timeout in Java services if Native never replied
HF should wait for AG to change conference
Conference calling via HFP
Improve connection handling logic in ConnService
c443d0f5950978dd53a423642ad49171e7b00b99 28-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Limit number of stored device properties"
8121b104427d7aaa8e2a0df2566188ddf23ef662 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Redesign HFP Client call handling" am: a5008e1a9b
am: 4849e4460d

Change-Id: If8388ca39adc6b2b6fee2b0f4a5039366e89dedb
4849e4460d4983baaa0f80ece271fa24aa46d5d5 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Redesign HFP Client call handling"
am: a5008e1a9b

Change-Id: Ibe73e9f82e00d10fd9693d68d318b292bdba94f4
b2c3dc95628314b060cef05d59ce2fe4ef747b84 26-Aug-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP over L2CAP

Update PBAP to be compliant with socket connections over L2CAP in
addition to RFCOMM. Additionally now requires SDP to complete before
connection.

Bug: 31062208
Change-Id: Idc991d871e9a67c7d6b631cafbfb98ff45d63c38
(cherry picked from commit ea2543a5009459fee3581d2fd8b2271511d31a4c)
luetooth/pbapclient/BluetoothPbapObexAuthenticator.java
luetooth/pbapclient/BluetoothPbapRequest.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/ObexAppParameters.java
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
cdc84a399a2fc8b7a48f28877da7125ae6b50a24 22-Aug-2016 Sanket Agarwal <sanketa@google.com> Unset the priorities for car profiles on unpair.

When the device is unpaired the priorities should not be retained since
on the next pairing we will persist priorities if they are anything
other than UNDEFINED.

Bug: b/31021525

Change-Id: Ifd7dbf93aff3abcd0f6207395fbac90480624415
(cherry picked from commit cd29fbf80159c5a7d4573f1eb9d3eee751084f48)
luetooth/a2dpsink/A2dpSinkService.java
luetooth/btservice/BondStateMachine.java
525bb0caa0d8f4a8093890cab4bc058ef909a637 15-Aug-2016 Sanket Agarwal <sanketa@google.com> HFP should timeout in Java services if Native never replied

Usually Java services should be failsafe to avoid any states
where it could be stuck listening to lower levels.

Change-Id: I0bdf511878ba773a94b00004951b1f8a94d978f5
(cherry picked from commit 7e7b555fc9539f5d9def892208b416c095543303)
luetooth/hfpclient/HeadsetClientStateMachine.java
1ec9ba7d555fc54f5b60aeb06fb38cab26f302a0 06-Jul-2016 Sanket Agarwal <sanketa@google.com> HF should wait for AG to change conference

We should always wait for AG to make changes to the call before we show
it to the user so that the UI does not get confusing (inconsistent).
Currently we are not waiting for the conf. call to be
disconnected/established by AG before we show this on our end.

Bug: b/29898872
Change-Id: Ia9198958122e9e539fb6f2a6f08942d3174ae2fc
(cherry picked from commit de8d996c5eb073949210f53b739ef12c2c3054ee)
luetooth/hfpclient/connserv/HfpClientConference.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
edb38dfa0ab86e2e747a6d5799138c8445013789 30-Jun-2016 Sanket Agarwal <sanketa@google.com> Conference calling via HFP

Following scenarios are supported:
1. Accepting incoming call when there is an active call (Call Waiting)
-- We always put the active call on hold.
2. Rejecting incming call when there is an active call (Call Waiting)
3. Merging calls after (1) and going into a conference
4. Ending the conference

Bug: b/29898872
Change-Id: I630bf6d7149fc12eea67f4a49b24fe500f3913d3
(cherry picked from commit 2b32bc5c037a04239b24e3bdb7d193d0091eac02)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
2a32ce991573191acde4d5d2f875658ada301874 29-Jun-2016 Sanket Agarwal <sanketa@google.com> Improve connection handling logic in ConnService

Connection for HFP HF role in Bluetooth is currently trying to
handle all cases of connected vs disconnect HFP. This can be offloaded
to ConnServ where the connection lifecycle should be maintained (and not
in the connection itself).

1. Fixes NPEs generated by the BtCarHfpFuzzTest.
2. Reduces the number of calls to AT+CLCC

Change-Id: Ibccadb7721cbbd2260cbfc5685d66027277e8a59
(cherry picked from commit 1ff2e6e9306272bd113c8633c9b52fb169eddcb3)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
465bb42f5bcb1147e8bab5ae10cbc871baeae14e 22-Sep-2016 Andre Eisenbach <eisenbach@google.com> Limit number of stored device properties

Bug: 31651689
Change-Id: I6e31b4f89d6ebf9e6a0c6df5ea4e1a7be61a125a
(cherry picked from commit e8d2b5c0f591311c90e428d88b94cd89b88ed342)
luetooth/btservice/RemoteDevices.java
ca6e7c65b87c52f5e81b273d7ad979a81b52f991 28-Jun-2016 Sanket Agarwal <sanketa@google.com> Redesign HFP Client call handling

1. Use UUIDs to interact between the upper layers and state machine.
2. Centralized place for managing calls.
3. Mechanism to co-relate outgoing calls with the AT+CLCC reply
4. Get rid of non-ECC hacks (we basically do not support devices not
supporting ECC)

Bug: b/29788044
Change-Id: I497c59583124825fad9be800a7c0a53920e67d4c
(cherry picked from commit 05462fe44531f887fe91ac173ec645e91b236025)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/ConnectionKey.java
luetooth/hfpclient/connserv/HfpClientConference.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
3ee63fdfb7fa5896bff7e172be60c763919c9f63 27-Oct-2016 Christine Hallstrom <hallstrom@google.com> Disable HFP audio path when HFP call goes on hold/resume when goes off hold

This fixes the issue where a cellular call made to a watch when an
HFP call is in progress causes the cellular audio to go through the
HFP path.

Bug: 32164561
Change-Id: I179ba4e1f1a1e76496f3062cc29bc20014fe5661
luetooth/hfpclient/HeadsetClientStateMachine.java
8b57adfba71cdd6e0f287963460841cf7791fd5d 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Remove calls when device gets disconnected" am: 680396106c
am: e6c65c2966

Change-Id: Ideb94b0a4d1ac6aba2956f4409992fd3d17f569c
e6c65c29667cee7581b01a26097810e5dba24465 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Remove calls when device gets disconnected"
am: 680396106c

Change-Id: I19a0dd745520700895c036aca02b747d86cff401
fe8c324138eccb4812b802a46bf94c52a6ea1d7c 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Normalize the number before inserting into list of calls in connectionservice am: c557430697
am: b0416d1444

Change-Id: I4d4776d1367b20cf1dbe7ba491194ad98b3bd1fd
49c6c4a6272070d2873404fb3db83255e7243669 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Owner Card" am: 0d75b08f2a
am: 7ff044a7d9

Change-Id: I2dc259c7df765979726cb4ee6d75b07175e9b09c
eda7a9850530e3607d2d4f1cacefe363dc6b7b98 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP Handle IllegalArgumentException" am: b1f66e2a5b
am: 455497b3a0

Change-Id: I025d27e6446d5f36baa69e4ba50c8a01839be51f
5f6e49eb95560886e9ff4413948612d7585eee6e 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Remove contacts at shutdown." am: c87c400b9f
am: 92e5069fb4

Change-Id: Icc8967195068df4bfc4291ff46a37e638dc28011
b0416d1444800592c28fc3fe7cc3fc3425fc814c 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Normalize the number before inserting into list of calls in connectionservice
am: c557430697

Change-Id: Ifb64098dfcb5094090058b69b5a78fd43e5f8173
7ff044a7d90b52e3e1d6091770211b88208c06aa 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Owner Card"
am: 0d75b08f2a

Change-Id: Idc939600af1e7d0426c76a7763cb300e20bec6c6
455497b3a08c5f418de4d477b59b2681b59239ad 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP Handle IllegalArgumentException"
am: b1f66e2a5b

Change-Id: I70ab4ab2623030c7c92b1a42b1287dd190111936
92e5069fb4b0c07564980a5545854fd6114b206a 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Remove contacts at shutdown."
am: c87c400b9f

Change-Id: I6e27f156629f4c5d4cdb84c1b60aa09a156b50af
44af936f673e7b14dcb994cab349edf7f57645c1 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP check device on disconnect" am: caad481d6e
am: cb7d4a6b0b

Change-Id: I9af458b0d267c0e4c43a8a07f1411edb577b692c
939044a7da79e96ccceaf5f98adc7892bfdbb011 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Bluetooth Connect Other Profiles" am: f6d6a68b55
am: 0b1142f8e6

Change-Id: I7e0147623025ee3d80485e8610df74f43aeaff07
3557be73466390d07c89b6970fe6be8f8c947dc8 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PbapClientStateMachine legacyCode removal." am: a7097d64ed
am: 0487e85af2

Change-Id: I932aff091af48509442bad201d91f46836877199
fd29a650e71b622d489f49ebb28108827aa135d9 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP vcard parser" am: 323dce928b
am: bc6dd05401

Change-Id: I8398184b9c6ca0208be52988f96dcbdf2e60a939
cb7d4a6b0b3e24ae838ecc6a2c8c8b4b11f42768 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP check device on disconnect"
am: caad481d6e

Change-Id: I482eb1672b0683f5b485d53b02e3bb6d541da6f9
cbaeac78c3139b007c2a3d766c100f2cb973e3e4 21-Jun-2016 Sanket Agarwal <sanketa@google.com> Remove calls when device gets disconnected

Bug: b/29170324
Change-Id: I4e9ae948801f80d8f22fb737812e1ed403077bff
(cherry picked from commit 8b2711a9c8537df86e73a0d01b9c3f737f29c643)
luetooth/hfpclient/connserv/HfpClientConnectionService.java
c5574306972592c1c2b9db5ca67ad49174605c12 20-Jun-2016 Sanket Agarwal <sanketa@google.com> Normalize the number before inserting into list of calls in
connectionservice

Number often get rewritten with brackets (or prepended with +). We take
a simple approach of removing non numbers so that rewriting can be
avoided.

Bug: b/28719753
Change-Id: If1525ea8564997e7ebe6ef63fccbc3c113b88e1c
(cherry picked from commit 7ec95a31b30a586d1b58a892651dee2e80abddad)
luetooth/hfpclient/connserv/ConnectionKey.java
70688bcd795de95f2d3e218aa6f2488f329bf3b8 04-Jun-2016 Joseph Pirozzo <pirozzoj@google.com> Owner Card

Start phonebook download at card 1 to skip owner card.

bug: 29127941
Change-Id: I1d85cb4a6a372a707081aee7dd4936c83babf888
(cherry picked from commit 0ac9cfe106b82a1c58d859c1fbb0181a654af9b4)
luetooth/pbapclient/PbapClientConnectionHandler.java
a1122651e6c22208c08f610c00f4edaaa66ae4ac 09-May-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Handle IllegalArgumentException

When purging call log at startup handle the IllegealArugmentException
incase the call log content provider does not exist.

bug: 28671866
Change-Id: Ic02b4382be94f62908c90f175b9f165f3742240c
(cherry picked from commit 0d4b767f9b815a5d6a12e30860a83f5fa3cf8bbe)
luetooth/pbapclient/PbapClientStateMachine.java
ac43017192acb95e4fc6f3bac142f463da257864 05-May-2016 Joseph Pirozzo <pirozzoj@google.com> Remove contacts at shutdown.

If the bluetooth adapter gets turned off clean up PBAP contacts.

bug: 28630194
Change-Id: Ibaec25d6f1f5f5aca4dc00c0437af54d3d534be4
(cherry picked from commit 16159961f4060636b4f778b39ef2d006807fc803)
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientStateMachine.java
0b1142f8e6187a88e41c5ab465ce13ecded2c468 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Bluetooth Connect Other Profiles"
am: f6d6a68b55

Change-Id: I9fc12f90bb9f7bef1b4d616647060d49a1d8206b
0487e85af2bfe4a0ebe476a68c286fe217ba32e9 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PbapClientStateMachine legacyCode removal."
am: a7097d64ed

Change-Id: I5f806c418f55b22a6950f75d95ca6b33ca78ba15
bc6dd054014e16ad23e13f9f643c48fedca773b6 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP vcard parser"
am: 323dce928b

Change-Id: I52a13de5e6081ab1eeda494c14400f95fd66ec18
361e9498e4c02366c56ae579c4b4ff72cce52ea0 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Connect PbapClient Profile" am: 774fe94dc4
am: 0d9746e404

Change-Id: Ibc41927077b2eda434010e5f5ef75a5bb688e781
b6d0cf0b37d7bae8f835690d8cc4585b6e2570a4 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP Download Contacts in state machine" am: 511c4d82aa
am: 232f791afd

Change-Id: Ie25cd245ec400da5699bec2483b9d483503235e7
07b789e8bb035c834ca977d40034405f081abe56 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAPClient State Machine" am: 8fb6cc9cbe
am: 9de3d56f9f

Change-Id: Id87fd18a5220edea6a2e1344151c47931a9d62d7
d7462e7b2c4cdf4ca16fd7177ab29511ad9215f4 02-May-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP check device on disconnect

Upon receiving a disconnect message in Connecting or Connected verify
that the disconnect command is for the current device before
disconnecting.

bug: 28406739
Change-Id: I55498aa01a95c1ab9de1bda21c30db9c241dacc1
(cherry picked from commit 9541d943d7ca14b2e154199eaadce67a4bf12704)
luetooth/pbapclient/PbapClientStateMachine.java
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)
luetooth/btservice/AdapterService.java
cc9b268c333198db613bd98656da15f29e325155 28-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PbapClientStateMachine legacyCode removal.

Eliminate dependencies and remove unused code after the state machine
redesign.

bug: 28249138
Change-Id: I95b362136609a8de033a057578c1b08bd46cced3
(cherry picked from commit 992274c189ae23ce454fa2136c1b164105006004)
luetooth/pbapclient/BluetoothPbapCard.java
luetooth/pbapclient/BluetoothPbapClient.java
luetooth/pbapclient/BluetoothPbapObexAuthenticator.java
luetooth/pbapclient/BluetoothPbapObexSession.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBookSize.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardEntry.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListing.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListingSize.java
luetooth/pbapclient/BluetoothPbapRequestSetPath.java
luetooth/pbapclient/BluetoothPbapSession.java
luetooth/pbapclient/BluetoothPbapVcardList.java
luetooth/pbapclient/BluetoothPbapVcardListing.java
luetooth/pbapclient/CallLogPullRequest.java
luetooth/pbapclient/ObexAppParameters.java
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapHandler.java
luetooth/pbapclient/PbapPCEClient.java
luetooth/pbapclient/PhonebookPullRequest.java
luetooth/pbapclient/utils/BmsgTokenizer.java
luetooth/pbapclient/utils/ObexAppParameters.java
luetooth/pbapclient/utils/ObexTime.java
0d9746e404c2a67e9174b191627b938ee70dd0ae 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Connect PbapClient Profile"
am: 774fe94dc4

Change-Id: I9c400a9b0905cc78e469e1824f8c64b20212143b
232f791afde2ff0b8ba8945289ee902e604c50d5 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAP Download Contacts in state machine"
am: 511c4d82aa

Change-Id: I7da795776a6d429c7e5e6be5e01c5954ee840f6d
9de3d56f9fc4a90806113ce43bc4141b7a4edc6e 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "PBAPClient State Machine"
am: 8fb6cc9cbe

Change-Id: I68b34c47aeb0dc52b6a6f9c1af4b5cad7c7816f0
64dcaf0f21762473fbf8242fd35066533e17ce44 27-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP vcard parser

Use the built in Vcard parser library for parsing Vcards rather than a
locally defined one. The Vcard parser library includes support for
photos.

bug: 28177843
Change-Id: I3f335ff12ceec12e51a2b8628c320ede06342259
(cherry picked from commit e14009c22dfce52531f4e34fc1d58a9440539140)
luetooth/pbapclient/PhonebookPullRequest.java
a3d61e3a5d5a80a3eb1e0db76efe3dd1a1f7d337 26-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Connect PbapClient Profile

Update code on CarKitt to appropriately connect the pbapClient
connection when another bluetooth connection is made or the adapter is
powered on. This logic is necessary since pbapClient doesn't accept
incomming connections and the bluetooth connect command may not have
originated from CarKitt.

bug: 28249138
Change-Id: Iaf15ece5115b2f3cf6ef45af1d6ab8da17e0c303
(cherry picked from commit 8b0649c5b76fb40fe0acb7772a71fa3ca727c34e)
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
e950b9d396056707ec5560f6675020974b8bd494 22-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Download Contacts in state machine

Add refactored code to the new PBAP state machine to implement the safe
downloading of contacts. Key improvements are no internal state
handling, no complex message passing, and an improved ability to abort
and handle error conditions.
bug: 28249138

Change-Id: I30aa6ab6730d92e3ec797392ee9a1be7f55fa46a
(cherry picked from commit 8bc55a6586b985f3f9d7a7c796a86fdc47c9b4b8)
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
e0a3b23b18192f409d90ba08f8c8bd1b0c321160 20-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAPClient State Machine

Refactor PBAP Client code to function as a state machine. By
consolidating threads and state tracking there is less duplication and
less opportunity for conflicting combinations of state.

bug: 28249138
Change-Id: I20de8041b83024a03bfbb60102c44b4e26579553
(cherry picked from commit 427695a7992c8fc3fb503794bbaff1f705451133)
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
8fce0efb091738c4d2888cfc239d6a7d1caa3edc 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Tackle changing phone numbers by relying on IDs wherever possible." am: 2a234c6e9f
am: d05706a7ca

Change-Id: I87cc2ec642b41db6886ded1842f6b53fb09129f6
d05706a7ca025c6b0db3ce8932c85b504bbbbdb9 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Tackle changing phone numbers by relying on IDs wherever possible."
am: 2a234c6e9f

Change-Id: If6aa63a1923eee3bfa2ed801d91db636b560acec
d6b566fb2997ff4b9bab359f4ceb636df8001b1f 17-May-2016 Sanket Agarwal <sanketa@google.com> Tackle changing phone numbers by relying on IDs wherever possible.

AG can rewrite numbers (specially with international numbers) or simply
with brackets or other annotation. We currently do not handle such cases
well since phone number match is not accurate. Instead of relying on the
numbers them selves, we rely on the capability of AG to tell the ID of
the call in question.

Bug: b/28719753
Change-Id: I97842188f174072caf7f03e18b0597ac1912be17
(cherry picked from commit bb3dc297c976f4fab23f93f9cae00cd495739ea4)
luetooth/hfpclient/connserv/ConnectionKey.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
3fbd4c5eb200219ca355ef62577e184c3dfef623 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "A2DP MediaSession active state management and NPE" am: b116845cdd
am: 24f17debbf

Change-Id: Ic8844aea9662bf4ce91524854e452ecd0bb31b28
24f17debbfad7eaef578d27d07458cafb2142c09 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "A2DP MediaSession active state management and NPE"
am: b116845cdd

Change-Id: I645f11df37ae4b99abbd569f8761ba7cc69289ca
af075aed79dc450c7e9eb5359e80c7c3665568ce 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Race in hfp call termination when local termination faster than HFP update." am: e1c4c4cd25
am: d716e5cb93

Change-Id: I6e24ab3d6e807a2db922ad8f6f6c30b3e35712dc
d716e5cb934d418f525ec88cf9f92881e8b0f708 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Race in hfp call termination when local termination faster than HFP update."
am: e1c4c4cd25

Change-Id: Ide8de881d3b242ec3baf28fd2dcea0dec57ec783
974aa63dcf9fa79be242267d8169bdfa5954b553 22-Apr-2016 Sanket Agarwal <sanketa@google.com> A2DP MediaSession active state management and NPE

UIs (such as SystemUI) depend on MediaSession.isActive state to
determine whether to show it on the overview (or shades). Currently we
are keeping the session active ever since the first bluetooth connect (A2DP) happens.

This change makes the session to be active when the device connects and
the first play happens (i.e. the play state of remote device
irrespective of who initated it) and in-active when device disconnects.

Also, avoid a NPE that may happen due to races between delay in
broadcasts and accesing bluetooth state machine.

Bug: b/28345602
Bug: b/28330860

Change-Id: Id7686308ada0b608b959258d137772ee5f24c18f
(cherry picked from commit ffb10b682610a24d5c54e8828c11276fe5703d65)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
2b48337c2b9a20298bd5cbf363366b16bc4b917c 20-Apr-2016 Sanket Agarwal <sanketa@google.com> Race in hfp call termination when local termination faster than HFP
update.

If we make a call from the CarKitt and terminate it immidiately then the
CarKitt assumes no call has been created since phone hasnt replied yet
to the message from CarKitt. When it does reply, the CarKitt throws that
message away because it did not handle the intermediate state of
disconnection properly.

Bug: b/28122608

Change-Id: I98105fd36914612fc96cba4d56db97b342822ffa
(cherry picked from commit 57a102e5548a7a395bcd7feec3c1df6d61be8187)
luetooth/hfpclient/connserv/HfpClientConnection.java
93323324dd9d735180626d6fba325fb917f91aa9 28-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Separate LE scanner from GATT client (2/4)" am: c10a46f70f am: c020464494 am: 77da2e5bfe
am: 6584405db9

Change-Id: I2270b8a83a15d3241006e1fb39163be159135685
7092317e9b38929d1a53e0eadedcb4122ab1ef68 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Replace NOT_SUPPORTED string constants with empty strings." am: fe24c5e475
am: f0ee7c09fa

Change-Id: I7ad543ebcf26b6f42d8b5a3dda01d9d5c08bfd5f
f0ee7c09fa3f1ff3ba5da4c31e36dac2d52314d8 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "Replace NOT_SUPPORTED string constants with empty strings."
am: fe24c5e475

Change-Id: Ie296bd441a990cb9f99167c0fe67bd5adeab7a2d
9c509a704a715e47c9b36aefef0deafe8bf8277b 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "A2dpSink sends CONNECTED instead of DISCONNECTED when connection timeout" am: fda02ace5b
am: 8f8bdc8380

Change-Id: If2e4bc96c5cb2afe6ec43b38e68967195e1bb023
8f8bdc838049210e99595b127a063dd579b20cc6 28-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "A2dpSink sends CONNECTED instead of DISCONNECTED when connection timeout"
am: fda02ace5b

Change-Id: I44166c77dec9915f6fe7d94352077ea1d07590bd
77da2e5bfed460cc5cd155b80dd01cfaa7f1fd82 28-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Separate LE scanner from GATT client (2/4)" am: c10a46f70f
am: c020464494

Change-Id: Ibff79f9f94534abbe525937420e0a14f5515d0cf
c020464494d24314a509ce49b424ad6a3e5d8b3e 28-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Separate LE scanner from GATT client (2/4)"
am: c10a46f70f

Change-Id: I4ffaf101f006d66aa33eba5422793af9d11e4184
0c71be918a515b621553586eaa78e0186c866452 18-Apr-2016 Sanket Agarwal <sanketa@google.com> Replace NOT_SUPPORTED string constants with empty strings.

AVRCP was defining default state strings as NOT_SUPPORTED and hence the
UI would show NOT_SUPPORTED as the string for album/song info when no
player is selected on the phone. Replacing these strings with empty
helps UI make a more informed decision.

Bug: b/28120051

Change-Id: Ia8017dce784160d637a6653f70addb5258e7871e
(cherry picked from commit a525ff9f10b2ee0cee3269ab6082ddf09441199d)
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/pbapclient/PbapClientService.java
820cfec619ae724b7f4fa7490bc19d5a8de10db6 19-Apr-2016 Sanket Agarwal <sanketa@google.com> A2dpSink sends CONNECTED instead of DISCONNECTED when connection
timeout

When a timeout happens for an outgoing A2DP Sink connection we are (most
likely a typo) sending a CONNECTED instead of DISCONNECTED event. This
confuses the UI and shows it as connected instead of disconnected.

Change-Id: I2fc5a9df86781b45e5c5ff9368a7c49c6c910294
(cherry picked from commit 688344c5ed34758c1e96a1dec9212e10107a7263)
luetooth/a2dpsink/A2dpSinkStateMachine.java
f17d469c19b4fc24c185d4022eeb26f4929be5a7 26-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Separate LE scanner from GATT client (2/4)

Right now, LE scanning functionality is combined with the GATT client.
This is the source of various bugs, like scans suddenly stoppinging when
a GATT client is killed. It also increases memory consumption, because
we associate many structures with a GATT client, which are not necessary
when just scanning.

Test: sl4a BleScanApiTest ConcurrentBleScanTest
Bug: 30622771
Change-Id: Ie4a20abe7fa112bf501619651e288ae46d28e209
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
43c1e4d74eb117220c6c88675b6ca186a3d3f98b 27-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Define cover art attribute id" am: 33578853ec am: 0875a34a1a am: 1e3ae38ca4
am: 7fb84a979e

Change-Id: Idbc941714219484b32b0ea7f017f61fcb56980f2
1e3ae38ca425fe0f1ab64a696985f0119343d7d5 27-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Define cover art attribute id" am: 33578853ec
am: 0875a34a1a

Change-Id: If9c736f132828f559f7205eab4a3133edd698a59
0875a34a1ae53a4da13a238a2d1616c246b32a93 27-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Define cover art attribute id"
am: 33578853ec

Change-Id: I85dffa80183b72da66e1701d15860e902f9de983
417d1b696e6bcf1e22478b93e79aa5936537483a 14-Oct-2016 Ajay Panicker <apanicke@google.com> Define cover art attribute id

Test: Tested manually
Bug: 32081388
Change-Id: Ib9df511a36d19f1bd5197836ad34b19edba73748
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/AvrcpConstants.java
luetooth/avrcp/BrowsedMediaPlayer.java
26e8680e8f61901f3aca5f6eb4c1c8e2405092a5 26-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Add AVRCP unit tests and switch to using mockable interfaces" am: 232bd83d3b am: 69d4506245 am: 2a67cddaaa
am: 98ce1b84e5

Change-Id: Ic94757d1637c710232044b6396bd889d6eb913ee
2a67cddaaacb0a43bce2b85fb263e6773f023844 26-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Add AVRCP unit tests and switch to using mockable interfaces" am: 232bd83d3b
am: 69d4506245

Change-Id: Id5f83572fe235934b4d7d6fe9f53e0cd1389d398
69d4506245ed2d3c12ebee37bbce5e991fef1812 26-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Add AVRCP unit tests and switch to using mockable interfaces"
am: 232bd83d3b

Change-Id: Ie1ab559fcfcc3d152ee6893d29a6a480f6838d80
d996f17ea97b2c592338bcfbc93056d0224da1cd 21-Oct-2016 Ajay Panicker <apanicke@google.com> Add AVRCP unit tests and switch to using mockable interfaces

Add a mockable interface for MediaController in order to add unit
tests for AddressedMediaPlayer.

Bug: 32416674
Test: Tested manually
Change-Id: I081c37915fc15e58f3de37c3a16e03747503860c
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/BrowsedMediaPlayer.java
luetooth/avrcp/mockable/MediaController.java
d4556a51be798c16ec8db2a563fa8929a0516cd5 26-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Change how Advertise Data is passed to BTIF (3/3)" am: fd121217a4 am: dfbb839c60 am: 8e382afdcc
am: 602007cfa7

Change-Id: I9fe021f1d1b1ff68f9693069d291c7c18d70b572
8e382afdcc6e6dc55ea9e9b9affcdd1992546309 26-Oct-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Change how Advertise Data is passed to BTIF (3/3)" am: fd121217a4
am: dfbb839c60

Change-Id: I77d5b50e34762fba4e37e5aa44c54d90197d0079
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
luetooth/btservice/AdapterService.java
luetooth/gatt/AdvertiseManager.java
70d2cbe759a69eb4b88a50c7f2cd47181b32273a 22-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent bonded device from being removed from the property map am: c4b1ccb468 am: 283c7ead04
am: 6706cb3177

Change-Id: I4229e1a1efe84912f2c31fb419611686a28e4607
6706cb317761768702c5f386ec11685537756d51 22-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent bonded device from being removed from the property map am: c4b1ccb468
am: 283c7ead04

Change-Id: I9cc84cb71bf5ee0d200d4a90a21aceee5fbf9ff4
283c7ead04930b5d54837ba55835aa8c07b9b966 22-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent bonded device from being removed from the property map
am: c4b1ccb468

Change-Id: I9d41d8834a5524c98bcb1e1d1ff2e67deb0a9501
c4b1ccb46884a0e23e5411f2bbb2da72fcb267ca 22-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent bonded device from being removed from the property map

Bug: 31947953
Test: Manual
Change-Id: Ia2d25b305c07949a9251af83e855db4511ff887f
luetooth/btservice/RemoteDevices.java
1a08d3ab7dd8577a7078efc21c26068792cebab7 21-Oct-2016 Ajay Panicker <apanicke@google.com> Add additional logging for device properties am: 055babc4ab am: 37b54633cc
am: e9374026cd

Change-Id: I02a93fd901ad0faf88bb3ee95fccb7820a603314
e9374026cd90834f1f2ddaed4e5db62a99255ff9 21-Oct-2016 Ajay Panicker <apanicke@google.com> Add additional logging for device properties am: 055babc4ab
am: 37b54633cc

Change-Id: I81a17d92f833981cc0d4280a47ab4063261b1669
37b54633cc402f8ea65b8ee632dbc994d9722a4d 21-Oct-2016 Ajay Panicker <apanicke@google.com> Add additional logging for device properties
am: 055babc4ab

Change-Id: I4bd929045faa9a0c59d639bb56ee5d56dfdfac42
055babc4ab16a11320ffd44e2a1dea97047feb55 20-Oct-2016 Ajay Panicker <apanicke@google.com> Add additional logging for device properties

Bug: 31947953
Test: Manual
Change-Id: I7e23b55c03e7f0382d59efe9a94221ed4bdf57ab
luetooth/btservice/RemoteDevices.java
e057fa20b643ac4bfca7887feceb5f1e9ce6d07a 18-Oct-2016 Bryce Lee <brycelee@google.com> resolve merge conflicts of b7e2f97 to nyc-mr1-dev-plus-aosp
am: 180855c856

Change-Id: I16a0e676093ee99acb9a0fd69e95705553e1c9b4
180855c85669681141b4821b644fc2d72bc9b3c4 18-Oct-2016 Bryce Lee <brycelee@google.com> resolve merge conflicts of b7e2f97 to nyc-mr1-dev-plus-aosp

Change-Id: I6a7df800b77cfc3431ae54913a1791cd246806cc
996250e6d3c2d54db8c76e6b972235f40ff361c3 18-Oct-2016 Bryce Lee <brycelee@google.com> Merge "Implement new API for retrieving supported Bluetooth profiles." into cw-f-dev
00cd7278bf92208ec69ee81095d027c7039bf7b2 18-Oct-2016 Shuki Hashimoto <shuki.x.hashimoto@sonymobile.com> Merge "OPP: Fix "0%" progress even after file transfer finished" am: 17227a122d am: 089772d449
am: cdf659d655

Change-Id: I5419cfaf042871ba2e2ac469028a655376ae94a6
089772d4493a85be928a70ce32538c2a838fac9d 18-Oct-2016 Shuki Hashimoto <shuki.x.hashimoto@sonymobile.com> Merge "OPP: Fix "0%" progress even after file transfer finished"
am: 17227a122d

Change-Id: Idb8003add2df20febf6d0d4f74fedc816211c6ca
17227a122d0a131ee7242974732029afadaca5e3 18-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "OPP: Fix "0%" progress even after file transfer finished"
b085c4d30f17af420378469f7db393168c9436b2 17-Oct-2016 Sanket Agarwal <sanketa@google.com> Merge "AVRCP 1.6 CT implementation"
am: c024cec3fc

Change-Id: Ie05ec01d57d855f568f5801e14afdabbf1def4fa
2df89213f063ef9d38f1531253299f80fdb0739d 10-Sep-2016 Sanket Agarwal <sanketa@google.com> AVRCP 1.6 CT implementation

Bug: b/28791287
Change-Id: Ie4cb76b301bb3f36a750658fb86caa0def1eb503
(cherry picked from commit 4b491c2c874395c436949183bcbd84ebb2493131)
luetooth/a2dpsink/A2dpSinkService.java
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
luetooth/avrcpcontroller/AvrcpPlayer.java
luetooth/avrcpcontroller/BrowseTree.java
luetooth/avrcpcontroller/PlayerApplicationSettings.java
luetooth/avrcpcontroller/RemoteDevice.java
luetooth/avrcpcontroller/TrackInfo.java
luetooth/btservice/Config.java
4b7462055ae34b4da7101e675420dab6a2c641bf 29-Sep-2016 Shuki Hashimoto <shuki.x.hashimoto@sonymobile.com> OPP: Fix "0%" progress even after file transfer finished

When the file is small enough to be sent together with header in one
packet, PrivateOutputStream#write() never calls back ClientOperation,
because OBEX Client has no more data to send.
In this case, response code in ClientOperation is not updated from
default value (-1) until the PrivateOutputStream is closed.
It causes progress bar not updated from 0%.

The patch adds PrivateOutputStream#close() call after the first write
operation when file and header are sent in one packet, and ensures
progress bar to be updated properly.

Bug: 31895670
Test: manual

Change-Id: I735a872b756ab1c8892c2f8bbf2dce51ae24fc5a
luetooth/opp/BluetoothOppObexClientSession.java
2404f96fd16dd7394ba78732710156ad29d01a4a 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix error where root folder depth was set as 1 instead of 0" am: a4d91e722e am: 122cb07fae am: fbfc2d0f16
am: 2806b12623

Change-Id: Ia2bc1e11968fee11e2bff1fec9d710851bc85fc0
2806b12623c554f80109a5faddffcd23452b1ed1 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix error where root folder depth was set as 1 instead of 0" am: a4d91e722e am: 122cb07fae
am: fbfc2d0f16

Change-Id: I9487ab2385a44a3da163f1d956d5dc2f88aa5c40
fbfc2d0f161e5d192c2aae505e8b51601b4153ed 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix error where root folder depth was set as 1 instead of 0" am: a4d91e722e
am: 122cb07fae

Change-Id: I184f48b2317e7e0e778bc0c5ab5fb0cd3aa65eaa
a4d91e722eeea59a37a00cef30e2a54dcbd4063d 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix error where root folder depth was set as 1 instead of 0"
d5efe736347e232fd2c7f7696038372dff03d725 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Reduce AdapterState log spam on isTurning*() functions" am: 96b343175f am: 009e7e74e8 am: c4ff53a4bb
am: 74078dab3a

Change-Id: I1d6aa25a0df9833447d8da5eadbd55fd35352ecf
74078dab3a01bd7ffcf757a453878c4c9be34554 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Reduce AdapterState log spam on isTurning*() functions" am: 96b343175f am: 009e7e74e8
am: c4ff53a4bb

Change-Id: I69f4e2610615d68ee40762d2121570f39f8d4f0a
c4ff53a4bb929847e401ebbc52eda1cfb08685b0 12-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Reduce AdapterState log spam on isTurning*() functions" am: 96b343175f
am: 009e7e74e8

Change-Id: Ic60d88ff785717bc0a6a5c109f6c5cad05554eab
5b0dcf64aa76cb7ab8a50b033ef4e9ce23d3f4aa 10-Oct-2016 Andre Eisenbach <eisenbach@google.com> Reduce AdapterState log spam on isTurning*() functions

Bug: 31857542
Test: manual
Change-Id: Ia3658509af727714820a38c9f94398d714813046
luetooth/btservice/AdapterState.java
33fa358d46e1ffa04b065de75379ae90d9821f75 11-Oct-2016 Ajay Panicker <apanicke@google.com> Fix error where root folder depth was set as 1 instead of 0

Test: Tested by hand
Bug: 32082139
Change-Id: Id46c3dab1e21d166691620cb762d64893ce5d41d
luetooth/avrcp/BrowsedMediaPlayer.java
a27b9a7f7e9b12878242b96c8902420e9df8efe5 11-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent Null Pointer Exception caused by race condition in AVRCP init" am: e58b7c22b7 am: 2ef090525a am: 9360a5cfd7
am: 5b7f441b6d

Change-Id: Iaad633bd66aa41a735a2887037e642fdff7a07e9
5b7f441b6d792f55f92d812344090b78b4ad1fc0 11-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent Null Pointer Exception caused by race condition in AVRCP init" am: e58b7c22b7 am: 2ef090525a
am: 9360a5cfd7

Change-Id: I2a59964994d95d987aebc4be99b7edda4962f08d
9360a5cfd77de4f7cc5ed8e4bcd093ad438ee86c 11-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent Null Pointer Exception caused by race condition in AVRCP init" am: e58b7c22b7
am: 2ef090525a

Change-Id: I9d505f5ef4585701a9169408226024da0af09e94
4a8273edcbd19725246ef08fa2e5c999ff5339e3 11-Oct-2016 Ajay Panicker <apanicke@google.com> Prevent Null Pointer Exception caused by race condition in AVRCP init

The object |mMPList| could be null if AVRCP started handling messages before
the phone was unlocked. Now we always initialize the Media Player List.

Test: Manual testing
Bug: 32060313
Change-Id: I66cba51159586da8abe51297dba94a3e1dc1b067
luetooth/avrcp/Avrcp.java
24fd0f48ddfd1dbbe41f908dedadf97acc84d800 11-Oct-2016 Wei Liu <luciferleo@google.com> Add some debug logs to the HeadsetClientService. am: 33acd22084
am: 6b2ff5e648

Change-Id: I55c71d4d991e1f1113831cb173854be790f4f262
6b2ff5e6484d441dd29bcc2101c432ac295feaa9 11-Oct-2016 Wei Liu <luciferleo@google.com> Add some debug logs to the HeadsetClientService.
am: 33acd22084

Change-Id: I4abe7bd9090d18240c0c9c7605d791797eae7ff7
58e622c32afa964d8fb336501821dd90632b26b5 11-Oct-2016 Marie Janssen <jamuraa@google.com> Merge "style: Remove commented-out code" am: 544c68dc6b am: 11eff466ae am: 614d47b29e
am: 346fbe4d8f

Change-Id: I699d9377b4273495f993030a37eed3d7a9593340
346fbe4d8f4190c6104a2a1bc3f01c95bd6923f7 11-Oct-2016 Marie Janssen <jamuraa@google.com> Merge "style: Remove commented-out code" am: 544c68dc6b am: 11eff466ae
am: 614d47b29e

Change-Id: I747d26447fe24abfb5d99e0985c288855dccd3a7
614d47b29e1a8423c50eabbd0a0dbc910092adaf 11-Oct-2016 Marie Janssen <jamuraa@google.com> Merge "style: Remove commented-out code" am: 544c68dc6b
am: 11eff466ae

Change-Id: I965c41c25a578d14bba4dcdbe225e525cf0174f6
33acd2208455171249084dd86ae0ed95db1e4c49 10-Oct-2016 Wei Liu <luciferleo@google.com> Add some debug logs to the HeadsetClientService.

b/31976064

Change-Id: I13602fbe6ef45f039a15d36ea0d1ac3802a9fddd
luetooth/hfpclient/HeadsetClientService.java
91c7bbd92117da7f8fdde343a9a5108a14693387 10-Oct-2016 Marie Janssen <jamuraa@google.com> style: Remove commented-out code

Test: continues to compile
Change-Id: I94f3e869621bcffd1aba678894ac14fc3800184f
luetooth/map/BluetoothMapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapUtils.java
b7e2f972a0633b4d8c8843d025819d61e71053e7 09-Oct-2016 Bryce Lee <brycelee@google.com> Implement new API for retrieving supported Bluetooth profiles.

Bug: 26451648
Change-Id: I552882034e0289b643377d14bac4fb01c9018046
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
686261c34315fea0d91b6c8dfcf2fd6be526aae3 09-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Make AVRCP encryption aware" am: 4ae401b6e9 am: 852cbd4136 am: 509f8213b3
am: 3bb2c69909

Change-Id: I7c8c3de5f97b1bcabec534f1984b0caa1d9518e4
3bb2c6990992c77dc5ab9cbf86a90cbbad199034 09-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Make AVRCP encryption aware" am: 4ae401b6e9 am: 852cbd4136
am: 509f8213b3

Change-Id: I61b4cfd6c110086524e7725c6c291f744348da5b
509f8213b3875071b11ee4ef7c3b1718dd578981 09-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Make AVRCP encryption aware" am: 4ae401b6e9
am: 852cbd4136

Change-Id: I194015beb5bdeee51c5eec2e4acea69711a117b6
0427c02017744a749b99230b5bd080e2d4cfa3e1 08-Oct-2016 Ajay Panicker <apanicke@google.com> Make AVRCP encryption aware

AVRCP can't access the different media players while the user hasn't
unlocked the phone or if Bluetooth is turned on before the phone
has booted all the way.

Bug: 31966072
Change-Id: Id022e2a8068257885ddb06c5be3d4b04c026ac53
luetooth/avrcp/Avrcp.java
7aaa0464525bcd96ec0a91927e71af12695a05d8 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Ensure LE scan clients are removed when the related app dies" am: 310ff21b03
am: c4bc0b68b7

Change-Id: Icb63ec61320992f1488b66b1623486b0d156bf6f
4773c6523d0fbb76de19dbe7eff2e1b23709d2ea 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Ensure LE scan clients are removed when the related app dies am: 5185d1989c am: e891e19551
am: 015c1a95c0

Change-Id: Icaa2ce4e7ded74f529b823df7a124980bff35570
015c1a95c027951d4a197836848e1a4afa7351d8 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Ensure LE scan clients are removed when the related app dies am: 5185d1989c
am: e891e19551

Change-Id: I58f8e5273a2afa001c3bc49e6aa93c3b7f004fb8
e891e195514684ca3ab370dcc00b8a5084e1e1c8 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Ensure LE scan clients are removed when the related app dies
am: 5185d1989c

Change-Id: I1e88954325ae3483442391357579fbf614805e46
212ae6d734ecab7583065ee9136553a6f7c4a236 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Ensure LE scan clients are removed when the related app dies

Use the passed in ScanClient in handleStopScan() to ensure that the
client appDied flag is in the correct state to ensure proper removal of
the client application reference.

Bug: 30681588
Test: manual
Change-Id: I0e0067a8e21ebd5f89870a7054b1f4092fe63ae1
(cherry picked from commit 5185d1989c93faa3ce4b4410ef49a0205f43b239)
luetooth/gatt/ScanManager.java
49d84275edf5bea6b68be60c80074591057c8f53 07-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
am: 955a9d0e62

Change-Id: I6f2236917b4930d7ba20502a25a893976e5350e4
5185d1989c93faa3ce4b4410ef49a0205f43b239 07-Oct-2016 Andre Eisenbach <eisenbach@google.com> Ensure LE scan clients are removed when the related app dies

Use the passed in ScanClient in handleStopScan() to ensure that the
client appDied flag is in the correct state to ensure proper removal of
the client application reference.

Bug: 30681588
Change-Id: I0e0067a8e21ebd5f89870a7054b1f4092fe63ae1
luetooth/gatt/ScanManager.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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
270362509705675155faff6843f1515eb8d89c96 05-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Offset browsing media entry UID by one" am: be4507f68a am: 9370f10c05 am: a9777ad326
am: f24f88ae47

Change-Id: Iac1d0bfd4fe14084c59c65bcd8a1eaf40488d96f
f24f88ae47a1dc7cbf180cdd0c303c73f625723d 05-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Offset browsing media entry UID by one" am: be4507f68a am: 9370f10c05
am: a9777ad326

Change-Id: If606e396e84659a99e5cf5712a93892f9c4195d9
a9777ad32642b32533d2b260f3030d54d76cffb3 05-Oct-2016 Ajay Panicker <apanicke@google.com> Merge "Offset browsing media entry UID by one" am: be4507f68a
am: 9370f10c05

Change-Id: I4f0ee710491ca138fb8825014a537bbfd60f7ba9
be4507f68a6569b2a06ec6cd9eb1a31a1e72da9e 05-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Offset browsing media entry UID by one"
8f44af47bbcb33e2a44b5ed1a3b1a226afe1e7c3 05-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Re-enable browsing support for AVRCP" am: 252a336e4b am: 735c195301 am: 71b6644e65
am: eea1212f8e

Change-Id: I380e341b531c56e4860441d58bb426b4e43bb2b9
eea1212f8e3ae7b73a80c3f91948d4d0fa01e449 05-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Re-enable browsing support for AVRCP" am: 252a336e4b am: 735c195301
am: 71b6644e65

Change-Id: I25fdd0fc25bed0fa6c7efd433b0cce1010e76344
71b6644e65e752bbe3abccf0a167e8845192b60b 05-Oct-2016 Andre Eisenbach <eisenbach@google.com> Merge "Re-enable browsing support for AVRCP" am: 252a336e4b
am: 735c195301

Change-Id: I6f93f90eae56afb82415eef0ac7ca77d2c5880f0
1b70ec148be773651d5ad00e3ce0d28b3a63306d 05-Oct-2016 Ajay Panicker <apanicke@google.com> Re-enable browsing support for AVRCP

Bug: 31941615
Change-Id: Ia6846b3d6133c42863ae3cc630c980bea3e6bf20
luetooth/avrcp/Avrcp.java
a2d70c884a330dcdac82d34314ddbb815bd84543 05-Oct-2016 Ajay Panicker <apanicke@google.com> Offset browsing media entry UID by one

Offset AVRCP UID by one for browsing since UID 0 is reserved for
getElementAttributes.

Bug: 31962824
Change-Id: I7efcd0546ebb0d02b4b1bfb05038a86d9fa0835f
luetooth/avrcp/BrowsedMediaPlayer.java
aadff7797afd2602ba2564db4780f88f211ee8d8 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Cleanup BluetoothPbapReceiver log messages am: c295ebb2a7 am: 0d527ed0da
am: d232945cfe

Change-Id: I4a79ac2cfce4d0720193d87d2754d4accc86a4f9
d232945cfea830ff7d2acf7b5b035c8912e59fed 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Cleanup BluetoothPbapReceiver log messages am: c295ebb2a7
am: 0d527ed0da

Change-Id: Ia2a2a6489a075332d87544bbc28aa97e43e3530d
0d527ed0da7cb0ab1056af2cbab6a1cbf967a03e 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Cleanup BluetoothPbapReceiver log messages
am: c295ebb2a7

Change-Id: I08de1ce6fa6b40077a86787455155a0a7f5f0141
354e7ab635291c120306254df257bd2fb9ee1c4a 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Cleanup BluetoothPbapReceiver log messages" am: 1e06bd574a
am: 4c424aedfe

Change-Id: Ide2c0d350236bd0d1278efa9d4dec256492fe68e
c295ebb2a781b86550e54639d7488a5b1aa7ab29 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Cleanup BluetoothPbapReceiver log messages

Bug: 31442739
Bug: 31457305
Test: manual - checked logcat output for (lack of) excessive logs
Change-Id: I76f32dd950afd0a2949f38bfa6c0d4212b83357c
(cherry picked from commit f36fc254ad196339a59c2ab00b555f4d8f601718)
luetooth/pbap/BluetoothPbapReceiver.java
f36fc254ad196339a59c2ab00b555f4d8f601718 29-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Cleanup BluetoothPbapReceiver log messages

Bug: 31442739
Bug: 31457305
Test: manual - checked logcat output for (lack of) excessive logs
Change-Id: I76f32dd950afd0a2949f38bfa6c0d4212b83357c
luetooth/pbap/BluetoothPbapReceiver.java
57c8dc2f712c3c738cb7a87fc84a4d21b29b03ca 27-Sep-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP over L2CAP"
4719fc68998e703015fbef33b55e4a70b44fbea9 24-Sep-2016 Andre Eisenbach <eisenbach@google.com> Limit number of stored device properties am: e8d2b5c0f5 am: 35ba33f70c
am: 561693138d

Change-Id: I219054aa1eb6a117d04beb74ea9807e3320b215a
561693138df65e7d91f05a24fd7dd4f818345c9c 24-Sep-2016 Andre Eisenbach <eisenbach@google.com> Limit number of stored device properties am: e8d2b5c0f5
am: 35ba33f70c

Change-Id: I50a96810900eff760d752e612878c17ce6367582
35ba33f70c37ed4d9220ebe1caf716b04edd51d7 24-Sep-2016 Andre Eisenbach <eisenbach@google.com> Limit number of stored device properties
am: e8d2b5c0f5

Change-Id: I02e2934b8afc9018ca0036e369a4569f2528f8a9
02760b328051eb23be4bb0ebbcfd01cefb266868 24-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Don't try to stop advertising on death of GATT clients" am: db403d3f6e am: be26effc03 am: 5e7499b6c4
am: 0eb2e09aca

Change-Id: Ie2028f0227d70915b534c3cb127b266f02f14116
0eb2e09acafe171855b4396882a5affa08b3c066 24-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Don't try to stop advertising on death of GATT clients" am: db403d3f6e am: be26effc03
am: 5e7499b6c4

Change-Id: I846b0a00b4e89ed4bb9af528726d36e767dd55f6
5e7499b6c43918cd85ee321cc96ae96cbc9e07ff 24-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Don't try to stop advertising on death of GATT clients" am: db403d3f6e
am: be26effc03

Change-Id: I03b24bb19e931f1db25c8bec3812e93b26108eca
db403d3f6e7b52e76aac62cae3845738123b3455 23-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Don't try to stop advertising on death of GATT clients"
e478ab8044502f0042cee621caab9189f7932fd5 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs for Bluetooth AdapterService" am: c364eb3eb3 am: f2287d1e54 am: a73e67014b
am: 49c9cba159

Change-Id: Ie9bbf08e5273487f35ee0baa8720ceca96abc90a
ea12a27e7f94a17e443eba5af7a56efd2552f04e 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs by default in BluetoothPbapReceiver" am: 5810700831 am: 1d0294e19e am: 6c2fb91066
am: b0f170db60

Change-Id: I0d738af7c7bb02922fc125df2fc615fc75a3fa10
d828b42ed91213bd6115b84bc16809f13fc7afe6 19-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Don't try to stop advertising on death of GATT clients

We should no longer stop advertising for GATT clients. Advertisers
are kept in AdvertiseClient, and their death is handled in
AdvertiserDeathRecipient.

Bug: 30622771
Test: Kill app with GATT client registered
Change-Id: I21f246042d1632824ed3d2d8937f13bcafe380ab
luetooth/gatt/GattService.java
e8d2b5c0f591311c90e428d88b94cd89b88ed342 22-Sep-2016 Andre Eisenbach <eisenbach@google.com> Limit number of stored device properties

Bug: 31651689
Change-Id: I6e31b4f89d6ebf9e6a0c6df5ea4e1a7be61a125a
luetooth/btservice/RemoteDevices.java
09de55a27faf9ba392d5ea43f762607eb4139a48 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Enable debug logs by default in BluetoothPbapReceiver
am: dda1ef8844

Change-Id: Ic7117c244513f9d47b50596c93d117b251ec755d
779ec089243d8ce51dad28f365379ee61f1314ff 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Enable debug logs for Bluetooth AdapterService
am: baf3b9b6c4

Change-Id: I3e7869b4f1c6ccd3ecf501af8737864edefa57ab
6f54bb49508af469c9a4f6cec0e0ba4818988644 23-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enable debug logs by default in BluetoothPbapReceiver" into nyc-mr1-dev
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
b0f170db6099f1c290724996cf8af68eeafed89c 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs by default in BluetoothPbapReceiver" am: 5810700831 am: 1d0294e19e
am: 6c2fb91066

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

Change-Id: I7c32bd076d565d83a7aa1a3dcba386c764c5e9b6
6c2fb9106651d93c45836be885b2040fbfd5ee5f 23-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Enable debug logs by default in BluetoothPbapReceiver" am: 5810700831
am: 1d0294e19e

Change-Id: I876ec928362d38380d3c41c01bbd8cb28558a405
528ce06542ece519ada0a5b96a7bdd4334f61436 23-Sep-2016 Andre Eisenbach <eisenbach@google.com> Merge "Do not downgrade filtered scans to opportunistic" am: f11c61f078
am: 7db902348f

Change-Id: I112cc9b4ded3c2fea18a0854fdb877763b849fec
c364eb3eb3b83b458360b44a3e4e3361c9975670 22-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Enable debug logs for Bluetooth AdapterService"
5810700831a0920681d515f2ed1da4522e006221 22-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Enable debug logs by default in BluetoothPbapReceiver"
cd50e74da9d04d2d6c8390c96941cc6e7fbb8cd9 22-Sep-2016 pkanwar <pkanwar@google.com> Collect number of paired BT devices. am: f4386904eb am: 4045be13b1
am: 397dcaa3b3

Change-Id: I51eb1b33dc54b034f09f2a95dfe033ee2e1b941a
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
baf3b9b6c40e0e940a82e3651e4705fdf5a2b5d4 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
(cherry picked from commit 32a92489e9779d10c613a57d86135a7de6d3d7c4)
luetooth/btservice/AdapterService.java
dda1ef88441ef5361aa891670b4e542230bd3bc1 15-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Enable debug logs by default in BluetoothPbapReceiver

Enabled more logs to help identify issues when Bluetooth
is started because of PBAP.

Bug: 31442739
Bug: 31457305
Test: manual - checked logcat output for (lack of) excessive logs
Change-Id: I6348fe57a8b3546a8152416a5db95b8b2226e166
(cherry picked from commit beacc3b09d1192c70c6385c5666e5706f7662a75)
luetooth/pbap/BluetoothPbapReceiver.java
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
luetooth/btservice/AdapterService.java
beacc3b09d1192c70c6385c5666e5706f7662a75 15-Sep-2016 Pavlin Radoslavov <pavlin@google.com> Enable debug logs by default in BluetoothPbapReceiver

Enabled more logs to help identify issues when Bluetooth
is started because of PBAP.

Bug: 31442739
Bug: 31457305
Test: manual - checked logcat output for (lack of) excessive logs
Change-Id: I6348fe57a8b3546a8152416a5db95b8b2226e166
luetooth/pbap/BluetoothPbapReceiver.java
2b8f0acc2ceb2c027201bfe981546018a3ffd20b 22-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Collect number of paired BT devices." into nyc-mr1-dev
969932cee13f9613ee98bc8d86c8a65565bdbc8e 19-Sep-2016 Andre Eisenbach <eisenbach@google.com> Do not downgrade filtered scans to opportunistic

Fixes: 31308591
Test: manual
Change-Id: I0d8bcffef9951c03607f7f3b25b79557062a9bec
(cherry picked from commit 8d6abb0a65bd4e9f4726a9c565b0c74fb6aed1a1)
luetooth/gatt/ScanManager.java
f4386904ebbcb1af27828617ba287c512b7223ec 20-Sep-2016 pkanwar <pkanwar@google.com> Collect number of paired BT devices.

Bug: 31602591
Change-Id: I61adee8b20d57e2a1e284ed21a46d1766f059d4a
luetooth/btservice/AdapterService.java
luetooth/btservice/bluetooth.proto
9977e10e5fca431da86aae4d1b81e833bdcfddc9 21-Sep-2016 Andre Eisenbach <eisenbach@google.com> Do not downgrade filtered scans to opportunistic am: 8d6abb0a65 am: 26e572be79
am: 6b5a37929a

Change-Id: Ifb60ab10f1955917249587e2781f746e1ec8b842
cced340d42c04b4059a2e6ae576529462b008df6 21-Sep-2016 Jack He <siyuanh@google.com> Merge "Update deprecated Notification builder to new API" am: c536e6001e am: 64cbb327aa am: 1883fe3468
am: bfbc7c0a19

Change-Id: I1d0ad4a3af85cae460596af30e962617eec8157a
5f61157539061b032ca7220654b5053fa611e904 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2) am: df3304a333 am: f8a47ce8ee am: 3ea7d86110 am: ccca20484c am: 4a20ca7bae am: 827bfd6b25
am: 63f504bbef

Change-Id: Ifb7ab76df4fcd8b81baf675b077b2202b7a86f59
6b5a37929a2744f503b2a694ce6edd0bca8de1bc 21-Sep-2016 Andre Eisenbach <eisenbach@google.com> Do not downgrade filtered scans to opportunistic am: 8d6abb0a65
am: 26e572be79

Change-Id: I2b9bf93b0d1fe651a2d704562a3b4c570301ab1e
bfbc7c0a1945315b08c138ad34eab989b98bbdea 21-Sep-2016 Jack He <siyuanh@google.com> Merge "Update deprecated Notification builder to new API" am: c536e6001e am: 64cbb327aa
am: 1883fe3468

Change-Id: I77b6357a2374dbc4013d7a0d8d6a4a9a45016c60
1883fe346824ce2f9d7e90c3c30b7372e5328ba3 21-Sep-2016 Jack He <siyuanh@google.com> Merge "Update deprecated Notification builder to new API" am: c536e6001e
am: 64cbb327aa

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

Change-Id: If486bbc25cda349d6a0298041f0c07a07f0ebe02
26e572be79d0cebf134beb2bbbd49674f4ee1c5f 21-Sep-2016 Andre Eisenbach <eisenbach@google.com> Do not downgrade filtered scans to opportunistic
am: 8d6abb0a65

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

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

Change-Id: I4acd14f26cb74abd83c194e69259c9ea84876b7e
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
8d6abb0a65bd4e9f4726a9c565b0c74fb6aed1a1 19-Sep-2016 Andre Eisenbach <eisenbach@google.com> Do not downgrade filtered scans to opportunistic

Change-Id: I0d8bcffef9951c03607f7f3b25b79557062a9bec
Fixes: 31308591
luetooth/gatt/ScanManager.java
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
4f6e5cabf9757f362fdfbef8fca30e80523fbf45 19-Sep-2016 Jack He <siyuanh@google.com> Update deprecated Notification builder to new API

* Replace Notification.setLastEventInfo() and various variable
assignments with the corresponding Notification.Builder API calls.
* Explicitly choose theme for getColor() using Context.getTheme() as
previous getColor() method is deprecated as well.

Bug: 31218737
Test: TestTracker/63162/3975
Change-Id: I696cb7f07b50b04551e56c3b4a02fea87f23589c
luetooth/opp/BluetoothOppNotification.java
luetooth/pbap/BluetoothPbapService.java
f8a47ce8ee4fa8d6280e7e8f97891f474e965c81 21-Sep-2016 Ajay Panicker <apanicke@google.com> Fix setPairingConfirmation permissions issue (1/2)
am: df3304a333

Change-Id: Idc90fd17ec010ba786412d76496cd6f89df139b5
4b491c2c874395c436949183bcbd84ebb2493131 10-Sep-2016 Sanket Agarwal <sanketa@google.com> AVRCP 1.6 CT implementation

Bug: b/28791287
Change-Id: Ie4cb76b301bb3f36a750658fb86caa0def1eb503
luetooth/a2dpsink/A2dpSinkService.java
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/AvrcpControllerStateMachine.java
luetooth/avrcp/PlayerApplicationSettings.java
luetooth/avrcp/PlayerInfo.java
luetooth/avrcp/RemoteDevice.java
luetooth/avrcp/TrackInfo.java
luetooth/avrcpcontroller/AvrcpControllerService.java
luetooth/avrcpcontroller/AvrcpControllerStateMachine.java
luetooth/avrcpcontroller/AvrcpPlayer.java
luetooth/avrcpcontroller/BrowseTree.java
luetooth/avrcpcontroller/PlayerApplicationSettings.java
luetooth/avrcpcontroller/RemoteDevice.java
luetooth/avrcpcontroller/TrackInfo.java
luetooth/btservice/Config.java
9ac0cb4d53f9fa60c2a9615c728851a6b2434714 13-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth: split setting params and enabling advertising (1/3)" am: 6b30601de2 am: b834e66619 am: 2cc8236e52
am: e99f02a2ce

Change-Id: Iba6d053a2314538f89a7af9fc3cc3873a6350d48
e99f02a2cef8906bcd01b6a5b90f7cfa4d42b995 13-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Bluetooth: split setting params and enabling advertising (1/3)" am: 6b30601de2 am: b834e66619
am: 2cc8236e52

Change-Id: I3247465313f1c084bb0388c479fe75b73eaee9a5
a017a7dbd303ee779e876d2e8b25f2a5629cae78 23-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Bluetooth: split setting params and enabling advertising (1/3)

Proper order of commands when starting advertising:
* set parameters
* set data
* enable advertising

This cannot be achieved when setting advertising parameters and enabling
advertising is put together in one function. Enabling before setting
data might cause first advertisements to be empty. If a device with
hardware filter pick up such advertisement, it might fail to properly
recognize our device.

Bug: 30622771
Bug: 19372779

Change-Id: I66c71f1b2c07c832eda0983ead816741798e923b
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
a9aa2228ac08b58d714eb0e46755a449160b3c30 12-Sep-2016 Ajay Panicker <apanicke@google.com> Change MAP to send one new message event when encrypted storage is unlocked
am: 35b8fc00f7

Change-Id: Ifc32d772784f21466a3b5a13285436af80d0d5ff
35b8fc00f781819232b674078d5482a67f250521 24-Aug-2016 Ajay Panicker <apanicke@google.com> Change MAP to send one new message event when encrypted storage is unlocked

The MAP service will now send one new message event for all messages
when device storage is unlocked instead of sending an event per message.

Bug: 30809925
Change-Id: Iec902c414c3c229043aa089d19871d80d62f557f
luetooth/map/BluetoothMapContentObserver.java
ea2543a5009459fee3581d2fd8b2271511d31a4c 26-Aug-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP over L2CAP

Update PBAP to be compliant with socket connections over L2CAP in
addition to RFCOMM. Additionally now requires SDP to complete before
connection.

Bug: 31062208
Change-Id: Idc991d871e9a67c7d6b631cafbfb98ff45d63c38
(cherry picked from commit f7beee20f03acfd01df009f6580dd16caf0193cd)
luetooth/pbapclient/BluetoothPbapObexAuthenticator.java
luetooth/pbapclient/BluetoothPbapRequest.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/ObexAppParameters.java
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
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
luetooth/btservice/AdapterService.java
72ae630234ab99cc4f40b03d4e04975b76ef4a0c 08-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Fix ConcurrentModificationException in GattService.onScanResult
am: b0ef94dcec

Change-Id: I3883499a28a8b270d62d1777887e9de5acb18d44
32c5f6d64d88f9d1a238bfa6981807e90c581082 02-Sep-2016 Ajay Panicker <apanicke@google.com> Merge "AVRCP 1.6: media browsing support on Target(3/3)" am: 62fa1bc1b6 am: 3d03d79df3
am: 079917c777

Change-Id: Ifb399ce9c0f1ab908e7495ca96395a0b594f31ba
ebd1c5e8dc50038f624e23d6b9901e18688dc41b 02-Sep-2016 Erik Wolsheimer <ewol@google.com> Match semantics of ArrayList#toArray in Config's use thereof am: 19f672c2a5
am: 99c8fe9dcd

Change-Id: Ied09be7f5ddc6bc6469838e114cb2cc3a6442054
62fa1bc1b6da240adf6e90fd3c77cf009a26c4dd 02-Sep-2016 Ajay Panicker <apanicke@google.com> Merge "AVRCP 1.6: media browsing support on Target(3/3)"
99c8fe9dcdfaf551bf0e1c7df6712e1575b5ca73 02-Sep-2016 Erik Wolsheimer <ewol@google.com> Match semantics of ArrayList#toArray in Config's use thereof
am: 19f672c2a5

Change-Id: I4861b8f817d8025cce5902b33e1ba6c2cc72a716
e90c830b72f97189935e99e9e4f5a0c4f216ba72 22-Jun-2016 Avish Shah <avish.shah@broadcom.com> AVRCP 1.6: media browsing support on Target(3/3)

Description:-
This patch provides Media browsing support for AVRCP using
new Media Browsing APIs provided from Android 5.0

Features:-
1) setAddressedPlayer
- Change the control to the specified player
2) setBrowsedPlayer
- Change the player with which fileSystem is being browsed
Browsing commands:
3) getFolderItems scope=MediaPlayers/VFS/NowPlaying
4) changePath
5) getItemAttributes
6) playItem
7) getTotalNumberOfItems

Handling notifications:-
1) ADDRESSED_PLAYER_CHANGED
2) AVAILABLE_PLAYERS_CHANGED
3) NOW_PLAYING_CONTENT_CHANGED

Added support for dual RC

New files added:-
AvrcpHelperClasses.java
- Helper classes used for callback/response of browsing commands.
AvrcpConstants.java
- Group all the constants used in Avrcp.
AddressedMediaPlayer.java
- Interface to communicate with media controller for NowPlayingItems.
BrowseMediaPlayer.java
- Interface to communicate with MediaPlayer for browsing FileSystem.
AvrcpMediaRspInterface.java
- Interface to communicate with the native layer.

Verification:-
AVRCP 1.5/1.6 functionality has been verified with
google MediaBrowserService sample app.

Bug: 19361366
Merged-In: I0ab7f0c7d87c06fe4f454151d20494c56aceae12
Change-Id: I40b9e7aae81d994a709559844928b0749c603ea8
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/AvrcpMediaRspInterface.java
luetooth/avrcp/BrowsedMediaPlayer.java
19f672c2a572ca68c7f43b9e64917d4b5613cb4c 02-Sep-2016 Erik Wolsheimer <ewol@google.com> Match semantics of ArrayList#toArray in Config's use thereof

BUG: 28706561
Change-Id: Ia8b5a126ab742f02cf2e1f83294d8488b133a822
luetooth/btservice/Config.java
b0ef94dcec73d7e4840880e8421519b07dff2b8d 01-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Fix ConcurrentModificationException in GattService.onScanResult

If a scan client is added or removed while iterating over
mRegularScanClients, a concurrent modification exception will be thrown,
because we use a regular hash map.

Use a ConcurrentHashMap instead to fix this issue.

Bug: 31122137
Change-Id: Icbd427ebbe63adc6b5bd4ee950ef3a874ce6067b
(cherry picked from commit 92d52b44ac480a23f98749c3a2884a5b3a23ff32)
luetooth/gatt/ScanManager.java
2b22bcd66d59eae2578c7c2955ff62d941845910 27-May-2016 ugo_yu <ugo_yu@htc.com> Mercedes Benz MAP message listing workaround

Use case:
Sync MAP message to Benz NTG 4.5

Precondition:
1. One of SMS message contains any special characters not ASCII

Steps:
1. Connect with Benz NTG 4.5.
2. Sync SMS message from carkit.

Failure:
Carkit always shows "No Message".

Root Cause:
When this carkit requests the message listing, and any message subject has
non-ASCII special characters in it, the carkit will stop all MAP activity
and stay idle.

Fix:
Strip special characters in the subject tline in message listing
for this carkit.

This change also introduces a Java bases interop database for future
use/expansion.

Bug: 29025011
Change-Id: I4255cbeb068c82f32a68b1022285dfa723e199ec
(cherry picked from commit 4786e5fffff14d92b795084b4470b785de66dfd0)
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapService.java
luetooth/util/Interop.java
601a396cdc635a5a6dc5a528c5b775e960822387 22-Jun-2016 Avish Shah <avish.shah@broadcom.com> AVRCP 1.6: media browsing support on Target(3/3)

Description:-
This patch provides Media browsing support for AVRCP using
new Media Browsing APIs provided from Android 5.0

Features:-
1) setAddressedPlayer
- Change the control to the specified player
2) setBrowsedPlayer
- Change the player with which fileSystem is being browsed
Browsing commands:
3) getFolderItems scope=MediaPlayers/VFS/NowPlaying
4) changePath
5) getItemAttributes
6) playItem
7) getTotalNumberOfItems

Handling notifications:-
1) ADDRESSED_PLAYER_CHANGED
2) AVAILABLE_PLAYERS_CHANGED
3) NOW_PLAYING_CONTENT_CHANGED

Added support for dual RC

New files added:-
AvrcpHelperClasses.java
- Helper classes used for callback/response of browsing commands.
AvrcpConstants.java
- Group all the constants used in Avrcp.
AddressedMediaPlayer.java
- Interface to communicate with media controller for NowPlayingItems.
BrowseMediaPlayer.java
- Interface to communicate with MediaPlayer for browsing FileSystem.
AvrcpMediaRspInterface.java
- Interface to communicate with the native layer.

Verification:-
AVRCP 1.5/1.6 functionality has been verified with
google MediaBrowserService sample app.

Bug: 19361366
Change-Id: I40b9e7aae81d994a709559844928b0749c603ea8
luetooth/avrcp/AddressedMediaPlayer.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/AvrcpHelperClasses.java
luetooth/avrcp/AvrcpMediaRspInterface.java
luetooth/avrcp/BrowsedMediaPlayer.java
39b70cdd077e6de695851430f1ec7534c2a42520 02-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix ConcurrentModificationException in GattService.onScanResult" am: 098f4e1044 am: 35d82a503a am: d79969fd91
am: 9b97b12268

Change-Id: I3cd10fc6f176e540dbcb62838dd513c12a06c734
9b97b122683c8f30a30337b8839739f154d921b2 02-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix ConcurrentModificationException in GattService.onScanResult" am: 098f4e1044 am: 35d82a503a
am: d79969fd91

Change-Id: Ic514fd015d023c1d1611798e98049bb8f67da9b8
92d52b44ac480a23f98749c3a2884a5b3a23ff32 01-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Fix ConcurrentModificationException in GattService.onScanResult

If a scan client is added or removed while iterating over
mRegularScanClients, a concurrent modification exception will be thrown,
because we use a regular hash map.

Use a ConcurrentHashMap instead to fix this issue.

Bug: 31122137
Change-Id: Icbd427ebbe63adc6b5bd4ee950ef3a874ce6067b
luetooth/gatt/ScanManager.java
81bbcb8c84cc44d02dcd30f05d48a716c1c6e475 01-Sep-2016 Ajay Panicker <apanicke@google.com> Merge "Change MAP to send one new message event upon storage unlock" am: c8f861fb79 am: 5c6e6ba361 am: 2d415bcc1f
am: 3827575f2c

Change-Id: I7b38905eedb5a3f507572ba40ec7c39ba7996b52
61c7ef78fa20b1d5579bc190ba9a5c5542b15555 01-Sep-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Separate advertiser from GATT client (2/4)" am: 9b85e57908 am: 1c3e2bd4a3 am: 28bf62be5f
am: 43a1c952fd

Change-Id: Id9cbf114967fdd4489fd27d436db5850a9dfe168
3827575f2c2d929dd2a4bcd3e0dab72bbc1995f9 31-Aug-2016 Ajay Panicker <apanicke@google.com> Merge "Change MAP to send one new message event upon storage unlock" am: c8f861fb79 am: 5c6e6ba361
am: 2d415bcc1f

Change-Id: I0d80b811a9b823b6f271e4ea7fc123dc1f1b6d2d
c8f861fb790b53ecc93035a0c1dd6e8a26ad4c9b 31-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Change MAP to send one new message event upon storage unlock"
4cefad479487c9325dde8b6738fa3917d50c54d6 31-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "ContextMap: Remove connection references when an app is removed"
725c70cfb004690027ded41f080bfe1bb17d2285 24-Aug-2016 Ajay Panicker <apanicke@google.com> Change MAP to send one new message event upon storage unlock

The MAP service will now send one new message event for all messages
when device storage is unlocked instead of sending an event per message.

Bug: 30809925
Change-Id: I1c9e10125c9a754bf4f6c25718fc0422d79cf37e
(cherry picked from commit 8b02ffef2611c8f21d751e5a196bcb765a9e997e)
(cherry picked from commit ac3a80eed68e2374151abb59e66d95bb2e66cf61)
luetooth/map/BluetoothMapContentObserver.java
52073ce88d9c55a4a7d357f871bb82d7858c8026 31-Aug-2016 Kyle Horimoto <khorimoto@google.com> ContextMap: Remove connection references when an app is removed am: 660208ad2e am: a17703b027
am: 9b6f93f30c

Change-Id: I57bc025d20537756674c4c4998374427b30b1221
43a1c952fd70955be0c16e51cb769f0e6f9edbc0 31-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Separate advertiser from GATT client (2/4)" am: 9b85e57908 am: 1c3e2bd4a3
am: 28bf62be5f

Change-Id: I4b1d24d07062de120481999fa19b0246f47644e5
9b6f93f30cf382e00edef95f0b3fa628ee6fb2fa 31-Aug-2016 Kyle Horimoto <khorimoto@google.com> ContextMap: Remove connection references when an app is removed am: 660208ad2e
am: a17703b027

Change-Id: If182787e3d975976c77808729b946a5fa593537b
a17703b027e12cebc9e095658a0e61f5d1e14683 31-Aug-2016 Kyle Horimoto <khorimoto@google.com> ContextMap: Remove connection references when an app is removed
am: 660208ad2e

Change-Id: Ief6374e50288b58108c816915798f8456f2611d2
9d2ae23701114aedad1c8ea9ef17f93cc07adfd0 31-Aug-2016 Kyle Horimoto <khorimoto@google.com> ContextMap: Remove connection references when an app is removed

This fixes an issue which could cause a stale Bluetooth address to be
used. The issue would manifest itself when an app is added with a
connection ID, then the app is removed and app is re-added, causing
the original connection ID (which could be stale) to be used.

Bug: 30765855
Change-Id: Idacbbfb07d895bf9276fdd986100e832a54d81b0
(cherry picked from commit 660208ad2ee2ea394adab0d1c1cea9b068bb70c6)
luetooth/gatt/ContextMap.java
64bf8e33481bb787aec895c603748eedb634a93b 13-Jul-2016 Jakub Pawlowski <jpawlowski@google.com> Separate advertiser from GATT client (2/4)

Bug: 30622771
Change-Id: Icacf1fa6a526d67ffadb8acc056d2acfefc5e895
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
89de413eba69b0c5e128a82e0ad179cec9152578 21-Jul-2016 Ajay Panicker <apanicke@google.com> Don't use SMS database until after the phone is unlocked

When the device is encrypted and a passcode is set,
the SMS database isn't available and the MAP service
crashes when trying to access it. The service will now
respond with OBEX_SERVICE_UNAVAILABLE until the phone
is unlocked. At this point, the SMS database will
notify the content observer that all the messages are
available, and send corresponding events.

Bug: 29990836
Change-Id: I53f12d0e114212d94f16b56df7c7dbe73f6254df
(cherry picked from commit db8d8ae565b3db6a5e3187170dcb7b281a79f9da)
Merged-In: I53f12d0e114212d94f16b56df7c7dbe73f6254df
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapObexServer.java
660208ad2ee2ea394adab0d1c1cea9b068bb70c6 31-Aug-2016 Kyle Horimoto <khorimoto@google.com> ContextMap: Remove connection references when an app is removed

This fixes an issue which could cause a stale Bluetooth address to be
used. The issue would manifest itself when an app is added with a
connection ID, then the app is removed and app is re-added, causing
the original connection ID (which could be stale) to be used.

Bug: 30765855
Change-Id: Idacbbfb07d895bf9276fdd986100e832a54d81b0
luetooth/gatt/ContextMap.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)
luetooth/btservice/AdapterService.java
cd8da5b2faf1659d3d608d3bc3538b362a0a692b 25-Aug-2016 Ajay Panicker <apanicke@google.com> Fix initMsgList() check to return if encrypted storage is locked am: 29cab6e8ea am: 539fa0868e
am: 8f322f84b0

Change-Id: I169eb18153fe2ff966e92c55dd18ed69ca127e04
8f322f84b066a0be7986dc3b00a818836c085c69 25-Aug-2016 Ajay Panicker <apanicke@google.com> Fix initMsgList() check to return if encrypted storage is locked am: 29cab6e8ea
am: 539fa0868e

Change-Id: I3fac36def33106792be9c876814ef76df815ade9
539fa0868e8b50985ebf2bb2cd5a616f7187036b 25-Aug-2016 Ajay Panicker <apanicke@google.com> Fix initMsgList() check to return if encrypted storage is locked
am: 29cab6e8ea

Change-Id: I7192271fa6c81adf261d29ed124372e07a07d32f
29cab6e8ea1014179fd15fb067e621ae4b066085 25-Aug-2016 Ajay Panicker <apanicke@google.com> Fix initMsgList() check to return if encrypted storage is locked

Bug: 30809925
Change-Id: I3f02779116bbae3bfcd006a8bb2012b517cda7e7
luetooth/map/BluetoothMapContentObserver.java
cd29fbf80159c5a7d4573f1eb9d3eee751084f48 22-Aug-2016 Sanket Agarwal <sanketa@google.com> Unset the priorities for car profiles on unpair.

When the device is unpaired the priorities should not be retained since
on the next pairing we will persist priorities if they are anything
other than UNDEFINED.

Bug: b/31021525

Change-Id: Ifd7dbf93aff3abcd0f6207395fbac90480624415
(cherry picked from commit 5312f3c9017634ed596a941fc375a6f70ed3aa13)
luetooth/a2dpsink/A2dpSinkService.java
luetooth/btservice/BondStateMachine.java
c3e91ea964e116ff12e879faa391dcc3e6503717 23-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix a deadlock in service discovery callbacks
am: 3fffb5a79d

Change-Id: I059421dcd59cec21f91b5100c737176fe135a31f
c0d311b11fc96ff680293dc5865667556fbb47bc 22-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix a deadlock in service discovery callbacks" am: 6fcd0081eb am: 8cb5645a4e am: 19da94f05a
am: 9da98e41f1

Change-Id: Id7b92a2761cd0cb8a20983cfe8e81870debd147d
9da98e41f19d6d696afb3e71534e1da33d46522f 22-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix a deadlock in service discovery callbacks" am: 6fcd0081eb am: 8cb5645a4e
am: 19da94f05a

Change-Id: I331a446b36454c67e3f546ce8c37c553cf85b62b
8cb5645a4e158a09d2f9daa77a67ea81fc63bfbd 22-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix a deadlock in service discovery callbacks"
am: 6fcd0081eb

Change-Id: I6e343bbc3ef5c54e372687ee989e1baa133a01c8
3fffb5a79db220b2a870a73d70194e6cb7bc5d6a 19-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix a deadlock in service discovery callbacks

onSearchCompleted calling gattClientGetGattDbNative directly, might
cause deadlock if the jni_workqueue is full.

Bug: 30835367
Change-Id: I05de735aa189dd2d250f2c5816d38c2ddcabb864
luetooth/gatt/GattService.java
31ef05df3ad5f98466baf5928b6e0de7fd4c886d 19-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix a deadlock in service discovery callbacks

onSearchCompleted calling gattClientGetGattDbNative directly, might
cause deadlock if the jni_workqueue is full.

Bug: 30835367
Change-Id: I05de735aa189dd2d250f2c5816d38c2ddcabb864
luetooth/gatt/GattService.java
9c40e6fbb16338f2136413ca38b027611f9f036e 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix NPE in permissionCheck
am: 36294bfd68

Change-Id: I07d6d05cb6049d5cdcbe8be279a87d535ed86954
36294bfd684158211f5f4962372c63ddd0f2f859 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix NPE in permissionCheck

permissionCheck can throw NPE when notification is received before
GATT database is discovered. Assume that permission is granted when
receiving notifications for unknown characteristic.

Bug: 30853729
Change-Id: I02aab1197b036584b2021d76f290c2c57db24a19
luetooth/gatt/GattService.java
faa4ba557644a02d63ac716f0f5922449e4a88d8 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in permissionCheck" am: 64ed2357e3 am: a49721050d am: 1575de4601
am: c59840538f

Change-Id: I97584f899644fec703e1fba7b76c11524fdfec18
c59840538f3ac9b49cc80ac775d6abcf150fa776 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in permissionCheck" am: 64ed2357e3 am: a49721050d
am: 1575de4601

Change-Id: Ie7c245768ed5f6584b6e713a99910b9d3fb672e4
a49721050d2e2a532aa19283f94e889e0c138bc6 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix NPE in permissionCheck"
am: 64ed2357e3

Change-Id: Ief4258ed339822801b97c9a85309608d59e98286
34d865a17a184161ed27da3aaec6f6160376d27e 18-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Fix NPE in permissionCheck

permissionCheck can throw NPE when notification is received before
GATT database is discovered. Assume that permission is granted when
receiving notifications for unknown characteristic.

Bug: 30853729
Change-Id: I02aab1197b036584b2021d76f290c2c57db24a19
luetooth/gatt/GattService.java
617b75198109f2ddf2af31bbb5a5db691a351186 09-May-2016 Lianchao Song <songlianchao@huawei.com> Add missing null pointer check inside HeadSetClientService.stop()

Bug: 28664857

Change-Id: I62abc4eb4127db2d4f0cde44eca618996f099b49
Signed-off-by: Lianchao Song <songlianchao@huawei.com>
cherry-picked from AOSP bebc4dd9edb40710d9588b4a2010eef227756a8e
luetooth/hfpclient/HeadsetClientService.java
7e7b555fc9539f5d9def892208b416c095543303 15-Aug-2016 Sanket Agarwal <sanketa@google.com> HFP should timeout in Java services if Native never replied

Usually Java services should be failsafe to avoid any states
where it could be stuck listening to lower levels.

Change-Id: I0bdf511878ba773a94b00004951b1f8a94d978f5
(cherry picked from commit b5daad858badf2555416f1a50954165ccdebd54d)
luetooth/hfpclient/HeadsetClientStateMachine.java
619e48d1c82ff9b0ef25dee9ef3c391c41a61a58 15-Jul-2016 Myles Watson <mylesgw@google.com> RemoteDevices: Optimize adding new remote devices

RemoteDevices keeps track of the Bluetooth devices which have been
seen since the Bluetooth stack was initialized. Each time a remote
device is discovered, it is added to a hash map. When the size of the
hash map grows beyond a few hundred devices, the performance degrades.

This patch:
- creates the address string once per search
reducing the average search time with 300 devices from ~20ms to ~1ms
- uses the hash of the address string to search
further reducing the time with 1200 devices from ~2ms to ~1ms

HashMap<BluetoothDevice, DeviceProperties> became
HashMap<String, DeviceProperties>

mDevice now stores the BluetoothDevice in each instance of
DeviceProperties.

TEST: Used System.nanoTime() to measure the elapsed time of
getDeviceProperties()
Bug: 30828758

Change-Id: Id44886143fb2910955294341d4938d638c72f7f9
Signed-off-by: Myles Watson <mylesgw@google.com>
(cherry picked from commit 1fb90c4f25ba33b0f951e6ac092d05f85d355e2f)
luetooth/btservice/RemoteDevices.java
5a2dcca599e68a22cdb81fb096848976aba5f98e 10-Aug-2016 Ajay Panicker <apanicke@google.com> Merge "Prevent LE scanning apps from being wrongflully downgraded to opportunistic"
am: c9db1189d8

Change-Id: I216d43f760661274145b7140efb68e5c01528073
d2564c514f5aa6209d931b132fffe7407ae2b71d 10-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent LE scanning apps from being wrongflully downgraded to opportunistic am: a1c7315ed0 am: f1db4c984a
am: a41edffdae

Change-Id: I5ca6895ad5d8ddf09ed420756097d7af1af50a51
a41edffdae9c97380d3eef96f8f22fd6fe94c883 10-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent LE scanning apps from being wrongflully downgraded to opportunistic am: a1c7315ed0
am: f1db4c984a

Change-Id: Icc466c5f601f0805b435c9f720b11c5eb9016c46
a4f88fbd7b54c23a0265ba3d4fd2f3203f5b36b0 04-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent LE scanning apps from being wrongflully downgraded to opportunistic

Bug: 30648104
Change-Id: I9d749a20eefdbeb126fa25a425d636205a22b2ef
(cherry picked from commit a1c7315ed05df04599e7cdc5f4bcf7d3ec8d3392)
luetooth/gatt/ScanManager.java
828baf996851119865fc630e483c1b67c739a6b8 10-Aug-2016 Andre Eisenbach <eisenbach@google.com> Merge "Change URI accessed to properly update read status"
am: f337ee1fe0

Change-Id: Iad683df58a9067e275bc07c0701cce2dfb94fd83
ec2a06e660ad540a399c2a1c19b6152e22e2d034 10-Aug-2016 Andre Eisenbach <eisenbach@google.com> Merge "Protect against SecurityException generated by query"
am: 369f6662fa

Change-Id: I9e379db4c8d54a7733bba873da2cb6abc73493e6
a1c7315ed05df04599e7cdc5f4bcf7d3ec8d3392 04-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent LE scanning apps from being wrongflully downgraded to opportunistic

Bug: 30648104
Change-Id: I9d749a20eefdbeb126fa25a425d636205a22b2ef
luetooth/gatt/ScanManager.java
9944703186475606478594cab832b1a3ee2d8098 28-Jul-2016 Ajay Panicker <apanicke@google.com> Change URI accessed to properly update read status

Bug: 28970262
Change-Id: I07d9ab24d10396baa4ddbfbdfad5b1eec1b8e9d5
luetooth/map/BluetoothMapContentObserver.java
08141e5a4bb40378df37948ef3587eeaba08fd37 08-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent OPP connections from staying open forever am: 8528cc9283 am: 243cc94e95
am: 472177b8d6

Change-Id: I7c18e1c20193d209c9b8dfeea20c18874b521b4e
472177b8d6f2a3505359d92463280cc0b6fb25e5 08-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent OPP connections from staying open forever am: 8528cc9283
am: 243cc94e95

Change-Id: I4fceeb8e6884358d962b9c9f35a6d91ec993bca6
8528cc92839eaabb68dc2aa1d0a67eebb31c639f 05-Aug-2016 Ajay Panicker <apanicke@google.com> Prevent OPP connections from staying open forever

OPP connections could possibly stay open forever if no response to
the put request is received after transfering very small files. Fixed
by waiting to clear the timeout message until after the response is
received.

Bug: 30645605
Change-Id: I0743685e98e74195b99eff7012dc8c8044c425ca
luetooth/opp/BluetoothOppObexClientSession.java
d4e518bf3d2733228dec784a2477c800ea0b70a3 04-Aug-2016 Ajay Panicker <apanicke@google.com> Protect against SecurityException generated by query am: 3b00f32c41 am: 0cd2912836
am: 89f5b9c3a4

Change-Id: I0c89bd7a66d37ef68aa0fa7c0e3ffaa4eadf85a8
89f5b9c3a45457aa5416bacf5bd7fafe4be428fd 04-Aug-2016 Ajay Panicker <apanicke@google.com> Protect against SecurityException generated by query am: 3b00f32c41
am: 0cd2912836

Change-Id: I8b1a11ee66b122f8ce8313be68eccadd4f61dbe3
a531ddfe687c42fb92dc142b7338e7508f0e411e 03-Aug-2016 Ajay Panicker <apanicke@google.com> Protect against SecurityException generated by query

Bug: 30444661
Change-Id: I1d93645f1d4475cf603cda8bb28df0b960ccb445
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppUtility.java
3b00f32c411a7c5d352a6c427cf56a0429114b0c 03-Aug-2016 Ajay Panicker <apanicke@google.com> Protect against SecurityException generated by query

Bug: 30444661
Change-Id: I1d93645f1d4475cf603cda8bb28df0b960ccb445
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppUtility.java
8deecc545444dd9a66dd71cd0b24b8ffa9e40539 04-Aug-2016 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> Merge "HFP 1.7 profile update (4/4)"
am: 1b9d2081e0

Change-Id: Ib18e452187c7d673e8ae387da99bf9e6faf43bda
003ef8ff43533b17d1b7f0d4d9c5eaf2fe3496bb 29-Feb-2016 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> HFP 1.7 profile update (4/4)

-> Added HF Indicator support.
-> Sent a Broadcast intent upon receiving AT + BIND and
AT + BIEV Events with the required parameters
-> Support for sending +BIND response on indicator
status change

Bug: 19983867
Change-Id: I2580fc771080f1bc92fc4ddd5ca7c7cb57773183
(cherry picked from commit 2ab50a41dac634a78cef60a419c3bcc848c1aa78)
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
3f0419a3571d8289ab2b20c83adb45efa7ca0cc0 04-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove write type from GATT descriptor writes (2/4)" am: ddd61d3443 am: 7afffc61e7 am: 6a0a67b8a1
am: caf0b77749

Change-Id: I64aa98358fd5f2f21b1aa3dbd8c209b420ac368a
caf0b77749c94e3503f88ddc36a848180774e181 04-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove write type from GATT descriptor writes (2/4)" am: ddd61d3443 am: 7afffc61e7
am: 6a0a67b8a1

Change-Id: I1be021676f11bb6a89b2ccca6762606e8a883b3d
7afffc61e70249aad83341d166171035ada0ee58 04-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Remove write type from GATT descriptor writes (2/4)"
am: ddd61d3443

Change-Id: I08ecf740a524cb511d86aa771809ccbc4afbf57b
44234cde4eea7d9452481f016ac6231ac318ed39 31-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Remove write type from GATT descriptor writes (2/4)

According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used used
for this sub-procedure".

Change-Id: I557a55d2ba8e998bce552e40ec7031d91bc82752
luetooth/gatt/GattService.java
e1d61a7f4552303baea14f909c87a72730581dfc 01-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> GATT Server refactoring (3/4)

Bug: 27999121
Change-Id: I45fec0fa6d0e8e26e40e1856ba9fee6f7fbd4f7b
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/ServiceDeclaration.java
c7a7f89786fb7de8a151d10cb841e2184af5df99 03-Aug-2016 Ajay Panicker <apanicke@google.com> Merge "Move file lookup to its own thread for beaming"
am: 001643829c

Change-Id: I6849f122ad600984b8e99a38576343d67ae86033
cc162f0d72b5d004012100f13f78643dcb60b3c9 26-Jul-2016 Ajay Panicker <apanicke@google.com> Move file lookup to its own thread for beaming

Bug: 28973021
Change-Id: I40f6d32ffadd58e60dbd1e44802a629b9fab64e4
(cherry picked from commit 9b6816400cbb35df12eaf5fd59d1996d3d0dad84)
luetooth/opp/BluetoothOppHandoverReceiver.java
cf301e1945c2c5b7ea2bc19682d2d936b1f97c1d 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Revert "resolve merge conflicts of 593bbe3 to master"

This reverts commit b4b54e0782a50f8a0a826bff7ef6712d7d624a0d.

Change-Id: I8f60d8ca55a4e4cfd5271754823421737120e5c9
luetooth/gatt/GattService.java
luetooth/gatt/ServiceDeclaration.java
b4b54e0782a50f8a0a826bff7ef6712d7d624a0d 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> resolve merge conflicts of 593bbe3 to master

Change-Id: I049192551b70fd8b45d0ced7238681a785e65fd0
593bbe3ca3d72a3ae78c51ecf53f57b8a1b11143 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> resolve merge conflicts of ebe5b95 to stage-aosp-master am: de2637a1bc
am: 00f841f2ef

Change-Id: I99a268fc165f374555aeebb9365b936c23c6de2e
fd67dbf471046b4df34fc54813b9e4d6b4527871 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> Revert "resolve merge conflicts of ebe5b95 to stage-aosp-master"

This reverts commit 0f90008844e9926528627764b7257460bb38c4c5.

Change-Id: Ib5592727ff250287ae1a3265fa8e34b0b78acc35
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/ServiceDeclaration.java
de2637a1bc06ee5122a208a0648702a19747e801 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> resolve merge conflicts of ebe5b95 to stage-aosp-master

Change-Id: I8c9ef03ff5e26128c9c6d69635355c4637075a45
0f90008844e9926528627764b7257460bb38c4c5 03-Aug-2016 Jakub Pawlowski <jpawlowski@google.com> resolve merge conflicts of ebe5b95 to stage-aosp-master

Change-Id: I5d8cae2079332998617311d7a289a2575b5d648b
05405f01802e6b5210575ad348ca441edb5cfb8b 01-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> GATT Server refactoring (3/4)

Bug: 27999121
Change-Id: I45fec0fa6d0e8e26e40e1856ba9fee6f7fbd4f7b
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/ServiceDeclaration.java
3008d5b9a075f4f5c2a64f0aa77af2201d9ac23c 03-Aug-2016 Myles Watson <mylesgw@google.com> Merge "RemoteDevices: Optimize adding new remote devices" am: 55e58872c3 am: 7ceadd1029 am: 271d3f743a
am: 58f9f0d544

Change-Id: I5993cf0f533011502da1f242f6034dd5084f7a3c
58f9f0d54482ac33291205ff82fb4b5d47b79aef 03-Aug-2016 Myles Watson <mylesgw@google.com> Merge "RemoteDevices: Optimize adding new remote devices" am: 55e58872c3 am: 7ceadd1029
am: 271d3f743a

Change-Id: Ibe54389ba36b5f60553674032554811be490f1ff
7ceadd102906eb2bd38ce7e82979ad64462b3544 03-Aug-2016 Myles Watson <mylesgw@google.com> Merge "RemoteDevices: Optimize adding new remote devices"
am: 55e58872c3

Change-Id: I85799db7e1fd3069815254afd2d6ebb559894d5a
0e742574e6938bc706ff7c99aea781d0c78bf755 03-Aug-2016 Ajay Panicker <apanicke@google.com> Move file lookup to its own thread for beaming am: 9b6816400c am: a4788f406d
am: 13e57fc462

Change-Id: Idd86f0cf941e567b0aea9ada29663e1cfe86b95e
13e57fc4623dcf378faa8db324ac08a9db0dcb13 03-Aug-2016 Ajay Panicker <apanicke@google.com> Move file lookup to its own thread for beaming am: 9b6816400c
am: a4788f406d

Change-Id: I3ab51d18fcc8f02f7345fbabbb787c25cda12e52
1fb90c4f25ba33b0f951e6ac092d05f85d355e2f 15-Jul-2016 Myles Watson <mylesgw@google.com> RemoteDevices: Optimize adding new remote devices

RemoteDevices keeps track of the Bluetooth devices which have been
seen since the Bluetooth stack was initialized. Each time a remote
device is discovered, it is added to a hash map. When the size of the
hash map grows beyond a few hundred devices, the performance degrades.

This patch:
- creates the address string once per search
reducing the average search time with 300 devices from ~20ms to ~1ms
- uses the hash of the address string to search
further reducing the time with 1200 devices from ~2ms to ~1ms

HashMap<BluetoothDevice, DeviceProperties> became
HashMap<String, DeviceProperties>

mDevice now stores the BluetoothDevice in each instance of
DeviceProperties.

TEST: Used System.nanoTime() to measure the elapsed time of
getDeviceProperties()

Change-Id: Id44886143fb2910955294341d4938d638c72f7f9
Signed-off-by: Myles Watson <mylesgw@google.com>
luetooth/btservice/RemoteDevices.java
9b6816400cbb35df12eaf5fd59d1996d3d0dad84 26-Jul-2016 Ajay Panicker <apanicke@google.com> Move file lookup to its own thread for beaming

Bug: 28973021
Change-Id: I40f6d32ffadd58e60dbd1e44802a629b9fab64e4
luetooth/opp/BluetoothOppHandoverReceiver.java
7d4aa832cb9a8a9f21ce0fad5510ae82526c3d28 27-Jul-2016 Marie Janssen <jamuraa@google.com> Fix bugs in play status and play pos notifications

Fix multiple issues with status notificatios:
* Playback state was not being sent when state wasn't sent
accompanying a metadata change
* Play state was being sent without an update
* Position was being sent without a change and with the wrong
indicator
* Position was not being scheduled for update when playing.
* Position was being scheduled for update when paused / stopped.

Bug: 30459664
Bug: 29400658
Bug: 28639383
Change-Id: Ic550dcab0430be45187b0267cc77875740388a2a
(cherry picked from commit fa81085f6cda571d56c62eb1d646ae4a52cb90ee)
luetooth/avrcp/Avrcp.java
97e92834b2562c0594976a3c69310be95e947dee 30-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\\"Fix bugs in play status and play pos notifications\\\\" am: 764eb24d86 am: 0613023813 am: d88546c4b1
am: 6475fa4396

Change-Id: I034d9569aa8e85b88004ff4d0fb62a0100fcf389
6475fa43967d1a3bb8850477e4be03a2eceb2e8d 30-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\"Fix bugs in play status and play pos notifications\\\" am: 764eb24d86 am: 0613023813
am: d88546c4b1

Change-Id: Ia9947835c199cc8fc44118f8048c235058f890e1
06130238138c1675fc571999959d17a9256dec98 30-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \"Fix bugs in play status and play pos notifications\"
am: 764eb24d86

Change-Id: I6a5119996813069494b3c7ee666025474d1d9763
fa81085f6cda571d56c62eb1d646ae4a52cb90ee 27-Jul-2016 Marie Janssen <jamuraa@google.com> Fix bugs in play status and play pos notifications

Fix multiple issues with status notificatios:
* Playback state was not being sent when state wasn't sent
accompanying a metadata change
* Play state was being sent without an update
* Position was being sent without a change and with the wrong
indicator
* Position was not being scheduled for update when playing.
* Position was being scheduled for update when paused / stopped.

Bug: 30459664
Bug: 29400658
Bug: 28639383
Change-Id: Ic550dcab0430be45187b0267cc77875740388a2a
luetooth/avrcp/Avrcp.java
a70fd1dbc691a37bfb9c54700a07c7cbbf29cc1f 28-Jul-2016 Ajay Panicker <apanicke@google.com> Change URI accessed to properly update read status am: cdf75c3f2b am: 237f8de011
am: 534725331f

Change-Id: I23963634db60486d5b3c6cc12382db1d9ec6e830
534725331f0a17131a44934ee8107dd9c3a00056 28-Jul-2016 Ajay Panicker <apanicke@google.com> Change URI accessed to properly update read status am: cdf75c3f2b
am: 237f8de011

Change-Id: I9d5670e43201dec50fc30a5c8ce33c1c8729bd1c
cdf75c3f2b9e0e367ea2a4ce92018a6de662f4cd 28-Jul-2016 Ajay Panicker <apanicke@google.com> Change URI accessed to properly update read status

Bug: 28970262
Change-Id: I07d9ab24d10396baa4ddbfbdfad5b1eec1b8e9d5
luetooth/map/BluetoothMapContentObserver.java
764de0b13057da964d739232781f3538ddb8dc06 27-Jul-2016 Ajay Panicker <apanicke@google.com> Don\\'t use SMS database until after the phone is unlocked am: db8d8ae565
am: 621a319d78

Change-Id: Id0a9cc5b742ca2a7ce7ebf3a3aed80239b2e6ee4
621a319d78185d22d19b8b6d125daff8f6d0a569 27-Jul-2016 Ajay Panicker <apanicke@google.com> Don\'t use SMS database until after the phone is unlocked
am: db8d8ae565

Change-Id: Iba27a3b5695ea1346531df0ecb81a55bbc9c5a01
986c5d4484870e6f0025f688e557c0f45e59ee6b 27-Jul-2016 Ajay Panicker <apanicke@google.com> Merge "Don't use SMS database until after the phone is unlocked" into nyc-mr1-dev
db8d8ae565b3db6a5e3187170dcb7b281a79f9da 21-Jul-2016 Ajay Panicker <apanicke@google.com> Don't use SMS database until after the phone is unlocked

When the device is encrypted and a passcode is set,
the SMS database isn't available and the MAP service
crashes when trying to access it. The service will now
respond with OBEX_SERVICE_UNAVAILABLE until the phone
is unlocked. At this point, the SMS database will
notify the content observer that all the messages are
available, and send corresponding events.

Bug: 29990836
Change-Id: I53f12d0e114212d94f16b56df7c7dbe73f6254df
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapObexServer.java
06c566ebd3462ec18624f1db9f49f81c2eec0cef 08-Jul-2016 Lianchao Song <songlianchao@huawei.com> Add foreground flag to AG_CALL_CHANGED broadcast intent.

To fix the issue that the watch is still ringing after answer an
incoming call on phone. It is caused by the ACTION_CALL_CHANGED
broadcast reception processing delayed.

Bug:29931814

Change-Id: I8d8f297c3a13dfe65674eca94724a50d82618f5e
Signed-off-by: m00230717 <m00230717@notesmail.huawei.com>
(cherry picked from commit 6b375a456e971ae8ef7ddf1d7d41876ca39e44bc)
luetooth/hfpclient/HeadsetClientStateMachine.java
9ebceb7b7d544e56cacf4a79436331022ebeee30 13-May-2016 Joseph Pirozzo <pirozzoj@google.com> AVRCP Statemachine

Refactor AVRCP profile to reflect state machine design as seen in other
bluetooth profiles. This update will include all features required for
AVRCP 1.3 along with absolute volume control from 1.4. Interface logic
will be seperated out into the Service class and policy logic will be
maintained within the StateMachine.

bug: 28671900
Change-Id: I710bac73e3113a7729f449ea9dbb854ceb2438fb
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/AvrcpControllerStateMachine.java
luetooth/avrcp/NowPlaying.java
luetooth/avrcp/PlayerApplicationSettings.java
luetooth/avrcp/PlayerInfo.java
luetooth/avrcp/RemoteDevice.java
luetooth/avrcp/RemoteMediaPlayers.java
luetooth/avrcp/TrackInfo.java
b83b782b4913b687bb94cbea11768f05214c7fb0 19-Jul-2016 Chenjie Luo <cjluo@google.com> Merge \\\\"Add foreground flag to AG_CALL_CHANGED broadcast intent.\\\\" am: df005bf244 am: 6a15ebb73f am: e9789c7e89
am: 3532f9b31f

Change-Id: Ib209ef502d2c92815375f08fd6b42a654bf31fcc
3532f9b31f7cd3b76449f209a37490f768b34141 19-Jul-2016 Lianchao Song <songlianchao@huawei.com> Merge \\\"Add foreground flag to AG_CALL_CHANGED broadcast intent.\\\" am: df005bf244 am: 6a15ebb73f
am: e9789c7e89

Change-Id: I13b56a0ade475485a94f3d2e9db3583aa3233b85
6a15ebb73f8fa1fe50d930c175324530fc676537 19-Jul-2016 Lianchao Song <songlianchao@huawei.com> Merge \"Add foreground flag to AG_CALL_CHANGED broadcast intent.\"
am: df005bf244

Change-Id: I0c8d2337e82c472fe4bd07d90f61c8b39e56dd80
df005bf2443da3737b4f9c645b6302d8497acf71 19-Jul-2016 Chenjie Luo <cjluo@google.com> Merge "Add foreground flag to AG_CALL_CHANGED broadcast intent."
9b04e432dee914b685ea30a310d0626d85689f4a 12-Jul-2016 Marie Janssen <jamuraa@google.com> Fix AVRCP crash, position and state tracking

When the MediaController goes away (media stops) a NPE would cause a
crash.

Initialize the position so that an initial notification gets sent
when position is requested, send it when the music is paused, and
send play state whenever the app sends us a play state update.

Bug: 30039744
Bug: 29416450
Change-Id: I44397b3dc40d328fa75a2c15875fad298a5090dd
(cherry picked from commit 84d3f084d4d1a65eb7a481e5a7fe4a6ac827be7b)
luetooth/avrcp/Avrcp.java
2be5946285b5956fc752f4e1fbbaf9a3f87e20e5 30-Jun-2016 Marie Janssen <jamuraa@google.com> Refactor playback position tracking

Use PlaybackState directly to track the position through time. Update
the state when necessary (track changes, etc.)

Remove complex logic and centralize sending of Play Position
Notificaiton response and scheduling.

Update dumpsys and add current package session.

Bug: 29416450
Bug: 29606822

Change-Id: Ie82b48d6d7f9e1a05b64835731433d05a3a3a41a
(cherry picked from commit eb9e6ef0ecde4929fa2df1aa4cc8954d88d3b452)
luetooth/avrcp/Avrcp.java
ca077668fb4dcf335280e194ceda7931ef966e01 15-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Remove redundant call to sendShutdownMessage to prevent crash am: 983e5e14f9
am: 49dbf0e861

Change-Id: I3969078fd870a15eac1c1de87605f13ccfaeff0a
5b4e35e4e3b642441c4eb58501e568273390cb3b 15-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> Merge \"MAP: Remove redundant call to sendShutdownMessage to prevent crash\"
am: 0786878b88

Change-Id: Ic62f273f84ae4b6b3c4d63ae089511b19723c1e4
49dbf0e8616c517d0338b0fb08f610f25a84eb10 15-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Remove redundant call to sendShutdownMessage to prevent crash
am: 983e5e14f9

Change-Id: I6b94817118b438ee0643c5f35fee761512f8a9bc
983e5e14f9d4ef8e42876f67227777f1b6510ba0 06-Jun-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Remove redundant call to sendShutdownMessage to prevent crash

Usecase:
Perform BT off/on repeatedly.

Issue:
Bluetooth crashes.

Fix:
Remove redundant call to sendShutdownMessage() from stop API to prevent
MapServiceMessageHandler becoming null and being dereferenced.

Bug: 29149190
Change-Id: I739664975043c4a1895fd2113869c87cdb704338
(cherry picked from commit 5847ca3c7068500b1f2a4cd4cf5ff373347f8fbf)
luetooth/map/BluetoothMapService.java
5847ca3c7068500b1f2a4cd4cf5ff373347f8fbf 06-Jun-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Remove redundant call to sendShutdownMessage to prevent crash

Usecase:
Perform BT off/on repeatedly.

Issue:
Bluetooth crashes.

Fix:
Remove redundant call to sendShutdownMessage() from stop API to prevent
MapServiceMessageHandler becoming null and being dereferenced.

Bug: 29149190
Change-Id: I739664975043c4a1895fd2113869c87cdb704338
luetooth/map/BluetoothMapService.java
f64a40992fa6f8be5b294a3b80fa4f8d6fa21818 15-Jul-2016 Andreas Gampe <agampe@google.com> Avrcp: Fix duplicate
am: dd52cecc0a

Change-Id: I594e8585ae9e0024b0b7964ae4dd796d99842e42
dd52cecc0a3026529a9229f22ab203be1633d69e 15-Jul-2016 Andreas Gampe <agampe@google.com> Avrcp: Fix duplicate

Introduced by commit a85380b8b5f2cb1a2a983cee18343976774334dd.

Change-Id: I7907fcb34156ebf9119ba0c844c9845ec349ffd4
luetooth/avrcp/Avrcp.java
61da8b01a05406fecc03c6e302ae77a99a516d71 15-Jul-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of eb9e6ef to nyc-mr1-dev-plus-aosp
am: a85380b8b5

Change-Id: If61737d23c69d4a853a45a19c21ae951ef8333a5
a85380b8b5f2cb1a2a983cee18343976774334dd 15-Jul-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of eb9e6ef to nyc-mr1-dev-plus-aosp

Change-Id: I67063e627d4d7c9827cb656658b456acd4956816
83037083f3448c576ae960c033fbe0d5bcc5956b 14-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "PAN: Avoid reconfiguration of bt-pan interface in NAP role" into nyc-mr1-dev
0a75d4090855858f9dbc91af28965312409312e5 14-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> Merge \\\\"PAN: Avoid reconfiguration of bt-pan interface in NAP role\\\\" am: aa83abd905 am: 31bd447ec8 am: 65d42eb5b6
am: 894cfc61df

Change-Id: I87f234b0ee670bb2632bee4ffa2bf96d0a3374a9
894cfc61df17c26644bc77a47f6ff2b9e5cb1043 14-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> Merge \\\"PAN: Avoid reconfiguration of bt-pan interface in NAP role\\\" am: aa83abd905 am: 31bd447ec8
am: 65d42eb5b6

Change-Id: I83dde0d53af97c13c8f09f95604164579936b6c0
31bd447ec80ee7fc3b53387a1a955242a4afbca7 14-Jul-2016 Hemant Gupta <hemantg@codeaurora.org> Merge \"PAN: Avoid reconfiguration of bt-pan interface in NAP role\"
am: aa83abd905

Change-Id: I084e393e11a893744a6b05b9a9ed3227b0df121a
fe85d07eca1b97ea667caa5cdd6b3fab59670188 16-Jun-2016 Nitin Shivpure <nshivpur@codeaurora.org> PAN: Avoid reconfiguration of bt-pan interface in NAP role

Issue:
Browsing is not working with multiple remote PANU Device(s).

Root Cause:
When the 1st remote PANU is connected, the bt-pan interface gets
configured. As soon as 2nd PANU is connected, the bt-pan interface
goes into a bad state. The second device is able to write Ethernet
packets on the bt-pan interface (TUN driver) after reconfiguration,
but it is unable to read Ethernet packets from the interface.

Fix:
If the bt-pan interface is already configured in the NAP role,
then do not reconfigure bt-pan when the 2nd PANU is connected.

Bug: 29992925
Change-Id: Ib6e0cb91d573649af45ffe25c7095a4bd74a5022
luetooth/pan/PanService.java
fa5be2f2cca685332d48c8bafe1b3988ae92bbc5 16-Jun-2016 Hemant Gupta <hemantg@codeaurora.org> PAN: Avoid reconfiguration of bt-pan interface in NAP role

Issue:
Browsing is not working with remote PANU Device(s).

RCA:
DUT is in NAP role, bt-pan interface is configured for NAP role,
when 1st remote PANU is connected. bt-pan interface is being
reconfigured, whenever 2nd PANU is connected, which leads bt-pan
interface to go in bad state. BT is able to write Ethernet packets on
bt-pan interface(TUN driver) after reconfiguration, but it's
unable to read Ethernet packets from bt-pan interface(TUN driver).

Fix:
If bt-pan interface is already configured in NAP role,
then do not reconfigure bt-pan, when 2nd PANU is connected.

BUG: 29992925
Change-Id: Ib6e0cb91d573649af45ffe25c7095a4bd74a5022
luetooth/pan/PanService.java
84d3f084d4d1a65eb7a481e5a7fe4a6ac827be7b 12-Jul-2016 Marie Janssen <jamuraa@google.com> Fix AVRCP crash, position and state tracking

When the MediaController goes away (media stops) a NPE would cause a
crash.

Initialize the position so that an initial notification gets sent
when position is requested, send it when the music is paused, and
send play state whenever the app sends us a play state update.

Bug: 30039744
Bug: 29416450
Change-Id: I44397b3dc40d328fa75a2c15875fad298a5090dd
luetooth/avrcp/Avrcp.java
eb9e6ef0ecde4929fa2df1aa4cc8954d88d3b452 30-Jun-2016 Marie Janssen <jamuraa@google.com> Refactor playback position tracking

Use PlaybackState directly to track the position through time. Update
the state when necessary (track changes, etc.)

Remove complex logic and centralize sending of Play Position
Notificaiton response and scheduling.

Update dumpsys and add current package session.

Bug: 29416450
Bug: 29606822

Change-Id: Ie82b48d6d7f9e1a05b64835731433d05a3a3a41a
luetooth/avrcp/Avrcp.java
a24b1d6a989b38e9bf3467493e017695a20b5f35 14-Jul-2016 Ajay Panicker <apanicke@google.com> Allow MAP to accept and list draft messages without recipients am: c06dad4b6c
am: 467169d322

Change-Id: I5b01160b7a5c78d2ce672c25f09728ae6ebfc913
467169d322ec315f4d16cbd2328b01132f1b29f2 14-Jul-2016 Ajay Panicker <apanicke@google.com> Allow MAP to accept and list draft messages without recipients
am: c06dad4b6c

Change-Id: Ie52bbcdf6dd372e02c936ed2909e35c34b7e321d
c06dad4b6c213f57da06fe74903a25733ef6579f 06-Jul-2016 Ajay Panicker <apanicke@google.com> Allow MAP to accept and list draft messages without recipients

Bug: 28970268
Change-Id: I5bdef6cd67708036352ed37ea35b027d6a54af03
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapObexServer.java
bc70d0c097c4c8777512e102c270e8a0a73590d7 21-Oct-2015 Satish Kodishala <skodisha@codeaurora.org> Let audio HAL know when BT is turned off

Audio HAL needs setParams("hfp_enable=false") when BT is turned off since if it does not, then
the next enable setParams("hfp_enable=true") does not succeed due to
audio HAL being in a weird stage.

Bug: b/29937812

Change-Id: I111e38cbe578fe3eca66b07da8ad9204d064a02c
(cherry picked from commit fcc828915490c65f7c9ae2073a57ee9f0efadb15)
luetooth/hfpclient/HeadsetClientStateMachine.java
daf9fe1f6a146f7eb03a8abefc5202b13598cdd2 13-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\\"Fix AVRCP crash, position and state tracking\\\\" am: 5b8a0db93b am: aaa4f6f36f am: d7f5fb9c4a
am: c2d627cacc

Change-Id: I74e7c1e6d85667aaac4f04f87e8864fd436611a7
c2d627caccd362d30a2dba83235d1d2770739c47 13-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\"Fix AVRCP crash, position and state tracking\\\" am: 5b8a0db93b am: aaa4f6f36f
am: d7f5fb9c4a

Change-Id: I63cf6868fc934d86a768bc7cb4594aa5708f7909
aaa4f6f36f07e33b8c4ff51383b168576df76350 13-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \"Fix AVRCP crash, position and state tracking\"
am: 5b8a0db93b

Change-Id: Ic553fbdb7e2bbb2356b0525e8d54a2a59945d27e
3635a926bd7316a55b288a54d409a1070a9c19e8 12-Jul-2016 Marie Janssen <jamuraa@google.com> Fix AVRCP crash, position and state tracking

When the MediaController goes away (media stops) a NPE would cause a
crash.

Initialize the position so that an initial notification gets sent
when position is requested, send it when the music is paused, and
send play state whenever the app sends us a play state update.

Bug: 30039744
Bug: 29416450
Change-Id: I44397b3dc40d328fa75a2c15875fad298a5090dd
luetooth/avrcp/Avrcp.java
6b375a456e971ae8ef7ddf1d7d41876ca39e44bc 08-Jul-2016 Lianchao Song <songlianchao@huawei.com> Add foreground flag to AG_CALL_CHANGED broadcast intent.

To fix the issue that the watch is still ringing after answer an
incoming call on phone. It is caused by the ACTION_CALL_CHANGED
broadcast reception processing delayed.

Bug:29931814

Change-Id: I8d8f297c3a13dfe65674eca94724a50d82618f5e
Signed-off-by: m00230717 <m00230717@notesmail.huawei.com>
luetooth/hfpclient/HeadsetClientStateMachine.java
7f39e26e61d97333b1a779d8bf0f6f123e087378 08-Jul-2016 Satish Kodishala <skodisha@codeaurora.org> Check for call/call setup state before creating SCO am: 4b84ae9813
am: bd4c72e7b4

Change-Id: I86708d6e7088d260a358bd93075c56416245cb35
bd4c72e7b4ce413441ba1d766d6e277db7400e4b 08-Jul-2016 Satish Kodishala <skodisha@codeaurora.org> Check for call/call setup state before creating SCO
am: 4b84ae9813

Change-Id: Idf65fc98fb23ecf86010bafc3a857878f932aec3
cf8c10755f6f9c90f4627d4fbcb73e3b1a1d389c 08-Jul-2016 Satish Kodishala <skodisha@codeaurora.org> Merge \"Check for call/call setup state before creating SCO\"
am: 598902d8e2

Change-Id: I74d86b349b86efb7c82f114aa72be4a4af55ce0a
96c327c3d12102ecb02bf02f3183afef00b85a7f 04-May-2016 Satish Kodishala <skodisha@codeaurora.org> Check for call/call setup state before creating SCO

Use case:
1. Run HFP AG PTS test cases.
or
1. Pair and connect phone with Sony xba-bt75 Bluetooth headset.
2. Make incoming call and accept it.

Failure:
PTS test cases fail. There will be no call audio on
Sony xba-bt75 headset.

Root cause:
Telephony asking to create SCO before incoming call
is accepted.

Fix:
If there is no active/held call, outgoing call setup
in progress, we should not create SCO. Telephony will
ask to create SCO for incoming call before the call
becomes active, this creates IOT issues and fail below
PTS test cases.
TC_AG_ACC_BV_08_I
TC_AG_ACC_BV_10_I
TC_AG_ACC_BV_11_I
TC_AG_ACC_BV_12_I
TC_AG_ACC_BV_13_I
TC_AG_ACC_BV_14_I

Bug: 29417803
Change-Id: I0c1002b31da65cbc0b0e74b590468d37ea51d065
luetooth/hfp/HeadsetStateMachine.java
de8d996c5eb073949210f53b739ef12c2c3054ee 06-Jul-2016 Sanket Agarwal <sanketa@google.com> HF should wait for AG to change conference

We should always wait for AG to make changes to the call before we show
it to the user so that the UI does not get confusing (inconsistent).
Currently we are not waiting for the conf. call to be
disconnected/established by AG before we show this on our end.

Bug: b/29898872
Change-Id: Ia9198958122e9e539fb6f2a6f08942d3174ae2fc
(cherry picked from commit a0aa296e1311cbc72ba0ef18c434f68b60c8f935)
luetooth/hfpclient/connserv/HfpClientConference.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
2b32bc5c037a04239b24e3bdb7d193d0091eac02 30-Jun-2016 Sanket Agarwal <sanketa@google.com> Conference calling via HFP

Following scenarios are supported:
1. Accepting incoming call when there is an active call (Call Waiting)
-- We always put the active call on hold.
2. Rejecting incming call when there is an active call (Call Waiting)
3. Merging calls after (1) and going into a conference
4. Ending the conference

Bug: b/29898872
Change-Id: I630bf6d7149fc12eea67f4a49b24fe500f3913d3
(cherry picked from commit 94e2ae2ef4aa4d08855d829251da20585ad977d1)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
4b84ae9813878f957b6009d6f0d86bbfb6a36067 04-May-2016 Satish Kodishala <skodisha@codeaurora.org> Check for call/call setup state before creating SCO

Use case:
1. Run HFP AG PTS test cases.
or
1. Pair and connect phone with Sony xba-bt75 Bluetooth headset.
2. Make incoming call and accept it.

Failure:
PTS test cases fail. There will be no call audio on
Sony xba-bt75 headset.

Root cause:
Telephony asking to create SCO before incoming call
is accepted.

Fix:
If there is no active/held call, outgoing call setup
in progress, we should not create SCO. Telephony will
ask to create SCO for incoming call before the call
becomes active, this creates IOT issues and fail below
PTS test cases.
TC_AG_ACC_BV_08_I
TC_AG_ACC_BV_10_I
TC_AG_ACC_BV_11_I
TC_AG_ACC_BV_12_I
TC_AG_ACC_BV_13_I
TC_AG_ACC_BV_14_I

Bug: 29417803
Change-Id: I0c1002b31da65cbc0b0e74b590468d37ea51d065
(cherry picked from commit c01a35486da7fa801b4cb6ad4d1bb7702ab4f272)
luetooth/hfp/HeadsetStateMachine.java
aec2f01b54afe0c0f20c2bc786365e1c746edf43 02-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\\"Refactor playback position tracking\\\\" am: 0d83e2969a am: 33bbc33e8b am: 629be9ed3a
am: 720cf9307a

Change-Id: I7794c863f5d0906fdcd141f702d2360f5f13af4a
720cf9307ac4d657c19d25cccba487757de4f1aa 02-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \\\"Refactor playback position tracking\\\" am: 0d83e2969a am: 33bbc33e8b
am: 629be9ed3a

Change-Id: Ieda928b5450999418a65aec9ae4e10b7479345ad
33bbc33e8b0001d2cdee0931c31187ccc2cf615f 02-Jul-2016 Marie Janssen <jamuraa@google.com> Merge \"Refactor playback position tracking\"
am: 0d83e2969a

Change-Id: I02e4595765448e2b475b7192d8468eb588a774c5
f7942360dd9d807bea087c4ef42773f5e800c0c4 30-Jun-2016 Marie Janssen <jamuraa@google.com> Refactor playback position tracking

Use PlaybackState directly to track the position through time. Update
the state when necessary (track changes, etc.)

Remove complex logic and centralize sending of Play Position
Notificaiton response and scheduling.

Update dumpsys and add current package session.

Bug: 29416450
Bug: 29606822

Change-Id: Ie82b48d6d7f9e1a05b64835731433d05a3a3a41a
luetooth/avrcp/Avrcp.java
61ca891c486de3f2b42b4619b6095b9eef5b7b47 01-Jul-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Fix work profile app not being able to create bond"
1ff2e6e9306272bd113c8633c9b52fb169eddcb3 29-Jun-2016 Sanket Agarwal <sanketa@google.com> Improve connection handling logic in ConnService

Connection for HFP HF role in Bluetooth is currently trying to
handle all cases of connected vs disconnect HFP. This can be offloaded
to ConnServ where the connection lifecycle should be maintained (and not
in the connection itself).

1. Fixes NPEs generated by the BtCarHfpFuzzTest.
2. Reduces the number of calls to AT+CLCC

Change-Id: Ibccadb7721cbbd2260cbfc5685d66027277e8a59
(cherry picked from commit aa09a41a685e957786b69d4101f5107b9d6d1d9b)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
05462fe44531f887fe91ac173ec645e91b236025 28-Jun-2016 Sanket Agarwal <sanketa@google.com> Redesign HFP Client call handling

1. Use UUIDs to interact between the upper layers and state machine.
2. Centralized place for managing calls.
3. Mechanism to co-relate outgoing calls with the AT+CLCC reply
4. Get rid of non-ECC hacks (we basically do not support devices not
supporting ECC)

Bug: b/29788044
Change-Id: I497c59583124825fad9be800a7c0a53920e67d4c
(cherry picked from commit 184038a1db6482eeb4e54f834b286ea70ea030d9)
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/ConnectionKey.java
luetooth/hfpclient/connserv/HfpClientConference.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
be6f455a86e68a66cd549cd1c7ba0b4a2c21a4a9 25-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Set the Adapter Service onCreate() am: 39d7556b76
am: 7c4a993186

Change-Id: I14d3607031745c3bdfffa5a25a1dc5dff36f4e81
7c4a9931865483dbc01fa39270d04395de37cb09 25-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Set the Adapter Service onCreate()
am: 39d7556b76

Change-Id: I202858f6c0daf7eab60d157b344952666033d337
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
luetooth/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)
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
a9bb39883981bd84ead436496e1c208d722529e3 23-Jun-2016 Calvin On <con@google.com> Merge \\"Use the live AdapterService in ProfileService.\\" into nyc-mr1-dev am: ae20236ee9
am: 0d3d71c1db

Change-Id: I5e4c2418c646812e880662d861b84a5b7bdc9589
0d3d71c1db27ef23168e9449d9d48f6c915806d7 23-Jun-2016 Calvin On <con@google.com> Merge \"Use the live AdapterService in ProfileService.\" into nyc-mr1-dev
am: ae20236ee9

Change-Id: I295257c0afd078410881f2d709dcf68c5ab03947
ae20236ee98b1c0884b48ec3773b28fd01764520 23-Jun-2016 Calvin On <con@google.com> Merge "Use the live AdapterService in ProfileService." into nyc-mr1-dev
184af10d93ed09be4dc1ebf554d555c747b947c8 23-Jun-2016 Ajay Panicker <apanicke@google.com> Close output stream before getting response am: e026ad5004 am: 12d518f51f
am: d4362de2c0

Change-Id: Ifc5a514761a536ace0e990d0ba6d363bdf1d4e24
d4362de2c0993a302cd4a95f31ef8b9b8b2f1d12 23-Jun-2016 Ajay Panicker <apanicke@google.com> Close output stream before getting response am: e026ad5004
am: 12d518f51f

Change-Id: I724d5e6386af9606fb437ad9a5e28a9ae3fec8f9
12d518f51fbdac3aa618155563ebb884e4942df9 23-Jun-2016 Ajay Panicker <apanicke@google.com> Close output stream before getting response
am: e026ad5004

Change-Id: I54248b785427cce08568d7fed2bb329f90b3af02
5f40beebd693d937989506043f7131bd5f45e8c4 23-Jun-2016 Ajay Panicker <apanicke@google.com> Close output stream before getting response
am: e026ad5004

Change-Id: I55fc6fee16f4e25817fc6cbad37e83052a41a7dd
e026ad5004a084c95b86a061924c692546a10395 23-Jun-2016 Ajay Panicker <apanicke@google.com> Close output stream before getting response

If the output stream is still open after finishing the sending of
a file, a CONTINUE response code is received instead of an OK code.

Bug: 29583227
Change-Id: I1b2515e8fe5eec208bbbe1df17f96cc20c5ea884
luetooth/opp/BluetoothOppObexClientSession.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
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
2e51bef439b498664a3a162056d7437d06c53ac8 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge commit \\'303ef0bd1343806adba9b00e39ca05b7c9e50a4f\\' into manual_merge_303ef0b am: d2d127b950
am: a2c9d3447c

Change-Id: If3f3daafeb62e92a10045203e619c0ef5cc6816a
a2c9d3447c3aac71c6e86c97ae6bf06c1f698035 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge commit \'303ef0bd1343806adba9b00e39ca05b7c9e50a4f\' into manual_merge_303ef0b
am: d2d127b950

Change-Id: Id89a8157ec0a2ee524564b7401e85377527f0af0
d2d127b95044331cfd073afbe5ef177c807c0c0d 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge commit '303ef0bd1343806adba9b00e39ca05b7c9e50a4f' into manual_merge_303ef0b

Change-Id: I9cfbac32c1a9758860e856bd0cbfa4f9985d6690
ff83745aa575d979c926bcbca56b42ea25c10378 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge \"Prevent energy data overflow\" into nyc-dev
am: 303ef0bd13

Change-Id: Ic6927d8d5b929954b78c616d64332c29b24e55bf
303ef0bd1343806adba9b00e39ca05b7c9e50a4f 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Merge "Prevent energy data overflow" into nyc-dev
a2eb761dc9c8497f9cd8b365f7c2da9802c6f18c 22-Jun-2016 Ajay Panicker <apanicke@google.com> Fix how file size is calculated if not provided am: 120ba1db4d am: c55f14ae33
am: ad681e8f68

Change-Id: Idfae8cd631078868ac5f8fbba83fc3c26e82b9d0
ad681e8f6882289e0f776789579950b8748ba204 22-Jun-2016 Ajay Panicker <apanicke@google.com> Fix how file size is calculated if not provided am: 120ba1db4d
am: c55f14ae33

Change-Id: I806a2961726309fd78570f1f82b8fb651ed483eb
c91452a0a18b88a84e86e4d2a5e691d19863b20b 22-Jun-2016 Ajay Panicker <apanicke@google.com> Fix how file size is calculated if not provided
am: 120ba1db4d

Change-Id: I240f7fc0955aa6ec9d1e4e18cf217eac2b3aa394
c55f14ae33a170743877b01b34c0c66a71e792fe 22-Jun-2016 Ajay Panicker <apanicke@google.com> Fix how file size is calculated if not provided
am: 120ba1db4d

Change-Id: I891ecc0ba9c66d37ac785df4412a0ab69390026b
120ba1db4d2c8822473ce2e0623297dbf08449a4 21-Jun-2016 Ajay Panicker <apanicke@google.com> Fix how file size is calculated if not provided

Currently if there is no file size provided, InputStream.available()
is used to guess how many bytes are available. According to the
java documentation, available() should not be used to calculate
file sizes, as it isn't guarenteed to return the total number of
bytes in the stream. This is fixed by reading the stream to
calculate the length, then resetting the stream.

Bug: 29334784
Change-Id: Ic851c46d053157e4d5404352d76f9ff87a509607
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppSendFileInfo.java
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
luetooth/btservice/AdapterService.java
8b2711a9c8537df86e73a0d01b9c3f737f29c643 21-Jun-2016 Sanket Agarwal <sanketa@google.com> Remove calls when device gets disconnected

Bug: b/29170324
Change-Id: I4e9ae948801f80d8f22fb737812e1ed403077bff
(cherry picked from commit ee3ef8f68c0c757d7ce3c40c9ecb2fe4671a4b9b)
luetooth/hfpclient/connserv/HfpClientConnectionService.java
7ec95a31b30a586d1b58a892651dee2e80abddad 20-Jun-2016 Sanket Agarwal <sanketa@google.com> Normalize the number before inserting into list of calls in
connectionservice

Number often get rewritten with brackets (or prepended with +). We take
a simple approach of removing non numbers so that rewriting can be
avoided.

Bug: b/28719753
Change-Id: If1525ea8564997e7ebe6ef63fccbc3c113b88e1c
(cherry picked from commit 3338faa770a4c7e81910da3153cc0e9c22fc4765)
luetooth/hfpclient/connserv/ConnectionKey.java
ccc23af735d97a0aa5b4c20ef4bd91a9cb96d294 17-Jun-2016 Joseph Pirozzo <pirozzoj@google.com> Merge changes from topic 'merge_pbap_from_nyc_car_dev'

* changes:
Owner Card
PBAP Handle IllegalArgumentException
Remove contacts at shutdown.
PBAP check device on disconnect
Bluetooth Connect Other Profiles
PbapClientStateMachine legacyCode removal.
PBAP vcard parser
Connect PbapClient Profile
PBAP Download Contacts in state machine
PBAPClient State Machine
245b6b455e05f49786966c1a13a61baa33e62466 17-Jun-2016 Andre Eisenbach <eisenbach@google.com> Merge \\\\"Fix sender name string to match MAP spec\\\\" am: 6b9c9d4458 am: a2823f7e34 am: e5a4c3b426
am: b10e26581a

Change-Id: Id8ca96ff425c7bdf539cf89c9e2ce4d63f194ae3
0ac9cfe106b82a1c58d859c1fbb0181a654af9b4 04-Jun-2016 Joseph Pirozzo <pirozzoj@google.com> Owner Card

Start phonebook download at card 1 to skip owner card.

bug: 29127941
Change-Id: I1d85cb4a6a372a707081aee7dd4936c83babf888
luetooth/pbapclient/PbapClientConnectionHandler.java
0d4b767f9b815a5d6a12e30860a83f5fa3cf8bbe 09-May-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Handle IllegalArgumentException

When purging call log at startup handle the IllegealArugmentException
incase the call log content provider does not exist.

bug: 28671866
Change-Id: Ic02b4382be94f62908c90f175b9f165f3742240c
luetooth/pbapclient/PbapClientStateMachine.java
16159961f4060636b4f778b39ef2d006807fc803 05-May-2016 Joseph Pirozzo <pirozzoj@google.com> Remove contacts at shutdown.

If the bluetooth adapter gets turned off clean up PBAP contacts.

bug: 28630194
Change-Id: Ibaec25d6f1f5f5aca4dc00c0437af54d3d534be4
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientStateMachine.java
9541d943d7ca14b2e154199eaadce67a4bf12704 02-May-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP check device on disconnect

Upon receiving a disconnect message in Connecting or Connected verify
that the disconnect command is for the current device before
disconnecting.

bug: 28406739
Change-Id: I55498aa01a95c1ab9de1bda21c30db9c241dacc1
luetooth/pbapclient/PbapClientStateMachine.java
71669e2bfde4f3c76f3f93d9e118793b4eb79dfa 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
luetooth/btservice/AdapterService.java
992274c189ae23ce454fa2136c1b164105006004 28-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PbapClientStateMachine legacyCode removal.

Eliminate dependencies and remove unused code after the state machine
redesign.

bug: 28249138
Change-Id: I95b362136609a8de033a057578c1b08bd46cced3
luetooth/pbapclient/BluetoothPbapCard.java
luetooth/pbapclient/BluetoothPbapClient.java
luetooth/pbapclient/BluetoothPbapObexAuthenticator.java
luetooth/pbapclient/BluetoothPbapObexSession.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBookSize.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardEntry.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListing.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListingSize.java
luetooth/pbapclient/BluetoothPbapRequestSetPath.java
luetooth/pbapclient/BluetoothPbapSession.java
luetooth/pbapclient/BluetoothPbapVcardList.java
luetooth/pbapclient/BluetoothPbapVcardListing.java
luetooth/pbapclient/CallLogPullRequest.java
luetooth/pbapclient/ObexAppParameters.java
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapHandler.java
luetooth/pbapclient/PbapPCEClient.java
luetooth/pbapclient/PhonebookPullRequest.java
luetooth/pbapclient/utils/BmsgTokenizer.java
luetooth/pbapclient/utils/ObexAppParameters.java
luetooth/pbapclient/utils/ObexTime.java
e14009c22dfce52531f4e34fc1d58a9440539140 27-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP vcard parser

Use the built in Vcard parser library for parsing Vcards rather than a
locally defined one. The Vcard parser library includes support for
photos.

bug: 28177843
Change-Id: I3f335ff12ceec12e51a2b8628c320ede06342259
luetooth/pbapclient/PhonebookPullRequest.java
8b0649c5b76fb40fe0acb7772a71fa3ca727c34e 26-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Connect PbapClient Profile

Update code on CarKitt to appropriately connect the pbapClient
connection when another bluetooth connection is made or the adapter is
powered on. This logic is necessary since pbapClient doesn't accept
incomming connections and the bluetooth connect command may not have
originated from CarKitt.

bug: 28249138
Change-Id: Iaf15ece5115b2f3cf6ef45af1d6ab8da17e0c303
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
8bc55a6586b985f3f9d7a7c796a86fdc47c9b4b8 22-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP Download Contacts in state machine

Add refactored code to the new PBAP state machine to implement the safe
downloading of contacts. Key improvements are no internal state
handling, no complex message passing, and an improved ability to abort
and handle error conditions.
bug: 28249138

Change-Id: I30aa6ab6730d92e3ec797392ee9a1be7f55fa46a
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
427695a7992c8fc3fb503794bbaff1f705451133 20-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> PBAPClient State Machine

Refactor PBAP Client code to function as a state machine. By
consolidating threads and state tracking there is less duplication and
less opportunity for conflicting combinations of state.

bug: 28249138
Change-Id: I20de8041b83024a03bfbb60102c44b4e26579553
luetooth/pbapclient/PbapClientConnectionHandler.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapClientStateMachine.java
bb3dc297c976f4fab23f93f9cae00cd495739ea4 17-May-2016 Sanket Agarwal <sanketa@google.com> Tackle changing phone numbers by relying on IDs wherever possible.

AG can rewrite numbers (specially with international numbers) or simply
with brackets or other annotation. We currently do not handle such cases
well since phone number match is not accurate. Instead of relying on the
numbers them selves, we rely on the capability of AG to tell the ID of
the call in question.

Bug: b/28719753
Change-Id: I97842188f174072caf7f03e18b0597ac1912be17
(cherry picked from commit 893033ca82e75e668d74f496938adc94cd443dea)
luetooth/hfpclient/connserv/ConnectionKey.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
b10e26581a3309a3b1d41609cd428e372352696b 17-Jun-2016 Ajay Panicker <apanicke@google.com> Merge \\\"Fix sender name string to match MAP spec\\\" am: 6b9c9d4458 am: a2823f7e34
am: e5a4c3b426

Change-Id: I0d8f81867caf7a4c637cbb2a3d1f2fbe4e17980f
a2823f7e3484c3df3a248a39b72fbf20d917c1f7 16-Jun-2016 Ajay Panicker <apanicke@google.com> Merge \"Fix sender name string to match MAP spec\"
am: 6b9c9d4458

Change-Id: I7d528b876ebaf7ed0e048cdd72eb3521c1f1a309
69f86872f09052f9c2ff7f75e87e66134f65c91c 19-Feb-2016 Ajay Panicker <apanicke@google.com> Fix sender name string to match MAP spec

In section 3.1.6 of the Bluetooth MAP spec version
1.2.2, the field name should be "sender_name" instead
of "senderName".

Bug: 26904410
Change-Id: I0dacaf50b0830239d2c2e7e787dc7998f3ed6723
(cherry picked from commit 9a18a9fc4349f90e49d036ccafc91d8b5befe973)
luetooth/map/BluetoothMapContentObserver.java
9a18a9fc4349f90e49d036ccafc91d8b5befe973 19-Feb-2016 Ajay Panicker <apanicke@google.com> Fix sender name string to match MAP spec

In section 3.1.6 of the Bluetooth MAP spec version
1.2.2, the field name should be "sender_name" instead
of "senderName".

Bug: 26904410
Change-Id: I0dacaf50b0830239d2c2e7e787dc7998f3ed6723
luetooth/map/BluetoothMapContentObserver.java
5829fc6f88b71b60920b7c57ab978c1ef7dcbad3 16-Jun-2016 Jakub Pawlowski <jpawlowski@google.com> Merge \\\\"Fix null callback in updateCurrentMediaControllers\\\\" am: f533643e2b am: ed7ceb136f am: c36b0f6b73
am: 90099d897e

Change-Id: I9672c91aed407c29d570ff9bd5dd4c62252eb680
90099d897ef3480a65224328bd1d3452b519dba0 16-Jun-2016 Jakub Pawlowski <jpawlowski@google.com> Merge \\\"Fix null callback in updateCurrentMediaControllers\\\" am: f533643e2b am: ed7ceb136f
am: c36b0f6b73

Change-Id: I2e0f0909804f2d78de5fc8ad491d3222bfca90e8
ed7ceb136f160ddbcd7f4580e0fa3f990dd22480 16-Jun-2016 Jakub Pawlowski <jpawlowski@google.com> Merge \"Fix null callback in updateCurrentMediaControllers\"
am: f533643e2b

Change-Id: I29edb9f667095e0089f864aaabd5ef0b9090f26e
9d4035307b85e78f10fba961e225ca09bfb7d0c7 16-Jun-2016 Jakub Pawlowski <jpawlowski@google.com> Fix null callback in updateCurrentMediaControllers

Change-Id: I0f134ce147b8a7396c87900fb4770606d53dd765
luetooth/avrcp/Avrcp.java
4673897018c42f7ebba3ea612a04f1b70deb0e44 16-Jun-2016 Marie Janssen <jamuraa@google.com> Merge \\\\"AVRCP: Handle multiple MediaController instances\\\\" am: d6d2993587 am: 9350175ee7 am: d41eb69025
am: db6af62926

Change-Id: If6e42c8f652afb6c97d81451e925f2ee1b82eaa1
db6af62926e32fe45c1c5752fdea879979a79ac2 16-Jun-2016 Marie Janssen <jamuraa@google.com> Merge \\\"AVRCP: Handle multiple MediaController instances\\\" am: d6d2993587 am: 9350175ee7
am: d41eb69025

Change-Id: I017074a00186c2976fdf23905bf021e5034538b7
9350175ee7be5a27642ee08a2547a64fcfc45a25 16-Jun-2016 Marie Janssen <jamuraa@google.com> Merge \"AVRCP: Handle multiple MediaController instances\"
am: d6d2993587

Change-Id: I3c041a36caaf4ca5ef9d12ee0cc389acab1bfce5
2b903c7262c9b8c0493e36b93b37831e7e075bfc 14-Jun-2016 Marie Janssen <jamuraa@google.com> AVRCP: Handle multiple MediaController instances

Find a MediaController with metadata to show when there are more than
one.

Display more information about the MediaControllers so that we can tell
which packages are being used.

Bug: 29169493
Change-Id: Ifecad6eb44d3461c03685b6650d469721752dfdd
luetooth/avrcp/Avrcp.java
701e4a335d0521dccd4d21fe760fa8d061bee291 10-Jun-2016 ugo_yu <ugo_yu@htc.com> Mercedes Benz MAP message listing workaround am: 4786e5ffff
am: 7ce25a8991

Change-Id: I714ac47096e6a273f8575029e29f5b1b24055468
7ce25a8991140da037def93d72318cb80afef448 10-Jun-2016 ugo_yu <ugo_yu@htc.com> Mercedes Benz MAP message listing workaround
am: 4786e5ffff

Change-Id: If94acb83525f10cc1868c1f5620a68c40677c11e
4786e5fffff14d92b795084b4470b785de66dfd0 27-May-2016 ugo_yu <ugo_yu@htc.com> Mercedes Benz MAP message listing workaround

Use case:
Sync MAP message to Benz NTG 4.5

Precondition:
1. One of SMS message contains any special characters not ASCII

Steps:
1. Connect with Benz NTG 4.5.
2. Sync SMS message from carkit.

Failure:
Carkit always shows "No Message".

Root Cause:
When this carkit requests the message listing, and any message subject has
non-ASCII special characters in it, the carkit will stop all MAP activity
and stay idle.

Fix:
Strip special characters in the subject tline in message listing
for this carkit.

This change also introduces a Java bases interop database for future
use/expansion.

Bug: 29025011
Change-Id: I4255cbeb068c82f32a68b1022285dfa723e199ec
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapService.java
luetooth/util/Interop.java
fc2ae300d5bf5aadee1120ca1e58b67e7f06875c 25-May-2016 Marie Janssen <jamuraa@google.com> Prevent crash on invalid URIs, remove ACTION_OPEN

Previously if an invalid URI for a notification is received
with ACTION_OPEN, Bluetooth crashed. This fixes this.

It also removes ACTION_OPEN as it is internal-only and unused.

Bug: 28940687
Change-Id: I54e17b7180e770bb8a5cf48c3d4b2a35657cb67f
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/Constants.java
d8c5314d44eaabced47d7ed58c40a7d9313be7b8 08-Jun-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of 39957c0 to nyc-dev-plus-aosp am: 4a7ba7568d
am: ec83a6ce89

Change-Id: If5f58c53069532893c0b68965c484fa83e2a103b
ec83a6ce89ed195285292b4a37d2b18022df0f13 08-Jun-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of 39957c0 to nyc-dev-plus-aosp
am: 4a7ba7568d

Change-Id: Ibb37d4080261604a57af6a37e147b0ae2cf82473
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
luetooth/ObexRejectServer.java
luetooth/ObexServerSockets.java
luetooth/SignedLongLong.java
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/NowPlaying.java
luetooth/avrcp/RemoteMediaPlayers.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/Config.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/gatt/CallbackInfo.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/ServiceDeclaration.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hid/HidService.java
luetooth/map/BluetoothMapAccountLoader.java
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapConvoContactElement.java
luetooth/map/BluetoothMapFolderElement.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapSettings.java
luetooth/map/BluetoothMapSettingsAdapter.java
luetooth/map/BluetoothMapSmsPdu.java
luetooth/map/BluetoothMapbMessageEmail.java
luetooth/map/MmsFileProvider.java
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferHistory.java
luetooth/opp/BluetoothOppUtility.java
luetooth/pan/BluetoothTetheringNetworkFactory.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapUtils.java
luetooth/pbap/BluetoothPbapVcardManager.java
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
239cf0ec7dd507549817826cb717ee7272de994b 03-Jun-2016 Marie Janssen <jamuraa@google.com> Check exception to prevent crash on invalid URIs am: eacf805631
am: 397d80ad96

* commit '397d80ad96fa265c5c506948665846f9b9fa3d65':
Check exception to prevent crash on invalid URIs

Change-Id: I5b51c507f7c2835d8d00fa7ae7d828d372c42ac5
8c6f71ddc0b760a66f4aef6cc32d3a3538aaf496 03-Jun-2016 Marie Janssen <jamuraa@google.com> Check exception to prevent crash on invalid URIs
am: eacf805631

* commit 'eacf805631c3fb557ba7210dc6da3eb4dd1a04b2':
Check exception to prevent crash on invalid URIs

Change-Id: I0b656810f5165dde186fc80a47eb5c4339ef8a66
397d80ad96fa265c5c506948665846f9b9fa3d65 03-Jun-2016 Marie Janssen <jamuraa@google.com> Check exception to prevent crash on invalid URIs
am: eacf805631

* commit 'eacf805631c3fb557ba7210dc6da3eb4dd1a04b2':
Check exception to prevent crash on invalid URIs

Change-Id: I6c697a50c6078ba89f0f5bd0018ddcf99ef869d2
65f365979876e8355f5f50b9a0b7398f59f9b751 02-Jun-2016 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> HFP 1.7 profile update (4/4) am: 2ab50a41da
am: 0ca488af56

* commit '0ca488af56810000261737b86fafda89bf051a20':
HFP 1.7 profile update (4/4)

Change-Id: I379f1c4387207ec63556d81af4e32101f5dcc5ec
0ca488af56810000261737b86fafda89bf051a20 02-Jun-2016 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> HFP 1.7 profile update (4/4)
am: 2ab50a41da

* commit '2ab50a41dac634a78cef60a419c3bcc848c1aa78':
HFP 1.7 profile update (4/4)

Change-Id: I8e544dd7e3e68dd6c7c246db675474488aa77be2
2ab50a41dac634a78cef60a419c3bcc848c1aa78 29-Feb-2016 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> HFP 1.7 profile update (4/4)

-> Added HF Indicator support.
-> Sent a Broadcast intent upon receiving AT + BIND and
AT + BIEV Events with the required parameters
-> Support for sending +BIND response on indicator
status change

Bug: 19983867
Change-Id: I2580fc771080f1bc92fc4ddd5ca7c7cb57773183
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
eacf805631c3fb557ba7210dc6da3eb4dd1a04b2 25-May-2016 Marie Janssen <jamuraa@google.com> Check exception to prevent crash on invalid URIs

Previously if an invalid URI for a notification is received,
Bluetooth crashed.

Bug: 28940687
Change-Id: I54e17b7180e770bb8a5cf48c3d4b2a35657cb67f
luetooth/opp/BluetoothOppReceiver.java
2a14fd2bbefddd595a9e1cd716f62a333e0f7e06 25-May-2016 Marie Janssen <jamuraa@google.com> Check exception to prevent crash on invalid URIs

Previously if an invalid URI for a notification is received,
Bluetooth crashed.

Bug: 28940687
Change-Id: I54e17b7180e770bb8a5cf48c3d4b2a35657cb67f
luetooth/opp/BluetoothOppReceiver.java
f99cec85c8a6ff944ccdc56c41176b372a43ecf5 25-May-2016 rongbo.x.chi <rongbo.x.chi@sonymobile.com> Only allow access to MAP if SMS is not supported am: 4d2c98fcf1 am: cd42dafa7b
am: 94c3a2bffa

* commit '94c3a2bffa5f6c0979e95bca7eee95f0d92ae632':
Only allow access to MAP if SMS is not supported

Change-Id: I13d3080a986512776639a95045a383cfcbf95d56
94c3a2bffa5f6c0979e95bca7eee95f0d92ae632 25-May-2016 rongbo.x.chi <rongbo.x.chi@sonymobile.com> Only allow access to MAP if SMS is not supported am: 4d2c98fcf1
am: cd42dafa7b

* commit 'cd42dafa7b46ed7add0705862632fdf70e9e19a9':
Only allow access to MAP if SMS is not supported

Change-Id: I56704c020b97401e63876ca303c7879dcd9e5b58
b1a7dbf860fc3a66113fce83c64fe23aacdd311c 25-May-2016 rongbo.x.chi <rongbo.x.chi@sonymobile.com> Only allow access to MAP if SMS is not supported
am: 4d2c98fcf1

* commit '4d2c98fcf1abc4b07dc2d4601952f30f5d008470':
Only allow access to MAP if SMS is not supported

Change-Id: I33a25eb06427b65297cb72fac7c7325dec0e2067
cd42dafa7b46ed7add0705862632fdf70e9e19a9 25-May-2016 rongbo.x.chi <rongbo.x.chi@sonymobile.com> Only allow access to MAP if SMS is not supported
am: 4d2c98fcf1

* commit '4d2c98fcf1abc4b07dc2d4601952f30f5d008470':
Only allow access to MAP if SMS is not supported

Change-Id: If15223d47b3c56297aa7289d71dc23b18816275a
4d2c98fcf1abc4b07dc2d4601952f30f5d008470 07-Dec-2015 rongbo.x.chi <rongbo.x.chi@sonymobile.com> Only allow access to MAP if SMS is not supported

Bluetooth MAP shows SMS/MMS instance and when SMS is not supported.
Don't create SMS/MMS instance if device does not support SMS.

Fixes: 28803983
Change-Id: I807fe7e10bf51316729fe56ff6181a9161a410ef
luetooth/map/BluetoothMapService.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
30a5b9153f8154c72d877a56e57b257dbfa27c50 24-May-2016 Alain Vongsouvanh <alainv@google.com> Merge "GATT: Move connection parameters to config.xml" into nyc-mr1-dev
96d55ca658f111f1c475ccdb8dd83f47bd70d87c 23-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements

Bug: 28734075
Bug: 28799467
Change-Id: I6ba8867c179dc416bb0dd06c69ce426c10ea7585
(cherry picked from commit e741f05c93343241123095acab011dc8a0700bc6)
luetooth/btservice/AdapterProperties.java
c4ad06aa8b24fa9e512c52779265efe976b4ecde 24-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements am: e741f05c93 am: 1566daef82
am: d347cb3df5

* commit 'd347cb3df5429b36db1839939273bcf14eb3399e':
Removed unnecessary "synchronized" statements

Change-Id: If537bf08c6abb180db1c6ae67f29afa4f9a0a47a
d347cb3df5429b36db1839939273bcf14eb3399e 24-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements am: e741f05c93
am: 1566daef82

* commit '1566daef8262b3df354dc8d856d878ecf0182088':
Removed unnecessary "synchronized" statements

Change-Id: I739b069bde2d56cc9a9f988274affcb3d0d35ad8
1566daef8262b3df354dc8d856d878ecf0182088 24-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements
am: e741f05c93

* commit 'e741f05c93343241123095acab011dc8a0700bc6':
Removed unnecessary "synchronized" statements

Change-Id: Id0e12a4367d43f056a04ed8d877adbb2b1735424
628d48f52097c2c9656e66849e126d0c6ed0613f 24-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements
am: e741f05c93

* commit 'e741f05c93343241123095acab011dc8a0700bc6':
Removed unnecessary "synchronized" statements

Change-Id: Id0db840569d83817dbb4a65619f9e63618370354
e741f05c93343241123095acab011dc8a0700bc6 23-May-2016 Pavlin Radoslavov <pavlin@google.com> Removed unnecessary "synchronized" statements

Bug: 28734075
Bug: 28799467
Change-Id: I6ba8867c179dc416bb0dd06c69ce426c10ea7585
luetooth/btservice/AdapterProperties.java
0ec1e3f37edfebc3336c1554719ed1caa4e4f72b 13-May-2016 Alain Vongsouvanh <alainv@google.com> GATT: Move connection parameters to config.xml

This makes it easier for OEMs to customize the high prioriy, balanced
and low power mode connection parameters through overlays.

Bug: 18013697
Change-Id: I8b486b772fdb871f2800238cb5e45c4ff0663952
(cherry-picked from d65009d591017319a429be1a920fdf763e71cebd)
luetooth/gatt/GattService.java
f20b2c49dca6706b6819849c330b8269be2cb737 23-May-2016 venkata Jagadeesh <vjagad@codeaurora.org> Broadcast UUIDS on BT state transition to ON
am: 6fb4b2407f

* commit '6fb4b2407f2ae6d87b1f026870f66d717a915973':
Broadcast UUIDS on BT state transition to ON

Change-Id: Ie3f311eb23193c3da4a5d54e0a956caeaf9a0084
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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/RemoteDevices.java
d492e91facbc0ed85fe873dc031479ede13076ca 21-May-2016 Ajay Panicker <apanicke@google.com> Change scan downgrade timeout from 5 min to 30 min
am: 63d9d9ffbe

* commit '63d9d9ffbec2facf7b90aa552e37168e66c497eb':
Change scan downgrade timeout from 5 min to 30 min

Change-Id: I1d6e11fd61b70f5c2cb69a90671319f1b885e1e0
6b73fa8542f33f16778a0a5fe8470269257c64b4 21-May-2016 Ajay Panicker <apanicke@google.com> Merge "Change scan downgrade timeout from 5 min to 30 min" am: 31c02c5a77 am: b292cb0ad3 am: 35c85dcf75
am: d44d87c9df

* commit 'd44d87c9dffd542efde2a9347bd9a24deabbba9b':
Change scan downgrade timeout from 5 min to 30 min

Change-Id: I2d12b7e6a5487f30e9b0e4d92c17c5a2abae6333
d44d87c9dffd542efde2a9347bd9a24deabbba9b 21-May-2016 Ajay Panicker <apanicke@google.com> Merge "Change scan downgrade timeout from 5 min to 30 min" am: 31c02c5a77 am: b292cb0ad3
am: 35c85dcf75

* commit '35c85dcf7570b7893f548798459d7e2b14719dea':
Change scan downgrade timeout from 5 min to 30 min

Change-Id: I3c356188b29e64c26258b383263b05f715d9a997
35c85dcf7570b7893f548798459d7e2b14719dea 21-May-2016 Ajay Panicker <apanicke@google.com> Merge "Change scan downgrade timeout from 5 min to 30 min" am: 31c02c5a77
am: b292cb0ad3

* commit 'b292cb0ad3070f7ba869d9acc5fe2623d43d9e60':
Change scan downgrade timeout from 5 min to 30 min

Change-Id: I6882ad07b4a67f245d1e8aa76ab9e731a8d70a95
31c02c5a770c0c12becb0856b2c7132470a49939 21-May-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Change scan downgrade timeout from 5 min to 30 min"
63d9d9ffbec2facf7b90aa552e37168e66c497eb 21-May-2016 Ajay Panicker <apanicke@google.com> Change scan downgrade timeout from 5 min to 30 min

Bug: 28824606
Change-Id: Ic4d1f7832aaa33ce0177905f6a64fea8eb048eae
luetooth/gatt/ScanManager.java
623b906dcd0e4c0b85db20c67df76b3bb2884e74 21-May-2016 Ajay Panicker <apanicke@google.com> Change scan downgrade timeout from 5 min to 30 min

Bug: 28824606
Change-Id: Ic4d1f7832aaa33ce0177905f6a64fea8eb048eae
luetooth/gatt/ScanManager.java
8dda49cf64cc641089e6315ce01d57fc4fa54eb5 20-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix 2 instances of a field being assigned itself in a constructor." into nyc-mr1-dev
4ceb4e23e69a7d6996490dd914302523495e8f12 20-May-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix 2 instances of a field being assigned itself in a constructor." am: f28ab8051e am: b3ad81b75a am: 7f0b5f759e
am: 807147be5f

* commit '807147be5fe41992366d20f78f8541dc4915c61f':
Fix 2 instances of a field being assigned itself in a constructor.

Change-Id: I6814ad6e1db3e6887edeb4d65061970fb3072987
897433b1bff871dd394a47d9b2d1e75a6ebfa15b 20-May-2016 Ian Rogers <irogers@google.com> Merge "Fix a test related to GATT client that could never succeed" am: 128622ac45 am: e28292e65a am: f7ee3ec9b0
am: f0af239c6e

* commit 'f0af239c6ef6f6d414df72349c426d6c4448d238':
Fix a test related to GATT client that could never succeed

Change-Id: Ieb9d71fd909371915504e6c5e4ceef86db839840
50a3e9c70694358d12afa90cf67b4c371351a8e3 19-May-2016 Ian Rogers <irogers@google.com> Fix a test related to GATT client that could never succeed

Caught by Error Prone:
warning: [CollectionIncompatibleType] Argument 'clientIf' should not be
passed to this method; its type int is not compatible with its
collection's type argument AdvertiseClient.

Bug: 27723540
Change-Id: I395b17a46c3734afd0f49866b7aa0bd0f1c6cef4
(cherry picked from commit c6064ccebc5f55b49628296ce578288b3ad704e1)
luetooth/gatt/AdvertiseManager.java
00a378afa5d8de9eadae15ab578baa2058b614ce 16-Mar-2016 Ian Rogers <irogers@google.com> Fix 2 instances of a field being assigned itself in a constructor.

The code had no effect so its safe to remove.
The issue was identified using error prone.

Bug: 27723540

Change-Id: I3803573c545c00e8066ba185c271b38a75bf28c6
(cherry picked from commit 3fc930b1883466cc0e3b35a57519e435426554ee)
luetooth/gatt/HandleMap.java
807147be5fe41992366d20f78f8541dc4915c61f 19-May-2016 Ian Rogers <irogers@google.com> Merge "Fix 2 instances of a field being assigned itself in a constructor." am: f28ab8051e am: b3ad81b75a
am: 7f0b5f759e

* commit '7f0b5f759e12c945cc1fbb4f217254c46242ebbe':
Fix 2 instances of a field being assigned itself in a constructor.

Change-Id: I141ae59400cb044d4a9f21ed28148b3499b49da8
f0af239c6ef6f6d414df72349c426d6c4448d238 19-May-2016 Ian Rogers <irogers@google.com> Merge "Fix a test related to GATT client that could never succeed" am: 128622ac45 am: e28292e65a
am: f7ee3ec9b0

* commit 'f7ee3ec9b08dd71ac804e3c40792d179b86f957e':
Fix a test related to GATT client that could never succeed

Change-Id: Ie15f2adebe482f58aa3838181cc2fc86e4d5be12
7f0b5f759e12c945cc1fbb4f217254c46242ebbe 19-May-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix 2 instances of a field being assigned itself in a constructor." am: f28ab8051e
am: b3ad81b75a

* commit 'b3ad81b75a5c6b3fad86413982f2d0a24fd63d01':
Fix 2 instances of a field being assigned itself in a constructor.

Change-Id: Id39ce8ca220feb0acda18ef455a00ac05a92a9e5
f7ee3ec9b08dd71ac804e3c40792d179b86f957e 19-May-2016 Ian Rogers <irogers@google.com> Merge "Fix a test related to GATT client that could never succeed" am: 128622ac45
am: e28292e65a

* commit 'e28292e65a93c866efc767a88137bfe601b9b3e9':
Fix a test related to GATT client that could never succeed

Change-Id: I443a006993bf575ac1e569fe445b0c4662da6c5a
3fc930b1883466cc0e3b35a57519e435426554ee 16-Mar-2016 Ian Rogers <irogers@google.com> Fix 2 instances of a field being assigned itself in a constructor.

The code had no effect so its safe to remove.
The issue was identified using error prone.

Bug: 27723540

Change-Id: I3803573c545c00e8066ba185c271b38a75bf28c6
luetooth/gatt/HandleMap.java
c6064ccebc5f55b49628296ce578288b3ad704e1 19-May-2016 Ian Rogers <irogers@google.com> Fix a test related to GATT client that could never succeed

Caught by Error Prone:
warning: [CollectionIncompatibleType] Argument 'clientIf' should not be
passed to this method; its type int is not compatible with its
collection's type argument AdvertiseClient.

Bug: 27723540
Change-Id: I395b17a46c3734afd0f49866b7aa0bd0f1c6cef4
luetooth/gatt/AdvertiseManager.java
1107f28db1c8aaccce3662ab68728754fb0c278f 18-May-2016 Zach Johnson <zachoverflow@google.com> Merge "GATT: Move connection parameters to config.xml" am: 7eb11d6593 am: a85495cfc5 am: 8a128d3f9d
am: bf63b25d06

* commit 'bf63b25d064327cb317e2c1e156754259245f660':
GATT: Move connection parameters to config.xml

Change-Id: Idcbe4326252b8dd18299bcd2f065507a7ffbd0f3
bf63b25d064327cb317e2c1e156754259245f660 18-May-2016 Alain Vongsouvanh <alainv@google.com> Merge "GATT: Move connection parameters to config.xml" am: 7eb11d6593 am: a85495cfc5
am: 8a128d3f9d

* commit '8a128d3f9df2491656a1cb797e6119d871055aff':
GATT: Move connection parameters to config.xml

Change-Id: I42a0bdcfdc3a6092863bb6a2776dc9b9e1f1a709
8a128d3f9df2491656a1cb797e6119d871055aff 18-May-2016 Zach Johnson <zachoverflow@google.com> Merge "GATT: Move connection parameters to config.xml" am: 7eb11d6593
am: a85495cfc5

* commit 'a85495cfc5516ba5c931ebc947994cbd617bdb93':
GATT: Move connection parameters to config.xml

Change-Id: I65e24c1044eb9f6fad8ad71a3dd70d26d88a7292
26f325ad37145b0de56518f63c97319e322c976b 13-May-2016 Alain Vongsouvanh <alainv@google.com> DO NOT MERGE ANYWHERE GATT: Move connection parameters to config.xml

This makes it easier for OEMs to customize the high prioriy, balanced
and low power mode connection parameters through overlays.

Bug: 18013697
Change-Id: I8b486b772fdb871f2800238cb5e45c4ff0663952
(cherry-picked from d65009d591017319a429be1a920fdf763e71cebd)
luetooth/gatt/GattService.java
d65009d591017319a429be1a920fdf763e71cebd 13-May-2016 Alain Vongsouvanh <alainv@google.com> GATT: Move connection parameters to config.xml

This makes it easier for OEMs to customize the high prioriy, balanced
and low power mode connection parameters through overlays.

Bug: 18013697
Change-Id: I8b486b772fdb871f2800238cb5e45c4ff0663952
luetooth/gatt/GattService.java
e3bfb1dae780e5f081fb68b1a828a7c49c9913e5 17-May-2016 Matadeen Mishra <matade@codeaurora.org> Merge "GATT: Fix FD leak caused by GATT profile" am: 0a689a6645 am: 4ae09f60b6 am: 338f5dc21a
am: 419e85e9ea

* commit '419e85e9eac7e7b62fc54c5f4e9f04132844c7af':
GATT: Fix FD leak caused by GATT profile

Change-Id: Iaed9e403335c108ea02c81ce1541937622ed1728
419e85e9eac7e7b62fc54c5f4e9f04132844c7af 17-May-2016 Matadeen Mishra <matade@codeaurora.org> Merge "GATT: Fix FD leak caused by GATT profile" am: 0a689a6645 am: 4ae09f60b6
am: 338f5dc21a

* commit '338f5dc21ae96b88fd8ac9051e296520bfd48f72':
GATT: Fix FD leak caused by GATT profile

Change-Id: I188be0e15863a327f21153de5708dc2f2bd7327b
338f5dc21ae96b88fd8ac9051e296520bfd48f72 17-May-2016 Matadeen Mishra <matade@codeaurora.org> Merge "GATT: Fix FD leak caused by GATT profile" am: 0a689a6645
am: 4ae09f60b6

* commit '4ae09f60b64da7052a08e52834790fc56ffa7bf6':
GATT: Fix FD leak caused by GATT profile

Change-Id: I71bb1fb45e1411f99c679fa78a86fe6adda563d1
03bd68dfb8b44c4b4f98577d9e71d7b6e354eeb5 17-May-2016 venkata Jagadeesh <vjagad@codeaurora.org> Merge "Broadcast UUIDS on BT state transition to ON" am: 8980266333 am: 30cc572e2b am: cead922da6
am: fc0b0993c3

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

Change-Id: Id341a5e46fc4dfd53c78144a0619529e221c61d0
0a689a66458459eb7353e899d20e591a28cc895f 17-May-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "GATT: Fix FD leak caused by GATT profile"
fc0b0993c30286d6c2df788d82534b5a8c3d89f2 17-May-2016 venkata Jagadeesh <vjagad@codeaurora.org> Merge "Broadcast UUIDS on BT state transition to ON" am: 8980266333 am: 30cc572e2b
am: cead922da6

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

Change-Id: Ia46b2072c0a835a5f14cf6062f6a080da968d412
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
ba73d4b554ff0016d6b11a6102c2a75b5b0c149d 12-Nov-2014 Matadeen Mishra <matade@codeaurora.org> GATT: Fix FD leak caused by GATT profile

Use case: BT ON/OFF with one BLE APP active

Failure: FD leak is observed with ON/OFF stress test
which eventually lead to crash due to unavailability
of FDs.

Steps:
BT ON/OFF with one BLE APP active to retain the
same Bluetooth process ID to check the FD leak issue.

Root Cause: As the Advertisementi manager and Scan
Manager are not cleaning up the looper instances as
part of cleanup, it causes FD leak.

Fix: Cleanup the handler threads in Advertisementmanager
and ScanManager so that there are no resource leaks.

Change-Id: Ia51899f449d57c1ef68a9516b8472d1fd492572b
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/ScanManager.java
15f5322b5e2b0bb0b43d7363d2b518622fb5447f 17-May-2016 Andre Eisenbach <eisenbach@google.com> Merge "Stop profile services when Bluetooth enable times out" am: c21f27c021 am: 3665bc03f9 am: 6d9014b2ef
am: 08d37b8d41

* commit '08d37b8d4117d7a46e0e0f6e33b3370824323bdb':
Stop profile services when Bluetooth enable times out

Change-Id: I8db419859d039f82c74903fcb888522b60473843
08d37b8d4117d7a46e0e0f6e33b3370824323bdb 17-May-2016 Srinu Jella <sjella@codeaurora.org> Merge "Stop profile services when Bluetooth enable times out" am: c21f27c021 am: 3665bc03f9
am: 6d9014b2ef

* commit '6d9014b2ef8e5e0a3b5c020d556d07c896214251':
Stop profile services when Bluetooth enable times out

Change-Id: I478915eccbeb3314a92500de6f3ba848288cc0ce
6d9014b2ef8e5e0a3b5c020d556d07c896214251 17-May-2016 Andre Eisenbach <eisenbach@google.com> Merge "Stop profile services when Bluetooth enable times out" am: c21f27c021
am: 3665bc03f9

* commit '3665bc03f9eb42d390d9e97325655898cc605ffd':
Stop profile services when Bluetooth enable times out

Change-Id: I14cc19c3fc1b0a09f446f05669b84e6b3b34722e
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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/RemoteDevices.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
luetooth/btservice/AdapterState.java
8423914b1873debe3b71e15f137315cdd1b4f6d6 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev am: fc57cab5ba am: 7b7b99f938
am: b1c44cf897

* commit 'b1c44cf8975d5b7bde5e9e08bf142d1d522ca2f8':
BluetoothManager: Make requestControllerActivityInfo one call

Change-Id: I16066f4eed70c03d07972cdc518b56a83d080652
b1c44cf8975d5b7bde5e9e08bf142d1d522ca2f8 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev am: fc57cab5ba
am: 7b7b99f938

* commit '7b7b99f938ebd8f0f6bd1309569faaec5690b7b0':
BluetoothManager: Make requestControllerActivityInfo one call

Change-Id: Ie28604777dbb5043ef904641f34c400f84431b5a
7b7b99f938ebd8f0f6bd1309569faaec5690b7b0 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev
am: fc57cab5ba

* commit 'fc57cab5ba191752d0091c808f940fb677bac0ab':
BluetoothManager: Make requestControllerActivityInfo one call

Change-Id: I99a1a7b15e9f8c733abed28daf75692cd56afac9
fc57cab5ba191752d0091c808f940fb677bac0ab 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev
526cdd58546ff747c08cd712a5d4f1953762f6b6 12-May-2016 Harshavardhan Nalajala <hnalajala@nvidia.com> Merge "Correct message length calculation while sending SMS" am: 65f3adbe57 am: 42d14017b0 am: 75a92770b5
am: d13b561ccd

* commit 'd13b561ccdce16acf253196e6645a0057074f8c0':
Correct message length calculation while sending SMS

Change-Id: Idf57aa40ba63598004cc58a348810e835e453947
d13b561ccdce16acf253196e6645a0057074f8c0 12-May-2016 Harshavardhan Nalajala <hnalajala@nvidia.com> Merge "Correct message length calculation while sending SMS" am: 65f3adbe57 am: 42d14017b0
am: 75a92770b5

* commit '75a92770b569c6ad5dc1106669b746572c8e1f60':
Correct message length calculation while sending SMS

Change-Id: I0af74bddc48568995bcbded2b3a2156c368e5781
75a92770b569c6ad5dc1106669b746572c8e1f60 12-May-2016 Harshavardhan Nalajala <hnalajala@nvidia.com> Merge "Correct message length calculation while sending SMS" am: 65f3adbe57
am: 42d14017b0

* commit '42d14017b05650397b6c5133d09b040aa2012e4c':
Correct message length calculation while sending SMS

Change-Id: Ie7299ec9ae3b03fb72b1a35cbc5cfd96d47be6dc
59e88195582b51a719790d7fc8a570d4702e3f62 31-Aug-2015 Harshavardhan Nalajala <hnalajala@nvidia.com> Correct message length calculation while sending SMS

Messages are supposed to be sent with correct
length which is obtained from the "LENGTH:" field
in the line received. Current implementation
is sending a message with invalid length causing
NegativeNumberException when the message is read.

Change-Id: Ieb4239562f8d049ee001ebc547105df44ee70f08
luetooth/map/BluetoothMapbMessage.java
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
luetooth/btservice/AdapterService.java
90630ffc0aea89936fa3a5f79431dee2f62e8c2c 10-May-2016 Ajay Panicker <apanicke@google.com> Merge "Allow scan statistics to be displayed even if app hasn\'t scanned." am: a3a090a40f am: ca85ab538c am: e910ed57b3
am: 73af8f2418

* commit '73af8f2418af29e4a54630f7f9732afc3c65269f':
Allow scan statistics to be displayed even if app hasn't scanned.

Change-Id: I261137efb28755a73b4313410f09a3d24e9f207c
013cca6d0ce90b938880d1abc3a1028d9f08e439 10-May-2016 Chenjie Luo <cjluo@google.com> resolve merge conflicts of 45a85cf to nyc-dev-plus-aosp am: 562547733c
am: d8bbda09aa

* commit 'd8bbda09aa50622d2eae56177fbf58eafd1129ec':
Add missing null pointer check inside HeadSetClientService.stop()

Change-Id: Iaf6478428a8d071a458231b65e07af56b61f49a2
73af8f2418af29e4a54630f7f9732afc3c65269f 10-May-2016 Ajay Panicker <apanicke@google.com> Merge "Allow scan statistics to be displayed even if app hasn\'t scanned." am: a3a090a40f am: ca85ab538c
am: e910ed57b3

* commit 'e910ed57b3e3e6dfb4342ca535cff2c5fb28d41b':
Allow scan statistics to be displayed even if app hasn't scanned.

Change-Id: Ib74fa074f68397ee118deedb31f1846a39deb230
d8bbda09aa50622d2eae56177fbf58eafd1129ec 10-May-2016 Lianchao Song <songlianchao@huawei.com> resolve merge conflicts of 45a85cf to nyc-dev-plus-aosp
am: 562547733c

* commit '562547733c2dd517f3bdd30f29bfe43732fe9a13':
Add missing null pointer check inside HeadSetClientService.stop()

Change-Id: If2957138fda91ce9f8a81074ead715751b315bab
e910ed57b3e3e6dfb4342ca535cff2c5fb28d41b 10-May-2016 Ajay Panicker <apanicke@google.com> Merge "Allow scan statistics to be displayed even if app hasn\'t scanned." am: a3a090a40f
am: ca85ab538c

* commit 'ca85ab538ceb7184420cdd7d3c2a2a278664e95e':
Allow scan statistics to be displayed even if app hasn't scanned.

Change-Id: Ibcfcbaf9cb3af2f73f15b4a3ea105156d0f867dc
562547733c2dd517f3bdd30f29bfe43732fe9a13 10-May-2016 Chenjie Luo <cjluo@google.com> resolve merge conflicts of 45a85cf to nyc-dev-plus-aosp

Change-Id: I0b676ca373047044981d241ea305703354fd01b7
a3a090a40fa97301da43e9d6f5d7bf57f714e802 09-May-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Allow scan statistics to be displayed even if app hasn't scanned."
3fe282a78e8643329c5d6bc84ad5788cd4366b70 09-May-2016 Lianchao Song <songlianchao@huawei.com> DO NOT MERGE ANYWHERE Add missing null pointer check inside HeadSetClientService.stop()

Bug: 28664857

Change-Id: I62abc4eb4127db2d4f0cde44eca618996f099b49
Signed-off-by: Lianchao Song <songlianchao@huawei.com>
luetooth/hfpclient/HeadsetClientService.java
bebc4dd9edb40710d9588b4a2010eef227756a8e 09-May-2016 Lianchao Song <songlianchao@huawei.com> Add missing null pointer check inside HeadSetClientService.stop()

Bug: 28664857

Change-Id: I62abc4eb4127db2d4f0cde44eca618996f099b49
Signed-off-by: Lianchao Song <songlianchao@huawei.com>
luetooth/hfpclient/HeadsetClientService.java
aef39f16e48cbae0ace8136c3235136c0a096061 13-Apr-2016 Ajay Panicker <apanicke@google.com> Add protection against LE scanning abuse

Added two checks to prevent abuse. The first check ensures that an
app doesn't scan too frequently in a certain time period. It is
allowed to scan again after its oldest scan exceedes said time
period. The second check ensures that an app doesn't scan for too
long. Upon starting a scan, this code waits a certain amount of time.
If the app is still scanning by that point, this code stops
the scan and forces the app to use opportunistic scanning instead.

Bug: 27357274
Change-Id: Ic99ac1f838e15ed99fe2fae643ef073d74b5c96b
luetooth/gatt/AppScanStats.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
ba3325bff1f8697c2ac3f8f4190b26fcd8fcc077 09-May-2016 Sanket Agarwal <sanketa@google.com> HfpClientConnectionService does not synchronize state am: a8fc504fed am: ed00b6e3b6
am: d3731ce013

* commit 'd3731ce0135ed9200b12ebbc0e9ff5eefe443a26':
HfpClientConnectionService does not synchronize state

Change-Id: Ia45a74a453df72a9d5160f4ac150f4ce206b05f5
d3731ce0135ed9200b12ebbc0e9ff5eefe443a26 09-May-2016 Sanket Agarwal <sanketa@google.com> HfpClientConnectionService does not synchronize state am: a8fc504fed
am: ed00b6e3b6

* commit 'ed00b6e3b6c67399a7c7601ed97ad6db17448f77':
HfpClientConnectionService does not synchronize state

Change-Id: Id9f71b02e69dc88ab7de40dcb998167fde7b2344
8c7399d2ed67477408685e35e2d4d2957e7a6614 09-May-2016 Sanket Agarwal <sanketa@google.com> HfpClientConnectionService does not synchronize state
am: a8fc504fed

* commit 'a8fc504fed7dcb5dc074980b9d4cfa7a56445424':
HfpClientConnectionService does not synchronize state

Change-Id: I433578eed7e085681b7d124232ee27bd838f427a
c82ac85eacc5607433592f476dbbe73d7670efe1 06-May-2016 Ajay Panicker <apanicke@google.com> Allow scan statistics to be displayed even if app hasn't scanned.

Bug: 28622714
Change-Id: I220d3110346e7d6f67ecfd7468779072d71b5788
luetooth/gatt/AppScanStats.java
a8fc504fed7dcb5dc074980b9d4cfa7a56445424 27-Apr-2016 Sanket Agarwal <sanketa@google.com> HfpClientConnectionService does not synchronize state

Currently active device is a synchronizable state and the current
implementation was simply waiving it. Also the mechanism to create a
phone account was invalid since the PhoneAccountHandle was not unique
per device. PhoneAccountHandle not being unique is OK for now but fails
in case of multiple devices.

Bug: b/28068989
Change-Id: I729df5aa110a428b8ce23cf6658d81c5acbc16a2
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
68c5f8c3e812f9f2053ac597b66b9eca94d508b0 07-May-2016 Ajay Panicker <apanicke@google.com> Merge commit \'98691c26ecdaf8689739966b1aeeaa54f3fd1eb2\' into manual_merge_98691c2 am: e308ed5889
am: 6cf5d90058

* commit '6cf5d900582c7ac2379694a80064ecf162097914':
Add protection against LE scanning abuse

Change-Id: I2af6f78d09648a45f6b9ce8020bf14a7fbf35a5e
6cf5d900582c7ac2379694a80064ecf162097914 07-May-2016 Ajay Panicker <apanicke@google.com> Merge commit \'98691c26ecdaf8689739966b1aeeaa54f3fd1eb2\' into manual_merge_98691c2
am: e308ed5889

* commit 'e308ed5889ddbc6b3fad2f4fd6f2a56ca83c9a2a':
Add protection against LE scanning abuse

Change-Id: Iaf6b9f8668f30318b2256fb1eb239e5bcf92df34
e308ed5889ddbc6b3fad2f4fd6f2a56ca83c9a2a 07-May-2016 Ajay Panicker <apanicke@google.com> Merge commit '98691c26ecdaf8689739966b1aeeaa54f3fd1eb2' into manual_merge_98691c2

Change-Id: I57aeffc87caa6da75773d811eb929d9c2aeca13d
1fdc7c138db776b02bc751fd7a80c519ea3324d1 13-Apr-2016 Ajay Panicker <apanicke@google.com> Add protection against LE scanning abuse

Added two checks to prevent abuse. The first check ensures that an
app doesn't scan too frequently in a certain time period. It is
allowed to scan again after its oldest scan exceedes said time
period. The second check ensures that an app doesn't scan for too
long. Upon starting a scan, this code waits a certain amount of time.
If the app is still scanning by that point, this code stops
the scan and forces the app to use opportunistic scanning instead.

Bug: 27357274
Change-Id: Ic99ac1f838e15ed99fe2fae643ef073d74b5c96b
luetooth/gatt/AppScanStats.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
4c27db43b9fea3e38f73ee5a7ea75c4602b5203c 05-May-2016 Hua Song <shcalm@gmail.com> Merge "OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent" am: 5df2915a97 am: 01bdd183c2 am: ae215fe26a
am: c4434395b1

* commit 'c4434395b1d9497b64a53cc81cd05be6bef537ab':
OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent

Change-Id: I34e0b16b0df27b994239c78046b326480c132a53
c4434395b1d9497b64a53cc81cd05be6bef537ab 05-May-2016 Hua Song <shcalm@gmail.com> Merge "OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent" am: 5df2915a97 am: 01bdd183c2
am: ae215fe26a

* commit 'ae215fe26af65257d3fd0adb345402c4b91d1b34':
OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent

Change-Id: I6c11788982e850a0cd3f55bd430775f2fe047a31
ae215fe26af65257d3fd0adb345402c4b91d1b34 05-May-2016 Hua Song <shcalm@gmail.com> Merge "OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent" am: 5df2915a97
am: 01bdd183c2

* commit '01bdd183c2b0bda4814399e94fc967cb1cfe8794':
OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent

Change-Id: Ib4a753745884510afa83705c9adc281dd6846b51
0fcd081cccbf624a3a886fe4eb68adc3498e695c 25-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Provide more media attributes

Add track number, total tracks, genre, and consolidate MediaAttribute
handling into a single place.

Bug: 28589463

Change-Id: I53049bc2a43c0f30af9639fbc3d6a02cd8a74900
luetooth/avrcp/Avrcp.java
27b250928cb3401d9a0a3a3f4b2026f1a431b6df 04-May-2016 Ian Rogers <irogers@google.com> Fix divergent equals and hashCode behavior

Calling Objects.hash with a byte[] will call the identity hashCode on the
byte[] (data, data_mask) and this doesn't agree with the use of
Objects.deepEquals in equals.
Bug caught by error prone.

Bug: 27723540
Change-Id: Ic33f9a341165db6c9339321f81f7af63d627a2cb
luetooth/gatt/ScanFilterQueue.java
25f4b74d90ee2100fd09e08c1095b5d0abffedd7 05-May-2016 Hua Song <shcalm@gmail.com> OPP: Use addFlags() instead of setFlags() when adding flags to the ACTION_VIEW intent

Signed-off-by: Hua Song <shcalm@gmail.com>
Change-Id: Ie370b1fc599dbb1d8effca409de28e11f0e2b370
luetooth/opp/BluetoothOppUtility.java
ce22fd622c57809b28db365739fbc688957a8ccf 05-May-2016 Ian Rogers <irogers@google.com> Merge "Fix divergent equals and hashCode behavior" am: c19deeb758 am: 953bc530a3 am: 25c9b7e2a4
am: a05d4b378b

* commit 'a05d4b378b4b384559713c4ef9565cab2901cbe1':
Fix divergent equals and hashCode behavior

Change-Id: Id562e7233725873c37e92d7807e05901ebc948e8
a05d4b378b4b384559713c4ef9565cab2901cbe1 05-May-2016 Ian Rogers <irogers@google.com> Merge "Fix divergent equals and hashCode behavior" am: c19deeb758 am: 953bc530a3
am: 25c9b7e2a4

* commit '25c9b7e2a486df02b462d2b89b674c5098c89e60':
Fix divergent equals and hashCode behavior

Change-Id: I91ab73c2bdad8e65b442782692ebcdc6919324e0
25c9b7e2a486df02b462d2b89b674c5098c89e60 05-May-2016 Ian Rogers <irogers@google.com> Merge "Fix divergent equals and hashCode behavior" am: c19deeb758
am: 953bc530a3

* commit '953bc530a3d16c5e73e95b0abacc56deb241996b':
Fix divergent equals and hashCode behavior

Change-Id: I8e40f7cd8db56d007e1a7f61f1a0f52e56116922
4f6ca743c663912bfd6f2feff20373bd8bb75473 04-May-2016 Ian Rogers <irogers@google.com> Fix divergent equals and hashCode behavior

Calling Objects.hash with a byte[] will call the identity hashCode on the
byte[] (data, data_mask) and this doesn't agree with the use of
Objects.deepEquals in equals.
Bug caught by error prone.

Bug: 27723540
Change-Id: Ic33f9a341165db6c9339321f81f7af63d627a2cb
luetooth/gatt/ScanFilterQueue.java
26f1aa589186feb28ae9b846aab15c27a9153c60 05-May-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Provide more media attributes" am: 124563d21a am: f9e644effb am: 1e56607e23
am: 5d5a280697

* commit '5d5a2806979a7216b25f40af820681f8f6fd5b34':
AVRCP: Provide more media attributes

Change-Id: I50f080b5d328d52701676b709163b52f50e7ca7f
5d5a2806979a7216b25f40af820681f8f6fd5b34 05-May-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Provide more media attributes" am: 124563d21a am: f9e644effb
am: 1e56607e23

* commit '1e56607e2310341b96512bacb4e7258d44cbc9fa':
AVRCP: Provide more media attributes

Change-Id: I116e69d06905bac1fb3aaf00bd8ef2780bf3bc9d
1e56607e2310341b96512bacb4e7258d44cbc9fa 05-May-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Provide more media attributes" am: 124563d21a
am: f9e644effb

* commit 'f9e644effb04eda411d453e5691fe699c8a215ca':
AVRCP: Provide more media attributes

Change-Id: I1b69d71566eb6667639d0a10adda6a45a75ab6a2
dd427ab717d90b324475a89f3fdcf9d415c699fd 05-May-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond am: 11976279d5 am: 29e88d6e4d
am: 740b674bbc

* commit '740b674bbc11e02df9eb228fa3b87e50f965ef58':
Fix work profile app not being able to create bond

Change-Id: I1fb97eff026c7009511fc8f6c7b3a623f4e14174
3b9b0ca02d74a95c3f1f5b0d7bc58a8a1f9c44df 25-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Provide more media attributes

Add track number, total tracks, genre, and consolidate MediaAttribute
handling into a single place.

Bug: 28589463

Change-Id: I53049bc2a43c0f30af9639fbc3d6a02cd8a74900
luetooth/avrcp/Avrcp.java
740b674bbc11e02df9eb228fa3b87e50f965ef58 05-May-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond am: 11976279d5
am: 29e88d6e4d

* commit '29e88d6e4d3bd5cc8799f0e769efa826fbda93af':
Fix work profile app not being able to create bond

Change-Id: Icd7d9b8c60e749a788109a7fbd5e665583fc3473
29e88d6e4d3bd5cc8799f0e769efa826fbda93af 05-May-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond
am: 11976279d5

* commit '11976279d5403fb65d9f0ea72b0e450dfd841958':
Fix work profile app not being able to create bond

Change-Id: I1a94f94aa7f12c1c46cb52f69e37418c792f6b99
11976279d5403fb65d9f0ea72b0e450dfd841958 15-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond

Bug: 28153078
Change-Id: I49c020d7d016c667a6cb3366ef862a1eb9dfb4d5
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
18332ea94601a34a7866f7b7b27d02af6fa4a330 03-May-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth encryption aware am: cf48e13e3b am: e01b52091b
am: a636a03d7b

* commit 'a636a03d7b5b51ec4f15607c23760b0bbd7ef1a9':
Make Bluetooth encryption aware

Change-Id: Ia6371766b2c55757671ad315765ab3405687843f
a636a03d7b5b51ec4f15607c23760b0bbd7ef1a9 03-May-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth encryption aware am: cf48e13e3b
am: e01b52091b

* commit 'e01b52091b6197202ebba345cf7d230fd298c382':
Make Bluetooth encryption aware

Change-Id: I43f86ff920789938ac143b21a5579b4097c18bcf
e01b52091b6197202ebba345cf7d230fd298c382 03-May-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth encryption aware
am: cf48e13e3b

* commit 'cf48e13e3bcfbc326bf860331d367a6e4524af8d':
Make Bluetooth encryption aware

Change-Id: Ie1a336ece5586f1cd7901cf86c1317a59b5c8683
cf48e13e3bcfbc326bf860331d367a6e4524af8d 12-Apr-2016 Ajay Panicker <apanicke@google.com> Make Bluetooth encryption aware

Allow the Bluetooth application to be bound to before the user
enters their lock pattern. Also move the file used for sharing
text blobs to private storage as that could contain private data.

Bug: 27332939
Change-Id: Iefa15939967afeb34c088957834ad5c35d7fd8fe
luetooth/opp/BluetoothOppLauncherActivity.java
dd40b31189c0edbab98da3531436d54f30cec90b 26-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Log permission check failure as warning"
5bac298917ad71f95995eb630d06fca6472974d4 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Log permission check failure as warning" into nyc-dev am: 7a94490 am: b6f5bd6
am: 25a36f3

* commit '25a36f32887131383e30046384583a17d283e2c0':
Log permission check failure as warning

Change-Id: I14394ddda6f1b89ed44293fbd8be8d7dd1ba6d17
25a36f32887131383e30046384583a17d283e2c0 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Log permission check failure as warning" into nyc-dev am: 7a94490
am: b6f5bd6

* commit 'b6f5bd6970ca3e98b71d8c985aff76d700852da1':
Log permission check failure as warning

Change-Id: Ic419020f67c37609ca0d63280ece4bef62aa3b5e
dba17180bf4e9c25ec87f62dc20ea54a281b5e22 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Log permission check failure as warning" into nyc-dev
am: 7a94490

* commit '7a9449022d3ea672b96062df7a16d9259b2a66f0':
Log permission check failure as warning

Change-Id: Iaa81b40dbfc2f4fa7ab265e157d21664cee796ec
7a9449022d3ea672b96062df7a16d9259b2a66f0 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Log permission check failure as warning" into nyc-dev
667da1391fc8dcd68be6c86a9947c38dc3229c3f 26-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Absolute volume: Black list device if remote can\'t change volume" am: 0af237b am: 82e7f6b am: a664da8
am: d04363e

* commit 'd04363e38cd3528330825392e311a007b3efcb60':
Absolute volume: Black list device if remote can't change volume

Change-Id: I6ff9fcdbc9c62de3ed845d93ff16901a09b86bfd
d04363e38cd3528330825392e311a007b3efcb60 26-Apr-2016 Liejun Tao <baibai@motorola.com> Merge "Absolute volume: Black list device if remote can\'t change volume" am: 0af237b am: 82e7f6b
am: a664da8

* commit 'a664da8ab16e09bae6c25d015d13222bc6065c39':
Absolute volume: Black list device if remote can't change volume

Change-Id: I7bdf65a1aa3cad244c29f958fcb25eead1f5b6ed
a664da8ab16e09bae6c25d015d13222bc6065c39 26-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Absolute volume: Black list device if remote can\'t change volume" am: 0af237b
am: 82e7f6b

* commit '82e7f6b9d8acd290134a1b7b9eaea7077526dd35':
Absolute volume: Black list device if remote can't change volume

Change-Id: I4ae92f84e1915c7b13acd16bfd4015fe1f86b992
2583f09407c8265c12d198d408692c75eabf22a3 09-Mar-2016 Liejun Tao <baibai@motorola.com> Absolute volume: Black list device if remote can't change volume

If remote device failed to change volume too many times, black list it
to avoid using Absolute volume feature.

Bug: 26694114
Change-Id: Idb7a772b0ef936b2351bfc92722ec3c0d748822c
luetooth/avrcp/Avrcp.java
f8201e1c6bf7fadc0a332151a652325a7f31255a 09-Mar-2016 Liejun Tao <baibai@motorola.com> Absolute volume: Black list device if remote can't change volume

If remote device failed to change volume too many times, black list it
to avoid using Absolute volume feature.

Bug: 26694114
Change-Id: Idb7a772b0ef936b2351bfc92722ec3c0d748822c
luetooth/avrcp/Avrcp.java
a6ad5869940240d1f40649d9ca23e468f537b065 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Log permission check failure as warning

Currently when permission check fails, there is no way for users to see
what went wrong. This patch fixes that by providing better log message.

Bug: 28328321
Change-Id: I11f336c6c0560c4be482fefefaf95b70a06a63d6
luetooth/gatt/GattService.java
039883a2a1ea22308e0255189e390d2c90a5ee80 26-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Log permission check failure as warning

Currently when permission check fails, there is no way for users to see
what went wrong. This patch fixes that by providing better log message.

Bug: 28328321
Change-Id: I11f336c6c0560c4be482fefefaf95b70a06a63d6
luetooth/gatt/GattService.java
ffb10b682610a24d5c54e8828c11276fe5703d65 22-Apr-2016 Sanket Agarwal <sanketa@google.com> A2DP MediaSession active state management and NPE

UIs (such as SystemUI) depend on MediaSession.isActive state to
determine whether to show it on the overview (or shades). Currently we
are keeping the session active ever since the first bluetooth connect (A2DP) happens.

This change makes the session to be active when the device connects and
the first play happens (i.e. the play state of remote device
irrespective of who initated it) and in-active when device disconnects.

Also, avoid a NPE that may happen due to races between delay in
broadcasts and accesing bluetooth state machine.

Bug: b/28345602
Bug: b/28330860

Change-Id: Id7686308ada0b608b959258d137772ee5f24c18f
(cherry picked from commit faa30bec93650414fb90b60b5a488b32dd54b9ac)
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
e062a53f929cfbb90a81c966f1e1b207510247f3 23-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Properly label app as unregistered and add NPE protection" into nyc-dev
c26b62d46ad1ce1b956297b5c2f6331391849fa0 23-Apr-2016 Calvin On <con@google.com> Synchronize access to ServiceDeclaration fields. am: f8ecbbb am: 5576218
am: 87d0bef

* commit '87d0bef7b77c31d7031ffd433bb6c7d438ea51e5':
Synchronize access to ServiceDeclaration fields.

Change-Id: I46b300230a47fc96f90719786f7fb51a9d7468a7
87d0bef7b77c31d7031ffd433bb6c7d438ea51e5 22-Apr-2016 Calvin On <con@google.com> Synchronize access to ServiceDeclaration fields. am: f8ecbbb
am: 5576218

* commit '5576218cafb4a39be3d0e70900d05bca5fbfe9a7':
Synchronize access to ServiceDeclaration fields.

Change-Id: Iac5477be509e2395b56888fb3bda2bc64f524517
5576218cafb4a39be3d0e70900d05bca5fbfe9a7 22-Apr-2016 Calvin On <con@google.com> Synchronize access to ServiceDeclaration fields.
am: f8ecbbb

* commit 'f8ecbbb375c6a41895e0144d8d8cd42587891570':
Synchronize access to ServiceDeclaration fields.

Change-Id: Ia0fda64b79de8bfcbe49da005364377b44eda25e
f8ecbbb375c6a41895e0144d8d8cd42587891570 20-Apr-2016 Calvin On <con@google.com> Synchronize access to ServiceDeclaration fields.

ServiceDeclaration objects are accessed by both the binder thread
(addService, addCharacteristic, etc) and the GattService callback thread
(onServiceAdded, etc) and so must be made thread-safe.

Bug: 28201656
Change-Id: Ic2e4b5c21dafceb62f33738b781f908f502f60b3
luetooth/gatt/ServiceDeclaration.java
21dddc2daafa0616f4d178979ea84d4e1ffce70b 22-Apr-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of ce65d54 to nyc-dev-plus-aosp am: 123e1f3d62
am: 81f1d75f1e

* commit '81f1d75f1e54881c8a5fa59aa4d69d70eae8df78':
AVRCP: Use MediaController

Change-Id: I801cf073752ecc1c78cf6edd82c2f02eeb2fed1f
81f1d75f1e54881c8a5fa59aa4d69d70eae8df78 22-Apr-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of ce65d54 to nyc-dev-plus-aosp
am: 123e1f3d62

* commit '123e1f3d6252cb5505efaeaffd74c1f3895587df':
AVRCP: Use MediaController

Change-Id: Ie9c1227cf82e53801b0255a890bafa4d2d8a01f6
b37b80b24a26a697d302583c900c5e9237acb03a 20-Apr-2016 Ajay Panicker <apanicke@google.com> Properly label app as unregistered and add NPE protection

Bug: 28252914
Change-Id: I1e28a9af96bcf0d56914fcc676a8ff85400bc1c4
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
123e1f3d6252cb5505efaeaffd74c1f3895587df 22-Apr-2016 Marie Janssen <jamuraa@google.com> resolve merge conflicts of ce65d54 to nyc-dev-plus-aosp

Change-Id: Icce0b121a472fda7d49ff00eb70f73a53ce62b1d
c57daee55d3cc561f26a64b958b6f664ad755b13 22-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Use MediaController am: 2fc493d0ea am: 739879c469
am: 5b1a73761b

* commit '5b1a73761bd09c16c211080b88e5ef9e26e1d123':
AVRCP: Use MediaController

Change-Id: I8d1a3f02a65142615373fa19d124c17b6bf6e8c0
5b1a73761bd09c16c211080b88e5ef9e26e1d123 22-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Use MediaController am: 2fc493d0ea
am: 739879c469

* commit '739879c4695ee6c3ee9ae6e306f091dc1a8bf011':
AVRCP: Use MediaController

Change-Id: Iaabaae1b5a583e4bc158efeb5762ab60997399c2
739879c4695ee6c3ee9ae6e306f091dc1a8bf011 22-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Use MediaController
am: 2fc493d0ea

* commit '2fc493d0ea2b504df25d783a488dfadfe301329e':
AVRCP: Use MediaController

Change-Id: I217d39edb9051fa400183317a9c7de66e8b9a2de
2fc493d0ea2b504df25d783a488dfadfe301329e 19-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Use MediaController

RemoteController has been depreciated since M.
MediaController lets us track a lot more things and update data as the
state of audio changes.

This also should fix some bugs related to metadata display not happening
on startup / track change / app change.

Bug: 27178384
Bug: 27745277
Bug: 26837775
Bug: 27534794
Bug: 27153373
Change-Id: I246d9641a5e921ed4434495f5c2dfac67d568952
luetooth/avrcp/Avrcp.java
0e949676c5097e1f259caa2e549ecedf0c09269d 19-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Use MediaController

RemoteController has been depreciated since M.
MediaController lets us track a lot more things and update data as the
state of audio changes. We track and log some of these changes for bug
followup.

This also should fix some bugs related to metadata display not happening
on startup / track change / app change.

Bug: 27178384
Bug: 27745277
Bug: 26837775
Bug: 27534794
Bug: 27153373
Change-Id: I246d9641a5e921ed4434495f5c2dfac67d568952
luetooth/avrcp/Avrcp.java
c8c74e5d4db70be47b01cc2cbdec8898d3d6677d 22-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Properly label app as unregistered and add NPE protection" am: d4a672f597 am: 73122688c6 am: e2ef4d1782
am: fba808f27e

* commit 'fba808f27e41eb172d519b39a546254f08229647':
Properly label app as unregistered and add NPE protection

Change-Id: I67995695b805f01de8487929f779268c94649667
fba808f27e41eb172d519b39a546254f08229647 21-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Properly label app as unregistered and add NPE protection" am: d4a672f597 am: 73122688c6
am: e2ef4d1782

* commit 'e2ef4d17825129779ab46105af66a4a805c5e7df':
Properly label app as unregistered and add NPE protection

Change-Id: Id43f76d7e42f2e91bd3ebd7bce43863724ab596d
e2ef4d17825129779ab46105af66a4a805c5e7df 21-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Properly label app as unregistered and add NPE protection" am: d4a672f597
am: 73122688c6

* commit '73122688c60586956205665d43748da430bef95e':
Properly label app as unregistered and add NPE protection

Change-Id: Ib46783b7eba4a7c359970b6369e0c6aa4eb3c506
a511ea0b7aa7978784b2aa545fe4062869024680 21-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection
am: 60e306ba5c

* commit '60e306ba5c132d5408ccae3a290e7cace020a49f':
"DO NOT MERGE" Add write SMS protection

Change-Id: I095cdaa7bd2674003f2fea3779fcce180af1f5f0
f939f71f1a2a21a89e82acf23154c73af5bea1f7 15-Apr-2016 Jakub Pawlowski <jpawlowski@google.com> Fix work profile app not being able to create bond

Bug: 28153078
Change-Id: I49c020d7d016c667a6cb3366ef862a1eb9dfb4d5
luetooth/btservice/AdapterService.java
57a102e5548a7a395bcd7feec3c1df6d61be8187 20-Apr-2016 Sanket Agarwal <sanketa@google.com> Race in hfp call termination when local termination faster than HFP
update.

If we make a call from the CarKitt and terminate it immidiately then the
CarKitt assumes no call has been created since phone hasnt replied yet
to the message from CarKitt. When it does reply, the CarKitt throws that
message away because it did not handle the intermediate state of
disconnection properly.

Bug: b/28122608

Change-Id: I98105fd36914612fc96cba4d56db97b342822ffa
(cherry picked from commit 52297bafb15107ef66b7edeb1879df28b26e5cc9)
luetooth/hfpclient/connserv/HfpClientConnection.java
a86ae2ce4305fb0af5522b3f46513b137e98836f 20-Apr-2016 Ajay Panicker <apanicke@google.com> Properly label app as unregistered and add NPE protection

Bug: 28252914
Change-Id: I1e28a9af96bcf0d56914fcc676a8ff85400bc1c4
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
60e306ba5c132d5408ccae3a290e7cace020a49f 06-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection

Bug: 25138326
Change-Id: I9f418370b8725d49e3734406b6f435107bcff021
luetooth/map/BluetoothMapService.java
59fc7cf9a4e2c7f518833e03a38e77002d9d5665 20-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Replace NOT_SUPPORTED string constants with empty strings."
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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
599ce082b1b7bd5311ab31b4a3102f85bd1c7c4a 20-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Add guest mode functionality (1/4)" am: fae54a8 am: 35d1580 am: 6265c0e
am: 7ace4f3

* commit '7ace4f320fcef8259b5ad5dca8f431b90faa6dee':
Add guest mode functionality (1/4)

Change-Id: Ie8b07de696d80d83ce5622e0d78b2e14533ad65c
6265c0e229c7a5ac9143c100c4d654142043d145 19-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Add guest mode functionality (1/4)" am: fae54a8
am: 35d1580

* commit '35d1580a975dc5e9b3d4a7c987e30eb7ab1763be':
Add guest mode functionality (1/4)

Change-Id: I0d91fba1ca24c0868f6372cd811ba998bed2d190
b90c26765772a8cf5cf20c86a89dc24490cb1ccd 19-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection am: 64745b1 am: 9accc36
am: 6c32c81

* commit '6c32c815bfbe1058791c6dbee0a98c6b30792963':
"DO NOT MERGE" Add write SMS protection

Change-Id: I4cca8e8ac4b4659ce7dc28264ccd39a53d68098c
6c32c815bfbe1058791c6dbee0a98c6b30792963 19-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection am: 64745b1
am: 9accc36

* commit '9accc36b1a6a9779d31ea6edcc861a69167d37e5':
"DO NOT MERGE" Add write SMS protection

Change-Id: Id5bc27d73ed66c9f12ecf94ec2ef1dc727a6b5c4
9accc36b1a6a9779d31ea6edcc861a69167d37e5 19-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection
am: 64745b1

* commit '64745b114948ea0c774f74af5721b6283087247d':
"DO NOT MERGE" Add write SMS protection

Change-Id: Idb905753e4e4d711b11b7d5274e622df4e9c4251
e2c4671a8c5d01f053b5b8e0c728d69d561abdc2 15-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Don't assume 0:00 on metadata change

When changing between apps, and changing between songs, the Media
framework sends us the position data before the metadata, so
setting it to 0 wipes out our position.

Fixes: 27745277
Change-Id: I2d309df424c8889928da9601b367d488bba89919
luetooth/avrcp/Avrcp.java
a525ff9f10b2ee0cee3269ab6082ddf09441199d 18-Apr-2016 Sanket Agarwal <sanketa@google.com> Replace NOT_SUPPORTED string constants with empty strings.

AVRCP was defining default state strings as NOT_SUPPORTED and hence the
UI would show NOT_SUPPORTED as the string for album/song info when no
player is selected on the phone. Replacing these strings with empty
helps UI make a more informed decision.

Bug: b/28120051

Change-Id: Ia8017dce784160d637a6653f70addb5258e7871e
(cherry picked from commit 00a113ff764ac9ae8517f54d79d917302ebf243b)
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/pbapclient/PbapClientService.java
688344c5ed34758c1e96a1dec9212e10107a7263 19-Apr-2016 Sanket Agarwal <sanketa@google.com> A2dpSink sends CONNECTED instead of DISCONNECTED when connection
timeout

When a timeout happens for an outgoing A2DP Sink connection we are (most
likely a typo) sending a CONNECTED instead of DISCONNECTED event. This
confuses the UI and shows it as connected instead of disconnected.

Change-Id: I2fc5a9df86781b45e5c5ff9368a7c49c6c910294
(cherry picked from commit 996bedb82d33c56e1f1c24986c56c166afc9c77a)
luetooth/a2dpsink/A2dpSinkStateMachine.java
336e77eb762a8e80e41177c9e7a988c4400afc3d 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Implement new async response method for controller activity info" into nyc-dev am: 049173d am: ef1772a
am: d5537ef

* commit 'd5537ef83ed5b9d9783b802742f0fd5f10b73839':
Implement new async response method for controller activity info

Change-Id: I9c4d4ece75c56cd0bbdbdca8328fec65bc031920
ef1772ab9862e830067d91dc5c806f9fde4c0750 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Implement new async response method for controller activity info" into nyc-dev
am: 049173d

* commit '049173d572891011cc01f675d8bd0227ef55e381':
Implement new async response method for controller activity info

Change-Id: Iae86ab380cd053b3bcb678b858b5877d8900b40c
049173d572891011cc01f675d8bd0227ef55e381 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Implement new async response method for controller activity info" into nyc-dev
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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
3259e36c6541d38b5c6f051983dcb5dff1ff773c 16-Apr-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Don\'t assume 0:00 on metadata change" am: b81be7b am: bd7e0bf
am: 322c601

* commit '322c6019a835508b668b55618b7fd8e17309fe86':
AVRCP: Don't assume 0:00 on metadata change

Change-Id: I50fee858953e16dde4764074c94a43b4d4505755
322c6019a835508b668b55618b7fd8e17309fe86 16-Apr-2016 Marie Janssen <jamuraa@google.com> Merge "AVRCP: Don\'t assume 0:00 on metadata change" am: b81be7b
am: bd7e0bf

* commit 'bd7e0bf92708a8da7166fa521b80ee830cc1f7aa':
AVRCP: Don't assume 0:00 on metadata change

Change-Id: If5b201739fbb6656b5d25930334c2af94d667531
1f8651b5ddeb19604bd178890d3429438dac8e5e 15-Apr-2016 Marie Janssen <jamuraa@google.com> AVRCP: Don't assume 0:00 on metadata change

When changing between apps, and changing between songs, the Media
framework sends us the position data before the metadata, so
setting it to 0 wipes out our position.

Fixes: 27745277
Change-Id: I2d309df424c8889928da9601b367d488bba89919
luetooth/avrcp/Avrcp.java
5086accf9944ba92bf43f69e4651d8c87bfa913c 16-Apr-2016 Sanket Agarwal <sanketa@google.com> Handle all kinds of focuses and make fault tolerant to phone calls. am: bacd337
am: 9d925df

* commit '9d925df92e98d88695b5129ce0b257f6095e4a39':
Handle all kinds of focuses and make fault tolerant to phone calls.

Change-Id: I063dce2933e55846d131eb590d83df3f1125c234
9d925df92e98d88695b5129ce0b257f6095e4a39 16-Apr-2016 Sanket Agarwal <sanketa@google.com> Handle all kinds of focuses and make fault tolerant to phone calls.
am: bacd337

* commit 'bacd3374a5b2c2193e45aac0eafb8cc39762d9f5':
Handle all kinds of focuses and make fault tolerant to phone calls.

Change-Id: Ia5ba035536cfe8953fb7b6efc959ef06565c31b6
bacd3374a5b2c2193e45aac0eafb8cc39762d9f5 07-Apr-2016 Sanket Agarwal <sanketa@google.com> Handle all kinds of focuses and make fault tolerant to phone calls.

Audio Focus Loss Transient: We stop music and wait for focus gain.
Audio Focus Loss Transient May Duck: We lower the volume (via Gain).

Sometimes phones do not resume even after sending play after the phone
call. This is possible if there is a race condition of when A2dp thinks
it got focus back vs phone actually releasing the call. To avoid this we
add retry logic to try playing again. This also avoids janky situations
when playing music will not initiate at first.

Bug: b/28003743
Bug: b/28065071

Change-Id: I1d31156d134d98959ff3044c98206c60515d7e5a
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
luetooth/hfpclient/connserv/HfpClientConnection.java
aa218437c511755ac69f37e93753fcf289984f70 11-Apr-2016 Adam Lesinski <adamlesinski@google.com> Implement new async response method for controller activity info

Bug:26842468
Change-Id: I35e6bd6996d408aa2c8ccda754d5b2f05bcb8056
luetooth/btservice/AdapterService.java
2975c2192f6c52d8c5fc678a97efe2c023490f3d 15-Apr-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a missing null-pointer check in HeadsetService.stop()" am: 7f0f52c am: 2144045
am: bad5778

* commit 'bad5778c63dd81b2465b52ada102c74ba069b4dd':
Add a missing null-pointer check in HeadsetService.stop()

Change-Id: Iecb00c70319413a3002e1d8a9177b63865fe85f7
bad5778c63dd81b2465b52ada102c74ba069b4dd 15-Apr-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a missing null-pointer check in HeadsetService.stop()" am: 7f0f52c
am: 2144045

* commit '214404558c638733aee9aec5a8481522ecaca86c':
Add a missing null-pointer check in HeadsetService.stop()

Change-Id: Ib80cb345580c497ae6352b80d299bb915c29c4d7
1b09c8cd4fa10c3f0918cb1e24bdd2fd60aeec88 15-Apr-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null-pointer check in HeadsetService.stop()

Bug: 27678483

Change-Id: I288b905d6b3f827a94365d512305cd29e186f3d4
luetooth/hfp/HeadsetService.java
bf12c61e7def530edebc12844f6a37f1299c60a8 15-Apr-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null-pointer check in HeadsetService.stop()

Bug: 27678483

Change-Id: I288b905d6b3f827a94365d512305cd29e186f3d4
luetooth/hfp/HeadsetService.java
c1b48cf21758e627fb9738a176fb1aae36c27c65 26-Mar-2016 Victor Chan <victorchan@google.com> Set session to active for A2dpMediaBrowserService.

Bluetooth Audio playbackstate was not appearing in the overview since the session was inactive.

bug:27859156
Change-Id: I2e454747efe8724daa8c5375b193cf00638aec5d
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
cfe27c30d1c63cc537aaf1a9a8c721536b2b792f 13-Apr-2016 Calvin On <con@google.com> Fix PEERS_MAC_ADDRESS permission for Ble Scanning.

This changes the location permissions check to only throw a SecurityException
if *both* location and peers mac address permissions are missing.

Bug: 27837639
Change-Id: I5e10c8f0564d1f7edab23ad22dbd5aa5fdcbbf76
luetooth/Utils.java
62ee66fe433b8614171057c10b27a071170aace2 13-Apr-2016 Calvin On <con@google.com> Fix PEERS_MAC_ADDRESS permission for Ble Scanning.
am: e041e1b

* commit 'e041e1b073d81516073223da4aef23e91cc823e7':
Fix PEERS_MAC_ADDRESS permission for Ble Scanning.

Change-Id: Ice6b8e751576badddcd814b8d9139af5d0ba387e
e041e1b073d81516073223da4aef23e91cc823e7 13-Apr-2016 Calvin On <con@google.com> Fix PEERS_MAC_ADDRESS permission for Ble Scanning.

This changes the location permissions check to only throw a SecurityException
if *both* location and peers mac address permissions are missing.

Bug: 27837639
Change-Id: I5e10c8f0564d1f7edab23ad22dbd5aa5fdcbbf76
luetooth/Utils.java
64745b114948ea0c774f74af5721b6283087247d 06-Apr-2016 Seven Shen <lingtongshen@gmail.com> "DO NOT MERGE" Add write SMS protection

Bug: 25138326
Change-Id: I9f418370b8725d49e3734406b6f435107bcff021
luetooth/map/BluetoothMapService.java
7b3ca8223e55fa86b7abcb9163345168946fce07 08-Apr-2016 Sanket Agarwal <sanketa@google.com> Bluetooth streaming should wait for AVRCP to start.
am: f3db7dc

* commit 'f3db7dcf88a585d133f73b8579012f8217965728':
Bluetooth streaming should wait for AVRCP to start.

Change-Id: Id4a786f6b41e123d3bf4560fe21b8727d630cacd
f3db7dcf88a585d133f73b8579012f8217965728 07-Apr-2016 Sanket Agarwal <sanketa@google.com> Bluetooth streaming should wait for AVRCP to start.

Currently we are waiting for A2DP to come up before we can start
streaming. This is not ideal since unless AVRCP comes up we cannot show
the UI reliably. That said, for compatibility with devices only having
A2DP we will need to modify this code. For now the A2DP SNK is only
supposed to work with AVRCP TG implementation on the remote.

Bug: b/27744764
Change-Id: I972cf94f5b276d9b0e08315175ae605ccfe6a423
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
e60e6ded4e8f4d9b123b6feb1fcfb6dfa246ce44 07-Apr-2016 Marie Janssen <jamuraa@google.com> Merge "Enable logging for AVRCP Metadata changes" am: 5faf9f0
am: 353e820

* commit '353e820f5b64e26ea2b57ea997073e7616b55ad9':
Enable logging for AVRCP Metadata changes

Change-Id: I9cf01a6ac27e6939c43a3d577ec5ad1213379f45
65e7943d098113c5aa56e9822b68f0c51c6dbe36 05-Apr-2016 Marie Janssen <jamuraa@google.com> Enable logging for AVRCP Metadata changes

We're seeing a lot of AVRCP metadata issues, so enable some logging of
metadata in hopes of collecting more information.

Bug: 26837775
Bug: 27153373
Bug: 27178384
Bug: 27745277
Change-Id: Ie425ad2a5e090aa4363dab6b853479eeda35cef6
luetooth/avrcp/Avrcp.java
c1124a7c6679f612b80926a19084655f9a71580a 05-Apr-2016 Marie Janssen <jamuraa@google.com> Enable logging for AVRCP Metadata changes

We're seeing a lot of AVRCP metadata issues, so enable some logging of
metadata in hopes of collecting more information.

Bug: 26837775
Bug: 27153373
Bug: 27178384
Bug: 27745277
Change-Id: Ie425ad2a5e090aa4363dab6b853479eeda35cef6
luetooth/avrcp/Avrcp.java
f6f74322ced5c6fb4681c2a1cb42c66f8c82c774 05-Apr-2016 Ajay Panicker <apanicke@google.com> Fix name collected for scan initiator

Private information was being collected for the scan statistics.

Bug: 27996307
Change-Id: Idab438967f80f86f4f92e7f03cc5787f8d54e8a1
luetooth/gatt/AppScanStats.java
5358335885818c026f9d7d8a60cda4b80ae96ee8 06-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Make PBAP PCE (Client) role auto-connectable.
am: 3c75851

* commit '3c75851b93fe42d7d4650adc6a5d680c6f43eb42':
Make PBAP PCE (Client) role auto-connectable.

Change-Id: I759a1d25b65ee4f9dfe73e3c839d64e60a0ce206
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
luetooth/btservice/AdapterService.java
83c1c42e24d440cbeeaca2c36e8e7a4dd4d9b4a6 06-Apr-2016 Ajay Panicker <apanicke@google.com> Merge "Fix name collected for scan initiator" am: ca4d161
am: 033bfdb

* commit '033bfdb04dbd5b6ad81421c9707c4dfe1e17e2d0':
Fix name collected for scan initiator

Change-Id: I94dbd95910ba84109dcf418561b05b185563e460
3d69ae195b8d3918958ea703a188cc77e511da6c 05-Apr-2016 Ajay Panicker <apanicke@google.com> Fix name collected for scan initiator

Private information was being collected for the scan statistics.

Bug: 27996307
Change-Id: Idab438967f80f86f4f92e7f03cc5787f8d54e8a1
luetooth/gatt/AppScanStats.java
a5c4fec36081826e09a6bb368e85523a5e13d5ed 06-Apr-2016 Sanket Agarwal <sanketa@google.com> Merge commit '92870384369a8a5345bfe868b97d2d384f433103' into manual_merge_9287038

Change-Id: I7696c00ff3787104caeeb22d7225e2ba665fa7f6
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
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpSinkStreamingStateMachine.java
luetooth/a2dpsink/A2dpSinkService.java
luetooth/a2dpsink/A2dpSinkStateMachine.java
luetooth/a2dpsink/A2dpSinkStreamingStateMachine.java
luetooth/a2dpsink/mbs/A2dpMediaBrowserService.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
c473ba2b2f5c8cad8c7f08f4a5d69594261bb736 23-Mar-2016 Ajay Panicker <apanicke@google.com> Add GATT server scan stats and extra protection

Bug: 27811549
Change-Id: I9138193f8e0dec4e548c57b635bad3703961088f
luetooth/gatt/GattService.java
7169fd06211df36a3b5c0fd09364b17eaed00b4b 04-Apr-2016 Joseph Pirozzo <pirozzoj@google.com> Autoconnect Car Profiles
am: 79b693f

* commit '79b693f44a0508d2a794635f0ec3bd84f8f5ede0':
Autoconnect Car Profiles

Change-Id: Ib739cd394017f58f4e54925d9eb67138f8d4b7ab
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
luetooth/btservice/AdapterService.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapPCEClient.java
62a730f79420bc4f335a520331ac31f314fda445 26-Mar-2016 Sharvil Nanavati <sharvil@google.com> Fix NPE when performing BLE scans.

Bug: 27811549
Change-Id: I017b34745682dd9db5487921df5c01dfde93d67c
luetooth/gatt/ContextMap.java
5beb5d65e7fda236bc1c24be807c14a3b096beae 30-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP client priority settings." into nyc-dev
am: af98f39

* commit 'af98f39707768b300b29f552e29ec644e8f75dcd':
PBAP client priority settings.

Change-Id: I9c66454b97308b3bf6296e9ec45620dd5a4a17f3
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
luetooth/btservice/AdapterService.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapPCEClient.java
f924b023dbe14a1183ca9d9688c38406e8717381 30-Mar-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null check inside A2dpService.resetAvrcpBlacklist()

Add a missing null pointer check inside method
A2dpService.resetAvrcpBlacklist()

Also:
- Removed BondStateMachine.setProfilePriority() because it is
not used.
- Fix a typo "priorty" -> "priority"
- Fix a log message.

Bug: 27837879
Change-Id: Ieabf00d2ff1e49aa06598674f14e97eb9086d432
luetooth/a2dp/A2dpService.java
luetooth/btservice/BondStateMachine.java
f0fb7365544801a9c6b82163651533e9dcbeb586 30-Mar-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a missing null check inside A2dpService.resetAvrcpBlacklist()" am: 855104e
am: c9dfd16

* commit 'c9dfd167f599715f737c31b00ce0e15485c224d9':
Add a missing null check inside A2dpService.resetAvrcpBlacklist()

Change-Id: I7cd2bada2064d23984b7986efb0288b10e6879c8
ff495eca3027c9b3aa7d8ef4e9cfd2cde3bbb664 30-Mar-2016 Pavlin Radoslavov <pavlin@google.com> Add a missing null check inside A2dpService.resetAvrcpBlacklist()

Add a missing null pointer check inside method
A2dpService.resetAvrcpBlacklist()

Also:
- Removed BondStateMachine.setProfilePriority() because it is
not used.
- Fix a typo "priorty" -> "priority"
- Fix a log message.

Bug: 27837879
Change-Id: Ieabf00d2ff1e49aa06598674f14e97eb9086d432
luetooth/a2dp/A2dpService.java
luetooth/btservice/BondStateMachine.java
10311829fa54ed7cfa3048357e5248c460be7494 29-Mar-2016 Ajay Panicker <apanicke@google.com> Merge "Add GATT server scan stats and extra protection" am: 4e8da47
am: 25f233e

* commit '25f233ebea0ec6cb46835d7c95185ddc6e980611':
Add GATT server scan stats and extra protection

Change-Id: Ida1ee11b2e57e38c3bd097c57b045bd30c3a5f23
62c17211ad512abcc64ad8e5173e80b580c8f59d 23-Mar-2016 Ajay Panicker <apanicke@google.com> Add GATT server scan stats and extra protection

Bug: 27811549
Change-Id: I9138193f8e0dec4e548c57b635bad3703961088f
luetooth/gatt/GattService.java
e9fbe54ee33433860cd902c0f2b62aa86113f5a3 29-Mar-2016 Ajay Panicker <apanicke@google.com> Revert "Add guest mode functionality (1/5)"
am: fa08821

* commit 'fa0882174bb9479e307b6faea1d1c0f174d38f43':
Revert "Add guest mode functionality (1/5)"
e1f79a46e33b17fe07617e22964ca7e1b3859455 29-Mar-2016 Ajay Panicker <apanicke@google.com> Add guest mode functionality (1/5)
am: 6e2c4a1

* commit '6e2c4a130d93e448decc67991690fd8d1f83a343':
Add guest mode functionality (1/5)
fa0882174bb9479e307b6faea1d1c0f174d38f43 28-Mar-2016 Ajay Panicker <apanicke@google.com> Revert "Add guest mode functionality (1/5)"

This reverts commit 6e2c4a130d93e448decc67991690fd8d1f83a343.

Change-Id: Iae9ecfc53a4e405bc04d21822a79112f7dc63247
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
44058414f6508fc7c731b2993b92bb84d137b749 28-Mar-2016 Andre Eisenbach <eisenbach@google.com> Merge changes from topic \'pts-test-fix-sync-20160335-1\' into nyc-dev
am: 4afd6b9

* commit '4afd6b9c12b0cfa753b388b9eaace86692b4fc2f': (22 commits)
Fix more merge issues in BluetoothPbapVcardManager.java
PBAPS: Don't filter out DateTime when requested
PBAPS: Fix duplicate entries fetched from database
PBAPS: Get vcard when asked in alphabetical order
PBAPS: Enable contact search with full or part of given string
SAP: Fix ANR(s) in SAP server code
SAP: Remove sdp record while BT is being turned off to prevent leak
SAP: Fix issue of socket listener not getting re-started
SAP: Update UI connection and notifications properly
SAP: Handle disconnect request during call ongoing state
OPP: Update share status when interrupted at remote side.
OPP: Use long instead of int
MAP: Fix ANR for blocking operations on UI thread
MAP: Track ProfileState, register and unregister of BroadcastReceivers
MAP: CleanUp for SDP record in MAP Service shutdown
MAP: GETMessagesLisitng include mandatory field always.
MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm.
MAP: Handle possible NPE while disconnect map.
MAP: Add MNS SDP Search during setNotificationRegistration.
MAP: Declare and fetch only 'INTERESTED_MESSAGE_TYPE_CLAUSE' MMS.
...
4afd6b9c12b0cfa753b388b9eaace86692b4fc2f 28-Mar-2016 Andre Eisenbach <eisenbach@google.com> Merge changes from topic 'pts-test-fix-sync-20160335-1' into nyc-dev

* changes:
Fix more merge issues in BluetoothPbapVcardManager.java
PBAPS: Don't filter out DateTime when requested
PBAPS: Fix duplicate entries fetched from database
PBAPS: Get vcard when asked in alphabetical order
PBAPS: Enable contact search with full or part of given string
SAP: Fix ANR(s) in SAP server code
SAP: Remove sdp record while BT is being turned off to prevent leak
SAP: Fix issue of socket listener not getting re-started
SAP: Update UI connection and notifications properly
SAP: Handle disconnect request during call ongoing state
OPP: Update share status when interrupted at remote side.
OPP: Use long instead of int
MAP: Fix ANR for blocking operations on UI thread
MAP: Track ProfileState, register and unregister of BroadcastReceivers
MAP: CleanUp for SDP record in MAP Service shutdown
MAP: GETMessagesLisitng include mandatory field always.
MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm.
MAP: Handle possible NPE while disconnect map.
MAP: Add MNS SDP Search during setNotificationRegistration.
MAP: Declare and fetch only 'INTERESTED_MESSAGE_TYPE_CLAUSE' MMS.
MAP: Synchronize notifcationReg reply and MNS connect action.
Send error for if VR is initiated during call.
c92a17a7e1788d304b0762c795fd277a0c8d8cd8 26-Mar-2016 Sharvil Nanavati <sharvil@google.com> Fix NPE when performing BLE scans.
am: 2a6d08a

* commit '2a6d08a87c210918a0ad5b4c01bb5152cce2ba69':
Fix NPE when performing BLE scans.
2a6d08a87c210918a0ad5b4c01bb5152cce2ba69 26-Mar-2016 Sharvil Nanavati <sharvil@google.com> Fix NPE when performing BLE scans.

Bug: 27811549
Change-Id: I017b34745682dd9db5487921df5c01dfde93d67c
luetooth/gatt/ContextMap.java
c438463431b171a67b22b50886ef8dd737c44004 25-Mar-2016 Andre Eisenbach <eisenbach@google.com> Fix more merge issues in BluetoothPbapVcardManager.java

Change-Id: I901042e69b3beea93684fe1a194353664fabd0c2
luetooth/pbap/BluetoothPbapVcardManager.java
5211519fa7617f3e34b214264f59157db9f495aa 14-Aug-2015 Smriti Gupta <smritig@qti.qualcomm.com> PBAPS: Don't filter out DateTime when requested

This only adds a special exception for DateTime,
the other "X-" fields are already filtered out since
for vcard 2.1, it is mandatory to provide DateTime
if requested by remote.

Change-Id: Ib25a9b085d5692548156068b9700e2b007c4bcee
luetooth/pbap/BluetoothPbapVcardManager.java
6a50944dff2081fc161974cfae7d85d834b123cf 30-Nov-2015 Smriti Gupta <smritig@codeaurora.org> PBAPS: Fix duplicate entries fetched from database

Precondition
================
Have multple contacts with either same number or name in DUT

Steps to reproduce:
===================
1. Perform BT pairing from DUT->RD<1>
2. Search for name from remote.

Expected Result:
================
Single entry with the name should be returned

Actual Result:
==============
Single name entry with different numbers are duplicating

Fix
========
This patch will remove the duplicate entries having same handle
and name fetched from the database sometimes. The check was
there in the stock code but that was not sufficient and was
comparing with the previous value only if these are duplicates
and not with the whole list. I have updated this check to
compare the fetched value if the exact duplicate value
(same ID and NAME) is present in the final list of contacts
which is to be returned.

Change-Id: If32526076baed813d39ce298c307196b63bc46fd
luetooth/pbap/BluetoothPbapVcardManager.java
3c8b50f8dc1c4ce11168fb42a884f604d1810c46 23-Nov-2015 Hemant Gupta <hemantg@codeaurora.org> PBAPS: Get vcard when asked in alphabetical order

Precondition:
=============
- PSE should have atleast 40 contacts with all alphabetical permutations

Step by Step procedure:
=======================
1. Establish PBAP session. Navigate to "Browse" Tab
2. Select telecom/pb.vcf on remote device and select "SETPHONEBOOK"
3. Select "Get Size" from remote device
4. Select default sorting, maxlistcount = 5000 and click "Search" to
browse phonebook
5. Select "Alphabetical" sorting, maxlistcount = 5000 and click "Search"
to browse phonebook

Actual Result
============================
After alphabetical sorting the contacts are displayed according to index
but not with sorted request

Expected result:
=========================
When contacts are sorted according to alphabets the contact info should
also be displayed according to contacts.

Root Cause:
========================
While quering vcard entry from database, proper checks of the order (indexed/alphabetical)
was not there in M Stock code compared to L Stock code.

Change-Id: Ie7990992b4dd22add3526aa0050121e680567bb8
luetooth/pbap/BluetoothPbapVcardManager.java
c3a43ae7d1f54495fb4d830d08386aee75e0e997 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> PBAPS: Enable contact search with full or part of given string

Enables searching of text in contact name starting with a given
matching string instead of matching the complete string.

Change-Id: I91258391b7b7cb014d55e17e1ed3b92267a2c7da
luetooth/pbap/BluetoothPbapObexServer.java
71a7019b7ae6809085ba1ae8de74e3d3b1f83513 06-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix ANR(s) in SAP server code

Fix ANR in SAP Server code in following scenarios:

- Multiple call to stop in Sapservice leads to ANR, as check was not
present in stop to prevent unregistering BroadcastReceiver if not
already registred.
- Remove redundant call to closeServerSocket from initSocket as this could
lead to ANR when there is simultaneous call to closeService as part of BT
being switched off and call to start SAP as part of BT being turned on when
BT on off sequence is tried repeatedly.

Change-Id: Ia6bc5ca7c9da9ae4a4c12e8207fb9ff6b9159e82
luetooth/sap/SapService.java
e7142c9e7dc0e01b10b1186c74463cda0d124742 06-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Remove sdp record while BT is being turned off to prevent leak

Remove sdp record created dynamically for SAP server during BT off state.
Without this call, there is leak in sdp layer in stack as sdp record is
never removed, even though the socket is closed.
Also proper checks are added to prevent call to remove sdp record when
adapter is null.

Change-Id: I739cc3115f6cd7fedf9085e8522c96da257e9568
luetooth/sap/SapService.java
df7a2ae3b9728b62562e6b98321c8715b43d722f 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix issue of socket listener not getting re-started

Add logic to properly handle ACL_DISCONNECTED to restart socketListener
to handle scenarios where socket listener was not getting started due to
abnormal ACL disconnect.

Change-Id: Iac5ec52f485e692b14bb0065e30a68cae007a49d
luetooth/sap/SapService.java
9d3697e063a63830cc3ea3a28d4708bb225a3df7 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Update UI connection and notifications properly

Update connection state to upper layers only when SAP SLC is connected
i.e. status indication is sent to SAP Client.
Also notification to disconnect SAP Server from UI is shown only when SAP
is successfully connected, and not when SapServer object is created.

Change-Id: Iaf40584220b51f6193bed9a54d159cffd32698e9
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
8b8c62f5118d1ecd63356808587768b175a71e1f 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Handle disconnect request during call ongoing state

Handle disconnect request during call ongoing state properly.
Previously if disconnect was received from SAP client while in
call ongoing state, it was not handled properly, leading to
Server not sending the DISCONNECT response thereby violating
Bluetooth SAP Specification.

Change-Id: I666fab4b4513abfa00df4be5b3a7aab95d5f0331
luetooth/sap/SapServer.java
8c7fcbf3f2564724f82e954a959081ff5d46a1bb 11-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> OPP: Update share status when interrupted at remote side.

Use case:
1) Select a file on DUT and send to Remote device through OPP
2) Accept the incoming file on Remote
3) While file transfer is in progress, stop the file transfer on Remote.
4) Again send the same file or different file to the same Remote Device.

Result:
OPP file transfer does not start.

Fix:
Update interrupted outbound content resolver entry when
Transfer is stopped at remote side. Otherwise DUT fails
To push OPP file after earlier OPP file is stopped on
Remote Device.

Change-Id: I9944bdd47ff9e31d0f9f8a157592e407e000e96c
luetooth/opp/BluetoothOppObexClientSession.java
5f10fd1ef7709ce6c89414ad732831b6759b982a 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> OPP: Use long instead of int

Use long instead of int data type in OPP Java code to prevent
overflow of timestamp and filesize during transfer of large files
which caused transfer failures.

Change-Id: I58c9b49f59d47f6f162156eb6594e66731732580
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
1ff5a0a6b42eff4c5728f0327440c127f8d3bb1c 11-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix ANR for blocking operations on UI thread

UseCase:
Stability Testing steps followed:
1. Pair and connect with remote phone.
2. Verify successful profile connection.
3. Pair & Connect LE device.
4. Disconnect & Unpair LE device.
5. Reset BT multiple times.
6. Repeat above steps 50 times

Failure:
ANR(s) reported for long running operations perfromed on main thread.

Fix:
- Attach MAPService session handler to looper from a
worker thread to avoid long running tasks handling
for messages posted from UI thread.

- Move AppObserver Account onChange() handling
to worker thread instead of UI thread.

- Avoid running contentobserver for SMS/MMS instance on
main thread looper to fix ANR reported while handling
content changes for SMS and MMS listing. Add NPE checks
hit during stability testing.

Change-Id: Ie146cd284fd191f7c7be7f0c1e7ed4877b36ae76
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapService.java
5cd7c89d0e17a9176337a36a27792bab3dd76fe9 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Track ProfileState, register and unregister of BroadcastReceivers

Use Case:
1. Pair and connect with remote phone.
2. Verify successful profile connection.
3. Pair & Connect LE device.
4. Disconnect & Unpair LE device.
5. Reset BT multiple times.
6. Repeat above steps 50 times

Failure:
BT Crashed, failed to start MAP services after BT reset.

RootCause:
BT Crash for not handling following exceptions:

- java.lang.IllegalArgumentException: Receiver not registered
at: android.app.IntentReceiverLeaked: Service
com.android.bluetooth.map.BluetoothMapService
has leaked IntentReceiver com.android.bluetooth.map.BluetoothMapAppObserver:
Are you missing a call to unregisterReceiver()?

Fix:
- This issue is hit when onStop() for MAPService is triggered without onStart()
being triggered by the time shutdown process gets invoked.
- Track registration and unregistration for BluetoothMapAppObserver BroadcastReceiver
to fix IntentReceiver leaks and also added validation for the AppObserver Data.

Change-Id: Ia1c2160fef369bbff42e8da3ea7d925c483e0a12
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapService.java
0ce2b96bbb55ab21037168fa4912375e063b5e9a 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: CleanUp for SDP record in MAP Service shutdown

Remove SDP record per MAS Instance during MAP Service
shutdown procedure.
Add more relevant debug logging.

Change-Id: I222ad97d719b9a2c45db3ab8526dd3de9c553f3d
luetooth/map/BluetoothMapMasInstance.java
c3b54d78578345cca88f3694ec7735593fed13fe 11-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: GETMessagesLisitng include mandatory field always.

Pre condition:
Atleast one SMS is present in any of the folders
with no subject.

UseCase:
1. Connect MAP connection from MCE to DUT
2. Set folder to Telecom/msg/inbox
3. Execute MessageListing with the required data

Failure:
Mandatory field "subject" is not included for few entries
in messagesListing.

Fix:
For GETMessagesLisitng ensure blank subject string is
set to include this mandatory feild and handle possible
"null" value fetched from database.

Change-Id: Ie29a61c83b22db9008184090a2f5b17d1f34b72b
luetooth/map/BluetoothMapContent.java
0f67816e838489474a0c3c57a8d856f6d51ba45f 07-Jan-2016 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm.

Handle cleanup for timeout Intent and pending Intent
in cancelUserTimeoutAlarm API.

Change-Id: I4f4184785675b2deffa3be8c9dd70b2673020b51
luetooth/map/BluetoothMapService.java
1682d51711c917a440be14a600eb8ab89ad36f61 27-Oct-2015 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Handle possible NPE while disconnect map.

Precondition:
Verified with IOT: MecApp in MCE role

UseCase:
1. Connect MAS
2. Register Mas Instance via MNS
3. Disconnect MAS

Failure:
Bluetooth App crash sometimes when disconnect map profile.

Root Cause:
The issue is hit when MAS disconnect is finished before MNS unregister.
In this case NullpointerException is happening because of clearing
BluetoothMapContentObserver already as a part of cleanup.

Fix:
Handle Null pointer exception while last
MAS instance disconnect is handled before MNS
unregistration.

Change-Id: I4e72038a5ddc6c3ac8c515def57cb4f98fe87675
luetooth/map/BluetoothMapService.java
fc8dfd1e037cda063919d9160c9cdb604b9adfef 10-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Add MNS SDP Search during setNotificationRegistration.

Precondition:
Verified with remote MCE device that starts MNS server
only before issuing setNotification Registration to MSE.

Use Case:
1. Discover and Pair with MSE from MCE.
2. Connect to MSE on Mas insance 0.
3. Enable Notification Registration for MAS Instance 0

Failure:
MNS connection happens over RFCOMM
and MAS Instance is connected over L2CAP.

Root Cause:
Current design performs MNS SDP search only at the time
of successful MAS Instance Connect. MNS connect implementation
tries connection over insecure RFCOMM channel based on UUID
when MNS Server record is not available.

Fix:
Add implementation to check and perform MNS SDP search
if this info is not available when MCE requests
setNotificationRegistration. This fix is required to
handle MCE implementation that start MNS Sever and
expose SDP only before sending setNotificationRegistration.

Change-Id: If1e8d33dcac078f04d13b8bacf8e1d1513c119e1
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
86b9ddefbcc4e1abb4a3054bff3cb6a2a88f5966 22-Dec-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Declare and fetch only 'INTERESTED_MESSAGE_TYPE_CLAUSE' MMS.

Precondition:

Messaging App Settings configured to receive delivery reports for MMS.

Use Case:
Follow standard steps to perform messagesListing type MMS from MCE.
1. Connect to MSE on Mas instance 0.
2. Set Path to root.
3. Set Path to telecom.
4. Set Path to msg.
5. Set Path to inbox.
6. GET messagesListing type MMS.

Failure:
Extra entries like delivery reports that are stored in DB and
which are not user interested types are also included
in MSE messageListing for MMS type.

Fix:
OMA-TS-MMS-ENC MMS Standard defines many types in X-Mms-Message-Type.
Extra entries like delivery reports which is stored in DB are not
required to be shown to user, so these should be filtered, and
only m-send-req (128), m-retrieve-conf (132), m-notification-ind (130)
types should be fetched and shown to user in messageListing response.
This patch removes these unecessary message types from MMS Messaging Listing.

Change-Id: I1cb5d6e58477a32a89693f555a268e0855267b9a
luetooth/map/BluetoothMapContent.java
2dd6813dc36bff3bbb6c81f61b5321b0269673fb 21-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Synchronize notifcationReg reply and MNS connect action.

Use Case:
1. Connect to carkit
2. Disconnect connection with carkit.
3. Reconnect to carkit

Failure:
MNS Failure during Reconnection.
User will in some timing conditions not get notification
of new messages and then turns OFF/ON the carkit.
MAS is connected fine but for MNS car sends BAD REQUEST.

Root Cause:
This isssue is reported only with one particular carkit in MCE role,
where in MNS Connect request issued before acknowleding
the setNotificationReg Request.

Fix:
Synchronize handleRegistration method in handler thread to ensure
setNotificationReg response from MSE is sent before requesting
a MNS Connect to MCE.

Change-Id: I30559c643af7733754fce551b97e31543a0cb160
luetooth/map/BluetoothMapAccountLoader.java
luetooth/map/BluetoothMnsObexClient.java
73a94f90b838e767edd8a425353c159e02f6d4ee 28-Jan-2016 Satish Kodishala <skodisha@codeaurora.org> Send error for if VR is initiated during call.

Use case:
Connect to BT headset.
Make a call. Let the call audio be on BT headset.
Initiate voice recognition(VR) from BT headset.

Failure:
AG is not sending error for VR when initiated during call.
Headset might go into bad state if AG don't send error.

Rootcause:
AG is not sending error for VR when initiated during call.

Fix:
When VR is activated during call, send error response to headset.

Change-Id: Ib12d464fc6a6948ddf22250a65a9e5bfeb4a8fb1
luetooth/hfp/HeadsetStateMachine.java
8cadeab1bada7993f1c2ac83dee991a0741e4aa5 23-Mar-2016 Andre Eisenbach <eisenbach@google.com> Fixed merge error in BluetoothPbapVcardManager.java

Change-Id: Idf60aae9a94527479e3cc9c9552fc19ec15a396c
luetooth/pbap/BluetoothPbapVcardManager.java
6d40286e787c781579999354721c49cb5d0e6fb7 23-Mar-2016 Smriti Gupta <smritig@qti.qualcomm.com> Merge "PBAPS: Don\'t filter out DateTime when requested"
am: 57a0f6d

* commit '57a0f6de8be75aeab2c314b2b71a9b7056d6a1fd':
PBAPS: Don't filter out DateTime when requested
103f9712f63e0e2a5c3fef5bf0b98cfe77c3dc81 23-Mar-2016 Ajay Panicker <apanicke@google.com> Remove duplicate scan event definitions

Change-Id: I94c9e308101a56438212fc0305202ed719579d84
(cherry picked from commit 5bd9ecab4094b4873359463dc21af30410f3d448)
luetooth/gatt/GattService.java
9acaa72b63ab65373effae8e684f503006148f71 23-Mar-2016 Andre Eisenbach <eisenbach@google.com> Merge "resolve merge conflicts of c90db0f to nyc-dev-plus-aosp" into nyc-dev-plus-aosp
2f07b366ba0e42f37029e2ba79913fc5ea1a340b 23-Mar-2016 Ajay Panicker <apanicke@google.com> Add scan results to scan stats
am: e90db93

* commit 'e90db937c008f365f47e7199d6d86f9eb13bed1e':
Add scan results to scan stats
65f15bb051c1e0898a9cd2053f41f26c600a96fc 23-Mar-2016 Andre Eisenbach <eisenbach@google.com> resolve merge conflicts of c90db0f to nyc-dev-plus-aosp

Change-Id: Id0969c26659549c31f2947bede8c55bf7d366688
e90db937c008f365f47e7199d6d86f9eb13bed1e 09-Mar-2016 Ajay Panicker <apanicke@google.com> Add scan results to scan stats

Ex:
GATT Client Map
Entries: 1

no.nordicsemi.android.mcp
LE scans (started/stopped) : 3 / 3
Scan time in ms (min/max/avg/total): 3050 / 6901 / 4815 / 14447
Total number of results : 338
Last 3 scans :
1970/01/01 08:20:06 - 6901ms 0 results
1970/01/01 08:20:13 - 4496ms 171 results
1970/01/01 08:20:39 - 3050ms 167 results

Bug: 27294154
Change-Id: I32fd6da035f2c37302a105733ac6a9817547b7a3
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
cd03335b0e429a1851d84d238408eb6712c5f755 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "PBAPS: Enable contact search with full or part of given string"
am: 4cece2c

* commit '4cece2cfd1350ba525cb7058e7f80eee01cb2d0b':
PBAPS: Enable contact search with full or part of given string
09d367bdaeab9b64f1fa0b9c7465179872de6faf 14-Aug-2015 Smriti Gupta <smritig@qti.qualcomm.com> PBAPS: Don't filter out DateTime when requested

This only adds a special exception for DateTime,
the other "X-" fields are already filtered out since
for vcard 2.1, it is mandatory to provide DateTime
if requested by remote.

Change-Id: Ib25a9b085d5692548156068b9700e2b007c4bcee
luetooth/pbap/BluetoothPbapVcardManager.java
8c87f7204c1366928f1c6f68e72053f6566a0a88 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Fix ANR(s) in SAP server code"
am: 2f224e9

* commit '2f224e914e86bec65acd61ed2baadd2dea972ab0':
SAP: Fix ANR(s) in SAP server code
d799e680c488c802ccad4b3eb23df525a5f86b44 30-Nov-2015 Smriti Gupta <smritig@codeaurora.org> PBAPS: Fix duplicate entries fetched from database

Precondition
================
Have multple contacts with either same number or name in DUT

Steps to reproduce:
===================
1. Perform BT pairing from DUT->RD<1>
2. Search for name from remote.

Expected Result:
================
Single entry with the name should be returned

Actual Result:
==============
Single name entry with different numbers are duplicating

Fix
========
This patch will remove the duplicate entries having same handle
and name fetched from the database sometimes. The check was
there in the stock code but that was not sufficient and was
comparing with the previous value only if these are duplicates
and not with the whole list. I have updated this check to
compare the fetched value if the exact duplicate value
(same ID and NAME) is present in the final list of contacts
which is to be returned.

Change-Id: If32526076baed813d39ce298c307196b63bc46fd
luetooth/pbap/BluetoothPbapVcardManager.java
584d5b4b50936552a6b662ab5a0b910c49e65a9d 23-Nov-2015 Hemant Gupta <hemantg@codeaurora.org> PBAPS: Get vcard when asked in alphabetical order

Precondition:
=============
- PSE should have atleast 40 contacts with all alphabetical permutations

Step by Step procedure:
=======================
1. Establish PBAP session. Navigate to "Browse" Tab
2. Select telecom/pb.vcf on remote device and select "SETPHONEBOOK"
3. Select "Get Size" from remote device
4. Select default sorting, maxlistcount = 5000 and click "Search" to
browse phonebook
5. Select "Alphabetical" sorting, maxlistcount = 5000 and click "Search"
to browse phonebook

Actual Result
============================
After alphabetical sorting the contacts are displayed according to index
but not with sorted request

Expected result:
=========================
When contacts are sorted according to alphabets the contact info should
also be displayed according to contacts.

Root Cause:
========================
While quering vcard entry from database, proper checks of the order (indexed/alphabetical)
was not there in M Stock code compared to L Stock code.

Change-Id: Ie7990992b4dd22add3526aa0050121e680567bb8
luetooth/pbap/BluetoothPbapVcardManager.java
d5438b4bd3bdb1c1adae319540e01b288d0c768c 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Remove sdp record while BT is being turned off to prevent leak"
am: a51595c

* commit 'a51595cc0ea0b9d5e050b77e90fd4cdec512dc56':
SAP: Remove sdp record while BT is being turned off to prevent leak
47bb76e9b56df50c5de6cb14e02a9d2e12941e9e 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Fix issue of socket listener not getting re-started"
am: 8731128

* commit '8731128aa44e55278412647d60979a0643f32479':
SAP: Fix issue of socket listener not getting re-started
497613a155981294e5b30cc766f3cd4f2597fea8 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Update UI connection and notifications properly"
am: 61f1405

* commit '61f1405379888a6a3c6380e834243be4fd215f54':
SAP: Update UI connection and notifications properly
43b159084b4cdd0da8355b766c5c10fea4e12535 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "SAP: Handle disconnect request during call ongoing state"
am: 02be62d

* commit '02be62dd6c903bb5fd6043a055cecee3ddbb2c3d':
SAP: Handle disconnect request during call ongoing state
e6ac49ca0ed706b5a953b5cb953c335b2efde17a 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> PBAPS: Enable contact search with full or part of given string

Enables searching of text in contact name starting with a given
matching string instead of matching the complete string.

Change-Id: I91258391b7b7cb014d55e17e1ed3b92267a2c7da
luetooth/pbap/BluetoothPbapObexServer.java
a86b03167e6949f1afd0eb0e57c4339b6f8b5200 06-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix ANR(s) in SAP server code

Fix ANR in SAP Server code in following scenarios:

- Multiple call to stop in Sapservice leads to ANR, as check was not
present in stop to prevent unregistering BroadcastReceiver if not
already registred.
- Remove redundant call to closeServerSocket from initSocket as this could
lead to ANR when there is simultaneous call to closeService as part of BT
being switched off and call to start SAP as part of BT being turned on when
BT on off sequence is tried repeatedly.

Change-Id: Ia6bc5ca7c9da9ae4a4c12e8207fb9ff6b9159e82
luetooth/sap/SapService.java
0e0883602b97ed9bf2a86c49a93345c91da5167e 06-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Remove sdp record while BT is being turned off to prevent leak

Remove sdp record created dynamically for SAP server during BT off state.
Without this call, there is leak in sdp layer in stack as sdp record is
never removed, even though the socket is closed.
Also proper checks are added to prevent call to remove sdp record when
adapter is null.

Change-Id: I739cc3115f6cd7fedf9085e8522c96da257e9568
luetooth/sap/SapService.java
222d110bd00c9120f776c5893374d5427053e452 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix issue of socket listener not getting re-started

Add logic to properly handle ACL_DISCONNECTED to restart socketListener
to handle scenarios where socket listener was not getting started due to
abnormal ACL disconnect.

Change-Id: Iac5ec52f485e692b14bb0065e30a68cae007a49d
luetooth/sap/SapService.java
987a8cdbdc36548f76ad63fc5ab33f8b3ce2f69a 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Update UI connection and notifications properly

Update connection state to upper layers only when SAP SLC is connected
i.e. status indication is sent to SAP Client.
Also notification to disconnect SAP Server from UI is shown only when SAP
is successfully connected, and not when SapServer object is created.

Change-Id: Iaf40584220b51f6193bed9a54d159cffd32698e9
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
b8984f61f6fd31fd25e37745e8ba505ca287b274 07-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> SAP: Handle disconnect request during call ongoing state

Handle disconnect request during call ongoing state properly.
Previously if disconnect was received from SAP client while in
call ongoing state, it was not handled properly, leading to
Server not sending the DISCONNECT response thereby violating
Bluetooth SAP Specification.

Change-Id: I666fab4b4513abfa00df4be5b3a7aab95d5f0331
luetooth/sap/SapServer.java
1e2b7186e57e3012f0f0ea07b6e8bc568efb1270 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Update share status when interrupted at remote side."
am: f4de2e0

* commit 'f4de2e0631c0a2f553c27b2351c0d13fba481466':
OPP: Update share status when interrupted at remote side.
cd75ef686d87fdda970edd0c6b19958398f9cc85 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "OPP: Use long instead of int"
am: 245367e

* commit '245367e89200c59be5d65959e10e0a91a13dc288':
OPP: Use long instead of int
076020e00e229bfbcf268372ef65b93ef35ec4b9 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Fix ANR for blocking operations on UI thread"
am: 5c20542

* commit '5c205429a8003a68fd189915c5265296388b9e08':
MAP: Fix ANR for blocking operations on UI thread
f3c25c8805f790ada5f3e2b11e8b1d816b3cffa7 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Track ProfileState, register and unregister of BroadcastReceivers"
am: dc85454

* commit 'dc85454495d48056ca8bb190a908d4c9889583da':
MAP: Track ProfileState, register and unregister of BroadcastReceivers
cb136395d7977aaa85ee0840a976c77ca811647f 11-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> OPP: Update share status when interrupted at remote side.

Use case:
1) Select a file on DUT and send to Remote device through OPP
2) Accept the incoming file on Remote
3) While file transfer is in progress, stop the file transfer on Remote.
4) Again send the same file or different file to the same Remote Device.

Result:
OPP file transfer does not start.

Fix:
Update interrupted outbound content resolver entry when
Transfer is stopped at remote side. Otherwise DUT fails
To push OPP file after earlier OPP file is stopped on
Remote Device.

Change-Id: I9944bdd47ff9e31d0f9f8a157592e407e000e96c
luetooth/opp/BluetoothOppObexClientSession.java
def48bd39db63087d076d2eacdef1d496394b2d8 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> OPP: Use long instead of int

Use long instead of int data type in OPP Java code to prevent
overflow of timestamp and filesize during transfer of large files
which caused transfer failures.

Change-Id: I58c9b49f59d47f6f162156eb6594e66731732580
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
a52089aeccde8a98cc185a44c8319e719b00e016 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: CleanUp for SDP record in MAP Service shutdown"
am: f9e3eaa

* commit 'f9e3eaa9528d75986a8e50a97c73692e4c9ba638':
MAP: CleanUp for SDP record in MAP Service shutdown
500cee667e75207745374921890c610d5e6fb40c 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: GETMessagesLisitng include mandatory field always."
am: 68277e5

* commit '68277e56f5ba90d51e83f5b0027b97f8c9add354':
MAP: GETMessagesLisitng include mandatory field always.
b6fdf260e28b4eb6b5cdb19f53710c0470ffcad2 11-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix ANR for blocking operations on UI thread

UseCase:
Stability Testing steps followed:
1. Pair and connect with remote phone.
2. Verify successful profile connection.
3. Pair & Connect LE device.
4. Disconnect & Unpair LE device.
5. Reset BT multiple times.
6. Repeat above steps 50 times

Failure:
ANR(s) reported for long running operations perfromed on main thread.

Fix:
- Attach MAPService session handler to looper from a
worker thread to avoid long running tasks handling
for messages posted from UI thread.

- Move AppObserver Account onChange() handling
to worker thread instead of UI thread.

- Avoid running contentobserver for SMS/MMS instance on
main thread looper to fix ANR reported while handling
content changes for SMS and MMS listing. Add NPE checks
hit during stability testing.

Change-Id: Ie146cd284fd191f7c7be7f0c1e7ed4877b36ae76
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapService.java
b74f5d74e2cd2e55895d0a5bcaf6daa195b91b6c 23-Mar-2016 Ashwini Munigala <AshwiniM@codeaurora.org> Merge "MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm."
am: da10fe7

* commit 'da10fe73a8f19cc4e28213bd353b412aca5680f2':
MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm.
19a1a8259c6352b1afe4f86034708221a87594e5 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: Track ProfileState, register and unregister of BroadcastReceivers

Use Case:
1. Pair and connect with remote phone.
2. Verify successful profile connection.
3. Pair & Connect LE device.
4. Disconnect & Unpair LE device.
5. Reset BT multiple times.
6. Repeat above steps 50 times

Failure:
BT Crashed, failed to start MAP services after BT reset.

RootCause:
BT Crash for not handling following exceptions:

- java.lang.IllegalArgumentException: Receiver not registered
at: android.app.IntentReceiverLeaked: Service
com.android.bluetooth.map.BluetoothMapService
has leaked IntentReceiver com.android.bluetooth.map.BluetoothMapAppObserver:
Are you missing a call to unregisterReceiver()?

Fix:
- This issue is hit when onStop() for MAPService is triggered without onStart()
being triggered by the time shutdown process gets invoked.
- Track registration and unregistration for BluetoothMapAppObserver BroadcastReceiver
to fix IntentReceiver leaks and also added validation for the AppObserver Data.

Change-Id: Ia1c2160fef369bbff42e8da3ea7d925c483e0a12
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapService.java
4b26248d63bafbd864fba91f0b9c904d228b0385 10-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: CleanUp for SDP record in MAP Service shutdown

Remove SDP record per MAS Instance during MAP Service
shutdown procedure.
Add more relevant debug logging.

Change-Id: I222ad97d719b9a2c45db3ab8526dd3de9c553f3d
luetooth/map/BluetoothMapMasInstance.java
1fd6b9280f90c1dc50e682d19a01a993a4540b8d 23-Mar-2016 Ashwini Munigala <AshwiniM@codeaurora.org> Merge "MAP: Handle possible NPE while disconnect map."
am: 7cbec75

* commit '7cbec75e7310370c6cb03cfcc48dc4ff1db951c8':
MAP: Handle possible NPE while disconnect map.
fb21ad82f677817d7ffac060e5230f0387d33643 23-Mar-2016 Ashwini Munigala <AshwiniM@codeaurora.org> Merge "MAP: Add MNS SDP Search during setNotificationRegistration."
am: 9556063

* commit '9556063902bda98d28a0942509f94ea6973ebba9':
MAP: Add MNS SDP Search during setNotificationRegistration.
2d55a876d9031c5a56b98431cb148a05b220d428 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Declare and fetch only \'INTERESTED_MESSAGE_TYPE_CLAUSE\' MMS."
am: 5bc6229

* commit '5bc6229907607e2857e603f4a5010851b3479b7d':
MAP: Declare and fetch only 'INTERESTED_MESSAGE_TYPE_CLAUSE' MMS.
aa852f71699b29af8353d596f2ddaba6cf2a1ae0 11-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> MAP: GETMessagesLisitng include mandatory field always.

Pre condition:
Atleast one SMS is present in any of the folders
with no subject.

UseCase:
1. Connect MAP connection from MCE to DUT
2. Set folder to Telecom/msg/inbox
3. Execute MessageListing with the required data

Failure:
Mandatory field "subject" is not included for few entries
in messagesListing.

Fix:
For GETMessagesLisitng ensure blank subject string is
set to include this mandatory feild and handle possible
"null" value fetched from database.

Change-Id: Ie29a61c83b22db9008184090a2f5b17d1f34b72b
luetooth/map/BluetoothMapContent.java
8458fc313d1e9f072efc03a331dce151d476c596 07-Jan-2016 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Cleanup PendingIntent in cancelUserTimeoutAlarm.

Handle cleanup for timeout Intent and pending Intent
in cancelUserTimeoutAlarm API.

Change-Id: I4f4184785675b2deffa3be8c9dd70b2673020b51
luetooth/map/BluetoothMapService.java
d798065556066d1ea3c679df112553aa9112b0f3 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Synchronize notifcationReg reply and MNS connect action."
am: 075283f

* commit '075283fe6272b77521511bf26ac2516146532cbc':
MAP: Synchronize notifcationReg reply and MNS connect action.
421d92eba334eb7082928c456c706182b08f4183 23-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Synchronize mMsgList to avoid extra MessageDeleted MNS event"
am: 3b377be

* commit '3b377bee36cd6f5427f48feaa4f921a6d902cf01':
MAP: Synchronize mMsgList to avoid extra MessageDeleted MNS event
ce52d7f87eaac401d7d3db75db6b505098989295 27-Oct-2015 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Handle possible NPE while disconnect map.

Precondition:
Verified with IOT: MecApp in MCE role

UseCase:
1. Connect MAS
2. Register Mas Instance via MNS
3. Disconnect MAS

Failure:
Bluetooth App crash sometimes when disconnect map profile.

Root Cause:
The issue is hit when MAS disconnect is finished before MNS unregister.
In this case NullpointerException is happening because of clearing
BluetoothMapContentObserver already as a part of cleanup.

Fix:
Handle Null pointer exception while last
MAS instance disconnect is handled before MNS
unregistration.

Change-Id: I4e72038a5ddc6c3ac8c515def57cb4f98fe87675
luetooth/map/BluetoothMapService.java
e6564029f132077c8a4877431a95899db201e506 10-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Add MNS SDP Search during setNotificationRegistration.

Precondition:
Verified with remote MCE device that starts MNS server
only before issuing setNotification Registration to MSE.

Use Case:
1. Discover and Pair with MSE from MCE.
2. Connect to MSE on Mas insance 0.
3. Enable Notification Registration for MAS Instance 0

Failure:
MNS connection happens over RFCOMM
and MAS Instance is connected over L2CAP.

Root Cause:
Current design performs MNS SDP search only at the time
of successful MAS Instance Connect. MNS connect implementation
tries connection over insecure RFCOMM channel based on UUID
when MNS Server record is not available.

Fix:
Add implementation to check and perform MNS SDP search
if this info is not available when MCE requests
setNotificationRegistration. This fix is required to
handle MCE implementation that start MNS Sever and
expose SDP only before sending setNotificationRegistration.

Change-Id: If1e8d33dcac078f04d13b8bacf8e1d1513c119e1
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
1ce48531cb795d2ca180e3d92c044d3fac72e022 22-Dec-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Declare and fetch only 'INTERESTED_MESSAGE_TYPE_CLAUSE' MMS.

Precondition:

Messaging App Settings configured to receive delivery reports for MMS.

Use Case:
Follow standard steps to perform messagesListing type MMS from MCE.
1. Connect to MSE on Mas instance 0.
2. Set Path to root.
3. Set Path to telecom.
4. Set Path to msg.
5. Set Path to inbox.
6. GET messagesListing type MMS.

Failure:
Extra entries like delivery reports that are stored in DB and
which are not user interested types are also included
in MSE messageListing for MMS type.

Fix:
OMA-TS-MMS-ENC MMS Standard defines many types in X-Mms-Message-Type.
Extra entries like delivery reports which is stored in DB are not
required to be shown to user, so these should be filtered, and
only m-send-req (128), m-retrieve-conf (132), m-notification-ind (130)
types should be fetched and shown to user in messageListing response.
This patch removes these unecessary message types from MMS Messaging Listing.

Change-Id: I1cb5d6e58477a32a89693f555a268e0855267b9a
luetooth/map/BluetoothMapContent.java
189cc4ca1c36018977e7b9ad62b07ddbefc7f2ba 21-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Synchronize notifcationReg reply and MNS connect action.

Use Case:
1. Connect to carkit
2. Disconnect connection with carkit.
3. Reconnect to carkit

Failure:
MNS Failure during Reconnection.
User will in some timing conditions not get notification
of new messages and then turns OFF/ON the carkit.
MAS is connected fine but for MNS car sends BAD REQUEST.

Root Cause:
This isssue is reported only with one particular carkit in MCE role,
where in MNS Connect request issued before acknowleding
the setNotificationReg Request.

Fix:
Synchronize handleRegistration method in handler thread to ensure
setNotificationReg response from MSE is sent before requesting
a MNS Connect to MCE.

Change-Id: I30559c643af7733754fce551b97e31543a0cb160
luetooth/map/BluetoothMapAccountLoader.java
luetooth/map/BluetoothMnsObexClient.java
ea6b2c977e8a621f160f37ef0d36db91d5c29834 21-Aug-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Synchronize mMsgList to avoid extra MessageDeleted MNS event

Precondition:
There are no messages in Messaging App.

Use Case:
1. Connect to MSE on Mas insance 0,
Register and Enable Event Notifications from any MCE.
2. Set Path to root.
3. Set Path to telecom.
4. Set Path to msg.
5. Set Path to outbox.
6. Compose an SMS and add the recipient.
7. Click PushMessage option.

Failure:
Map Server sends a unexpected MessageDeleted EventReport Notification
even though PushMessage received from MCE is processed Successfully.

Root Cause:
Issue happens only for one corner case, where onChange() gets triggered
while processing a local initiated pushMsg before the entry is appended
to database, as local MsgListSms contains an extra entry for newly added
msg from MCE.

Fix:
Synchronize contentObserver mMsgList SMS/MMS to update list with
local initiated changes before fetching complete database list and
handling onChange() to avoid extra MessageDeleted MNS event.

Change-Id: Id4d5dad4d2b4b1e17f40218c11d13e39c9b885a0
luetooth/map/BluetoothMapContentObserver.java
441ed84bc2f16e8ad7a398e15a587e4ac95abcd3 23-Mar-2016 Satish Kodishala <skodisha@codeaurora.org> Merge "Send error for if VR is initiated during call."
am: a43811a

* commit 'a43811a9c6945aeb8c5ca8a15412c5913e2dad24':
Send error for if VR is initiated during call.
b23390c15910de8b127d23bfdc7c9b6ae215a7b4 28-Jan-2016 Satish Kodishala <skodisha@codeaurora.org> Send error for if VR is initiated during call.

Use case:
Connect to BT headset.
Make a call. Let the call audio be on BT headset.
Initiate voice recognition(VR) from BT headset.

Failure:
AG is not sending error for VR when initiated during call.
Headset might go into bad state if AG don't send error.

Rootcause:
AG is not sending error for VR when initiated during call.

Fix:
When VR is activated during call, send error response to headset.

Change-Id: Ib12d464fc6a6948ddf22250a65a9e5bfeb4a8fb1
luetooth/hfp/HeadsetStateMachine.java
ada0b77f78517b1080aa2afc20ad2d5bc51d5137 22-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Fix register for notification logic
am: 55296d1

* commit '55296d1fb8e3daef4681205a9591f0af522b099e':
Fix register for notification logic
55296d1fb8e3daef4681205a9591f0af522b099e 22-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Fix register for notification logic

Bug: 27790582
Change-Id: I118071b907ec16faad401ba6583ca395d08d6d6e
luetooth/gatt/GattService.java
ba4bab5dddac41d46f683eb215662eba78aeb3bd 22-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Fix register for notification logic

Bug: 27790582
Change-Id: I118071b907ec16faad401ba6583ca395d08d6d6e
luetooth/gatt/GattService.java
d0deca6c54d636957c3602e8e0cd966f3671ea42 22-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP abort operations when disconnected" into nyc-dev
am: d7bdccf

* commit 'd7bdccf934d5dfb7407dd024f44dbaf93b7d193b':
PBAP abort operations when disconnected
d7bdccf934d5dfb7407dd024f44dbaf93b7d193b 22-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Merge "PBAP abort operations when disconnected" into nyc-dev
32dc7a6b919375aede777f3c821fa316d85449ae 17-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Use handles to identify GATT attributes (3/4)

Bug: 27778668
Change-Id: Id6ec1229998c9fc2ecd4d0a908405a7148703bec
luetooth/gatt/CallbackInfo.java
luetooth/gatt/GattService.java
02a821a0df99bdef55d2282530e13541fee8d36f 02-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Change how services are passed up to the stack

Bug: 27455533
Change-Id: I4c8218fb4c7437ab4597071ad9b580a797e34339
luetooth/gatt/GattService.java
aa935f98f6c200298325027705b9ea031fce3467 26-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Get whole GATT db, instead of one by one element.

This patch uses new get_gatt_db method instead of current set of
callback to obtain GATT db.t

Bug: 27455533
Change-Id: I52e12253dd850ce8de35297c941638189cbbed1e
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/SearchQueue.java
78a98c05ae0c872bbbbb6e7ba1b6768fbc272849 22-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Use handles to identify GATT attributes (3/4)"
am: 65acaf4

* commit '65acaf4cd11df55c810984184513aeb7205fb538':
Use handles to identify GATT attributes (3/4)
5900a31a8c9b07d131cf83331c0073b057972a60 17-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Use handles to identify GATT attributes (3/4)

Bug: 27778668
Change-Id: Id6ec1229998c9fc2ecd4d0a908405a7148703bec
luetooth/gatt/CallbackInfo.java
luetooth/gatt/GattService.java
fae6b54e8d3edf8c890ca3be212b27d591acad03 21-Mar-2016 Andre Eisenbach <eisenbach@google.com> Make sure wakelock is held before releaseing it

Bug: 27748109
Change-Id: I38c8ec640f5def7c53348d2dd96a0a2492ff00cc
luetooth/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
luetooth/btservice/AdapterService.java
7a3cfba99e1e99c937901fb1695c97b954f34121 21-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> PBAP abort operations when disconnected

Push long running activities relating to the contacts database onto its
own thread such that the main service thread can remain responsive to
new bluetooth requests.

Bug: 27697738
Change-Id: I0202962a49d6a0279b5672152955840dd02bdf31
luetooth/pbapclient/CallLogPullRequest.java
luetooth/pbapclient/PbapPCEClient.java
luetooth/pbapclient/PhonebookPullRequest.java
luetooth/pbapclient/PullRequest.java
844518bb897a099f333c3d3b980f0c36721834ae 22-Mar-2016 Sanket Agarwal <sanketa@google.com> Forward in iPhone leads to play state being presisted as STOP.
am: 26469ff

* commit '26469ff3f9f4ab96ad288e0934220023a0c159f1':
Forward in iPhone leads to play state being presisted as STOP.
26469ff3f9f4ab96ad288e0934220023a0c159f1 21-Mar-2016 Sanket Agarwal <sanketa@google.com> Forward in iPhone leads to play state being presisted as STOP.

When we press forward in iPhone (via AVRCP pass through or iPhone UI)
while connected over AVRCP we are resetting the state and expecting
AVRCP to give us a new play state when next song resumes. Turns out that
iPhone always keeps it state to be Playing.

The fix is to keep the mRemoteMediaPlayers a replica of what AVRCP says
so that when song resumes (from A2dpSinkService via startAvrcpUpdates)
we can restore the playing state.

Tested on iPhone and regression tested on Nexus 5X.

Bug: b/27768620
Change-Id: I8caf56072fa5743f28e1680860c161d3cd75b83c
luetooth/avrcp/AvrcpControllerService.java
5b849d6b99e07d9b0e09eef7c38baacabda69522 21-Mar-2016 Andre Eisenbach <eisenbach@google.com> Make sure wakelock is held before releaseing it
am: e94f8eb

* commit 'e94f8eb85b68b351319499337af937835730b508':
Make sure wakelock is held before releaseing it
e94f8eb85b68b351319499337af937835730b508 21-Mar-2016 Andre Eisenbach <eisenbach@google.com> Make sure wakelock is held before releaseing it

Bug: 27748109
Change-Id: I38c8ec640f5def7c53348d2dd96a0a2492ff00cc
luetooth/btservice/AdapterService.java
9d906fca22eec9173ccdfe89a2daaf484f017683 21-Mar-2016 Ajay Panicker <apanicke@google.com> Merge "Add scan results to scan stats"
am: 7296f05

* commit '7296f0530c435e88df31d08519705a0517943b5a':
Add scan results to scan stats
c30f06668bc683b13319a33775ee8f9def3283c8 09-Mar-2016 Ajay Panicker <apanicke@google.com> Add scan results to scan stats

Ex:
GATT Client Map
Entries: 1

no.nordicsemi.android.mcp
LE scans (started/stopped) : 3 / 3
Scan time in ms (min/max/avg/total): 3050 / 6901 / 4815 / 14447
Total number of results : 338
Last 3 scans :
1970/01/01 08:20:06 - 6901ms 0 results
1970/01/01 08:20:13 - 4496ms 171 results
1970/01/01 08:20:39 - 3050ms 167 results

Bug: 27294154
Change-Id: I32fd6da035f2c37302a105733ac6a9817547b7a3
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
9eded69b7d3d306ca1ffbf6dee1ab0aa1e3b8b51 18-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Change how services are passed up to the stack"
am: d8166b9

* commit 'd8166b935f0a973b52b74149ae542146e4b30df2':
Change how services are passed up to the stack
c02f775acced5eb0fd059ad2383a7cae7de4e478 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not delete/re-create wakelock on acquisition/release
am: 00a465e

* commit '00a465ed6160246b369629b6777836a4d1b11834':
Do not delete/re-create wakelock on acquisition/release
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
luetooth/btservice/AdapterService.java
3f8fcc331cb4491f406f8bffef47e5c542893903 02-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Change how services are passed up to the stack

Bug: 27455533
Change-Id: I4c8218fb4c7437ab4597071ad9b580a797e34339
luetooth/gatt/GattService.java
fe417f3193996cdcb21501d522da34c000e778c8 16-Mar-2016 Joseph Pirozzo <pirozzoj@google.com> Implement PBAP PCE client role service.
am: b874a1d1cf

* commit 'b874a1d1cf25f90947ba87f791d42a404cad7d85':
Implement PBAP PCE client role service.
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
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
luetooth/pbapclient/AuthenticationService.java
luetooth/pbapclient/Authenticator.java
luetooth/pbapclient/BluetoothPbapCard.java
luetooth/pbapclient/BluetoothPbapClient.java
luetooth/pbapclient/BluetoothPbapObexAuthenticator.java
luetooth/pbapclient/BluetoothPbapObexSession.java
luetooth/pbapclient/BluetoothPbapObexTransport.java
luetooth/pbapclient/BluetoothPbapRequest.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBook.java
luetooth/pbapclient/BluetoothPbapRequestPullPhoneBookSize.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardEntry.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListing.java
luetooth/pbapclient/BluetoothPbapRequestPullVcardListingSize.java
luetooth/pbapclient/BluetoothPbapRequestSetPath.java
luetooth/pbapclient/BluetoothPbapSession.java
luetooth/pbapclient/BluetoothPbapVcardList.java
luetooth/pbapclient/BluetoothPbapVcardListing.java
luetooth/pbapclient/CallLogPullRequest.java
luetooth/pbapclient/PbapClientService.java
luetooth/pbapclient/PbapHandler.java
luetooth/pbapclient/PbapPCEClient.java
luetooth/pbapclient/PhonebookEntry.java
luetooth/pbapclient/PhonebookPullRequest.java
luetooth/pbapclient/PullRequest.java
luetooth/pbapclient/utils/BmsgTokenizer.java
luetooth/pbapclient/utils/ObexAppParameters.java
luetooth/pbapclient/utils/ObexTime.java
be1170c4b8e58b1964b9fd730b88a9a33b90cb88 15-Mar-2016 Sanket Agarwal <sanketa@google.com> Merge "HFP is exposed via Telecom ConnectionService." into nyc-dev
am: 8b9e874162

* commit '8b9e874162c99178d0a3a857dce1f76ebfc55b57':
HFP is exposed via Telecom ConnectionService.
8b9e874162c99178d0a3a857dce1f76ebfc55b57 14-Mar-2016 Sanket Agarwal <sanketa@google.com> Merge "HFP is exposed via Telecom ConnectionService." into nyc-dev
41093afc1f5a9109f414e942985f25e74758e8c6 14-Mar-2016 Ajay Panicker <apanicke@google.com> Print bluetooth state as a string

Bug: 27294154
Change-Id: I992f720d94be1f0762424ebad36ec1b6af58600b
luetooth/btservice/AdapterService.java
c5c743673b1099aac4dbc36577b6ead625e09e10 14-Mar-2016 Ajay Panicker <apanicke@google.com> Merge "Print bluetooth state as a string"
am: e3a3acf3e0

* commit 'e3a3acf3e0b69b27540922bb71770d9b019f1217':
Print bluetooth state as a string
f7f1a09d1345bef9cf2ebc34af35336b7fd0007f 14-Mar-2016 Ajay Panicker <apanicke@google.com> Print bluetooth state as a string

Bug: 27294154
Change-Id: I992f720d94be1f0762424ebad36ec1b6af58600b
luetooth/btservice/AdapterService.java
a9ad98ec1222093baecd70b32611c3a74ba7f2d8 10-Mar-2016 Sanket Agarwal <sanketa@google.com> HFP is exposed via Telecom ConnectionService.

Telecom provides a ConnectionService mechanism where in order to make
calls you only need to provide the right phone account (which can be
queried using a predefined scheme).

This change adds a new middleware called ConnectionService which
provides a translation medium from Bluetooth <-> Telecom. Anyone who
wishes to use HFP HF role can then simply use TelecomManager (and
TelecomManager's InCallService) interfaces.

Bug: b/26757899

Change-Id: I66e47b6ff6330cfd9040a4a6cf4edadac28d63de
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hfpclient/connserv/HfpClientConference.java
luetooth/hfpclient/connserv/HfpClientConnection.java
luetooth/hfpclient/connserv/HfpClientConnectionService.java
1be5eb16d4e3af4ab74270a91b055c5e197fcf87 09-Mar-2016 Ajay Panicker <apanicke@google.com> Add enabled time to dump output
am: b03b1ce32f

* commit 'b03b1ce32fe4f39139d9f62b002cf329a0cd72aa':
Add enabled time to dump output
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
luetooth/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
luetooth/btservice/AdapterService.java
cd58100530d5330a23a2fb8837a2d4cf7fe21953 09-Mar-2016 Ajay Panicker <apanicke@google.com> Move ScanStats to its own file
am: 7a068c2a08

* commit '7a068c2a0861e12a3916cec313cf105395871999':
Move ScanStats to its own file
7a068c2a0861e12a3916cec313cf105395871999 02-Mar-2016 Ajay Panicker <apanicke@google.com> Move ScanStats to its own file

ScanStats was growing too large and had many components so
it was moved into its own file.

Bug: 27294154
Change-Id: Ic20c9e74d5d8b074f7e966625fb1bffab6c94f2d
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
f89e6ff031d6e1dcbf393e4b30728bf0e3022b69 09-Mar-2016 Sanket Agarwal <sanketa@google.com> AutoConnect A2DP and HFP for Car Kitt roles.
am: f848f42a0e

* commit 'f848f42a0ec33519a8143f01a1acfe835e2cd1bc':
AutoConnect A2DP and HFP for Car Kitt roles.
b7af521b6c2d1ccaaea687207dfbcd0c34489a3c 02-Mar-2016 Ajay Panicker <apanicke@google.com> Move ScanStats to its own file

ScanStats was growing too large and had many components so
it was moved into its own file.

Bug: 27294154
Change-Id: Ic20c9e74d5d8b074f7e966625fb1bffab6c94f2d
luetooth/gatt/AppScanStats.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.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
luetooth/btservice/AdapterService.java
d774f39fbe5460673601ec35554a6cc4693ab483 08-Mar-2016 Sanket Agarwal <sanketa@google.com> Audio Focus for A2DP.
am: 94a38610a1

* commit '94a38610a17e019818719cfecde1b3e80601a2bd':
Audio Focus for A2DP.
94a38610a17e019818719cfecde1b3e80601a2bd 12-Feb-2016 Sanket Agarwal <sanketa@google.com> Audio Focus for A2DP.

When AVRCP is available we provide the following focus management on
SINK role:
a) Both AVRCP CT and AVRCP TG can notify the A2DP SNK about play status
change. A2DP SNK will only play when either CT or TG says play.
b) If AVRCP does not exist or neither of CT or TG have explicitly said
play (pass through or notification) then we simply throw away the data.

TODO:
Implement additional policy where we take the data from the A2DP SRC
irrespective of whether AVRCP exists or not. This should be implemented
as a separate streaming state machine and we should be able to flip the
state machine at run time (via settings app).

Bug: b/26928143

Change-Id: Ie5fab15ba4cdd5738c59fa646ca0824770489ec5
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpSinkStreamingStateMachine.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/avrcp/AvrcpControllerService.java
1172d642bb8888c979f735e20c0d689bd2b9d45b 07-Mar-2016 Franck Lenormand <franckx.lenormand@intel.com> Merge "Prevent javacrash when TELEPHONY_SERVICE is not found" am: 8367ebbea6
am: 5dc01a914a

* commit '5dc01a914a741406be9a1204c75411db481fd813':
Prevent javacrash when TELEPHONY_SERVICE is not found
5dc01a914a741406be9a1204c75411db481fd813 07-Mar-2016 Franck Lenormand <franckx.lenormand@intel.com> Merge "Prevent javacrash when TELEPHONY_SERVICE is not found"
am: 8367ebbea6

* commit '8367ebbea6f2298736457345cefe28882ef2e60a':
Prevent javacrash when TELEPHONY_SERVICE is not found
ec61e0d95c3feb6fa49e88b473e6b2fa5cddcc3a 08-Apr-2015 Franck Lenormand <franckx.lenormand@intel.com> Prevent javacrash when TELEPHONY_SERVICE is not found

The API context.getSystemService can return NULL
A Javacrash can happend when trying to obtain the TELEPHONY_SERVICE
and getting null instead.

The patch warn about the value of the instance of the service returned.
It also log and prevent its use in function startListenForPhoneState and
stopListenForPhoneState.

If the TELEPHONY_SERVICE is not available, the internal variables wont
change.

Change-Id: I9e4abc88a58f7f037bbc4f3f7c1cf1b44328ce38
Signed-off-by: franck Lenormand <franckx.lenormand@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
luetooth/hfp/HeadsetPhoneState.java
b525b4317c610c1e5d1b2a0c6afee53896dfecca 04-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Support messageListing PARAMETER_MASK_ALL_ENABLED by default." am: 6dfb1505ad
am: 0a5cbbd020

* commit '0a5cbbd02046f5b1c9348ed7305d02c89c41da54':
MAP: Support messageListing PARAMETER_MASK_ALL_ENABLED by default.
0a5cbbd02046f5b1c9348ed7305d02c89c41da54 04-Mar-2016 Hemant Gupta <hemantg@codeaurora.org> Merge "MAP: Support messageListing PARAMETER_MASK_ALL_ENABLED by default."
am: 6dfb1505ad

* commit '6dfb1505ade8b7543f1ffaaf28d80f4bcac45ab8':
MAP: Support messageListing PARAMETER_MASK_ALL_ENABLED by default.
281a499162f86d2ce148b5020bfcfc277b84c5b9 22-Dec-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Support messageListing PARAMETER_MASK_ALL_ENABLED by default.

Support application parameter mask to enable and send across
all optional and mandatory feilds in GET messagesListing response
instead of only mandatory feilds to handle IOT Specific behavior
that donot include parameter mask attribute in messageListing request.

Some carkits in MCE role show read messages as unread when
"read" feild (optional) is not included in messagesListing
response by default.

Change-Id: I1fc65d85c35573e21d0c9d5bfdefd58de2dcf3ae
luetooth/map/BluetoothMapContent.java
dad6e6b3fa311bd3c79a475b09dd037cfc5aeeaf 04-Mar-2016 AnubhavGupta <anubhavg@codeaurora.org> Merge "Stop accessing statemachine after cleanup" am: 0ef82f788d
am: ee8ae43488

* commit 'ee8ae434883c521c1f1ca7b371279d76717104b1':
Stop accessing statemachine after cleanup
ee8ae434883c521c1f1ca7b371279d76717104b1 04-Mar-2016 AnubhavGupta <anubhavg@codeaurora.org> Merge "Stop accessing statemachine after cleanup"
am: 0ef82f788d

* commit '0ef82f788d6362b21a06792d3189a7a57ff9be38':
Stop accessing statemachine after cleanup
d5fbe937a40abe94a93ef318d23f3c7a4ee869e7 04-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Resolve merge conflicts of c85dd0c175 to nyc-dev-plus-aosp

Change-Id: Ie575fc196f392853959ee6ab60d1011987ec7a29
bd177ad722fe0cdcd5b23a72db077f8688fbde35 15-Sep-2015 AnubhavGupta <anubhavg@codeaurora.org> Stop accessing statemachine after cleanup

Usecase:
-pair and connect DUT with Remote
-Start A2DP streaming
-Initiate disconnection from DUT

Failure:
Bluetoth crashed after initiating disconnect from DUT

Rootcause:
Accessing state machine context after cleanup.

Fix:
Bluetooth: Added null check to stop accessing state machine after cleanup

Change-Id: I85ca55aaa0b7604125e45a62e32ae02eca605e43
luetooth/a2dp/A2dpSinkService.java
c85dd0c175b04c860dce93200a94582f5ec0b9a5 04-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Merge "Get whole GATT db, instead of one by one element."
am: 34ab8dd613

* commit '34ab8dd6136e674715d2732d0b610cb36008a720':
Get whole GATT db, instead of one by one element.
418f1c1e242313ab8b83eb9e38ffeee52e6e9445 26-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Get whole GATT db, instead of one by one element.

This patch uses new get_gatt_db method instead of current set of
callback to obtain GATT db.t

Bug: 27455533
Change-Id: I52e12253dd850ce8de35297c941638189cbbed1e
luetooth/gatt/GattDbElement.java
luetooth/gatt/GattService.java
luetooth/gatt/SearchQueue.java
4197f6ea729b046ccdd19df2513b67253059ae83 03-Mar-2016 Wei Wang <weiwa@google.com> Merge "Fix a bug where batch scan wasn\'t stopped correctly." into nyc-dev
am: a2821fd1fe

* commit 'a2821fd1fe8770c5e6f82be3f3eb5b7ed895e958':
Fix a bug where batch scan wasn't stopped correctly.
a2821fd1fe8770c5e6f82be3f3eb5b7ed895e958 03-Mar-2016 Wei Wang <weiwa@google.com> Merge "Fix a bug where batch scan wasn't stopped correctly." into nyc-dev
15503005c966ce10a4fa57a5499dcb92e392407c 03-Mar-2016 Satish Kodishala <skodisha@codeaurora.org> Merge "Proper handling of BTRH command in HFP client" am: e8915edfdc
am: a4a71837ad

* commit 'a4a71837ad54fd1d9717df7ca53f41cde8d97461':
Proper handling of BTRH command in HFP client
a4a71837ad54fd1d9717df7ca53f41cde8d97461 03-Mar-2016 Satish Kodishala <skodisha@codeaurora.org> Merge "Proper handling of BTRH command in HFP client"
am: e8915edfdc

* commit 'e8915edfdc2d0c28d1dec94ae848566f6f7de471':
Proper handling of BTRH command in HFP client
5d416dcbe1ef10b66c1203530d101c2a82716b01 11-Feb-2016 Satish Kodishala <skodisha@codeaurora.org> Proper handling of BTRH command in HFP client

Usecase:
1. Enable hf client role and connect to AG.
2. Run PTS test case RHH/BV-04.

Failure:
PTS test case fails since the test expects the call to be active.

Rootcause:
Hf client is not sending AT+BTRH for accepting held call

Fix:
Remove unnecessary check against of action policy flag while
executing BTRH command

Change-Id: Iebd5e02f3bf70cc39288219340cd47ebad3d8349
luetooth/hfpclient/HeadsetClientStateMachine.java
337ee9418b0122e6a89ff38cd49f031ba80aa24c 01-Mar-2016 Ajay Panicker <apanicke@google.com> Add more statistics to scan logs

Added length of connection time to connections. Also added scan type
(opportunistic/background) to last X scans.

Example of new print:
GATT Client Map
Entries: 2

no.nordicsemi.android.mcp (Registered)
LE scans (started/stopped) : 2 / 2
Scan time in ms (min/max/avg/total): 1604 / 7274 / 4439 / 8878
Last 2 scans :
1970/02/19 21:30:20 - 1604ms
1970/02/19 23:59:00 - 7274ms
Application ID : 6
UUID : 0c452531-a57e-44df-9ac6-e2b780d2f715
Connections: 1
6: FF:08:11:53:44:A1 10008ms

com.example.apanicke.bletest (Registered)
LE scans (started/stopped) : 2 / 2
Scan time in ms (min/max/avg/total): 2946 / 9996 / 6471 / 12942
Last 2 scans :
1970/02/19 21:30:07 - 2946ms Opp
1970/02/19 21:30:17 - 9996ms Opp
Application ID : 5
UUID : f25c1bdf-559f-43a6-8348-40ca92975b33
Connections: 0

Bug: 27294154
Change-Id: I7460fb1568f20a1ce13b01d101517852cf9aec4a
luetooth/gatt/ContextMap.java
6e08c3a1a8349b96e4d09226f7c1402e1f0ffec3 01-Mar-2016 Wei Wang <weiwa@google.com> Fix a bug where batch scan wasn't stopped correctly.

Stop batch was broken as the current logic tried to find
batch client information from regular scan clients when
stopping scans.

Bug:27209867
Change-Id: I935119950de1d839a6cfce672dfc00f4540f21dc
luetooth/gatt/ScanManager.java
c1d65f9bb05907cbdceaf1d1a187f394a93eef63 02-Mar-2016 Ajay Panicker <apanicke@google.com> Merge "Add more statistics to scan logs"
am: 939ea0884b

* commit '939ea0884bbfddba164b43ab5e2340a015448d02':
Add more statistics to scan logs
f6ca9c52dc4fd4a531e73c8cfbe01cb3a6065130 01-Mar-2016 Ajay Panicker <apanicke@google.com> Add more statistics to scan logs

Added length of connection time to connections. Also added scan type
(opportunistic/background) to last X scans.

Example of new print:
GATT Client Map
Entries: 2

no.nordicsemi.android.mcp (Registered)
LE scans (started/stopped) : 2 / 2
Scan time in ms (min/max/avg/total): 1604 / 7274 / 4439 / 8878
Last 2 scans :
1970/02/19 21:30:20 - 1604ms
1970/02/19 23:59:00 - 7274ms
Application ID : 6
UUID : 0c452531-a57e-44df-9ac6-e2b780d2f715
Connections: 1
6: FF:08:11:53:44:A1 10008ms

com.example.apanicke.bletest (Registered)
LE scans (started/stopped) : 2 / 2
Scan time in ms (min/max/avg/total): 2946 / 9996 / 6471 / 12942
Last 2 scans :
1970/02/19 21:30:07 - 2946ms Opp
1970/02/19 21:30:17 - 9996ms Opp
Application ID : 5
UUID : f25c1bdf-559f-43a6-8348-40ca92975b33
Connections: 0

Bug: 27294154
Change-Id: I7460fb1568f20a1ce13b01d101517852cf9aec4a
luetooth/gatt/ContextMap.java
a0ff3af53c2299fc20d4c1cc2bcced4a0d2ff5c9 29-Feb-2016 Ajay Panicker <apanicke@google.com> Protect ScanStats from race conditions

Bug: 27294154
Change-Id: Icc0b0a6cfb93fca4a9a2aee49b94c0be1d62527f
luetooth/gatt/ContextMap.java
0492abab3ec07fd1c89799636e335a9f3b36eaed 01-Mar-2016 Ajay Panicker <apanicke@google.com> Merge "Protect ScanStats from race conditions"
am: 3e1e2f6e9e

* commit '3e1e2f6e9ecd3604c63e96ca535a10bebf87d6e2':
Protect ScanStats from race conditions
7bf0b76ff1024d8eb3cd37eb238ce2946440aa12 01-Mar-2016 Adam Lesinski <adamlesinski@google.com> Fix race in reportActivityInfo causing NPE

Bug:27162966
Change-Id: Id43898440824c1bbb24cef5a23a3f2a4fcde0534
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
8ac61cea59b89be104fd66710cfd44eaf12153b9 29-Feb-2016 Ajay Panicker <apanicke@google.com> Protect ScanStats from race conditions

Bug: 27294154
Change-Id: Icc0b0a6cfb93fca4a9a2aee49b94c0be1d62527f
luetooth/gatt/ContextMap.java
ef437b17ba8b192488cb77ffd39daa3e83ba4aea 27-Feb-2016 Ajay Panicker <apanicke@google.com> Fix logic for repeated record scan calls

If recordStartScan or recordStopScan is called multiple times,
there are issues where logged values are incorrect.

Bug: 27294154
Change-Id: Ie049e917ae26fec4c50874ed703e404146c15044
luetooth/gatt/ContextMap.java
c96e0b2e1e0a274e5baff197d5b11ed8ba33a7ea 27-Feb-2016 Ajay Panicker <apanicke@google.com> Merge "Fix logic for repeated record scan calls"
am: 3f5e211e2b

* commit '3f5e211e2bb4320db5a9f8af3fb29623983ff72e':
Fix logic for repeated record scan calls
9d48f7ed161cb7c201b91f21fb1be36522a562e0 27-Feb-2016 Ajay Panicker <apanicke@google.com> Fix logic for repeated record scan calls

If recordStartScan or recordStopScan is called multiple times,
there are issues where logged values are incorrect.

Bug: 27294154
Change-Id: Ie049e917ae26fec4c50874ed703e404146c15044
luetooth/gatt/ContextMap.java
f0202e094a55e51d1e1399f18ad255fb636dd381 25-Feb-2016 Ajay Panicker <apanicke@google.com> Mark background and opportunistic scans in scan statistics

Bug: 27294154
Change-Id: I71d8f388aa83da581958d2169ca9a5eb6088a367
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
88d64af7d3f07a346eb7024a3fe3eaf8285aa53c 27-Feb-2016 Ajay Panicker <apanicke@google.com> Merge "Mark background and opportunistic scans in scan statistics"
am: fcdb8bd4a3

* commit 'fcdb8bd4a3aebeecb89bd733dd678263e45e892b':
Mark background and opportunistic scans in scan statistics
45c63ddeca7ccb3bbf1cb3a7234c89c9eee177cf 25-Feb-2016 Ajay Panicker <apanicke@google.com> Mark background and opportunistic scans in scan statistics

Bug: 27294154
Change-Id: I71d8f388aa83da581958d2169ca9a5eb6088a367
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.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
luetooth/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
luetooth/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
luetooth/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
luetooth/btservice/AdapterService.java
1feb854b0c7c7106c89dbabd26843810596819b9 24-Feb-2016 Ajay Panicker <apanicke@google.com> Merge "Add timestamp to last scans"
am: 781af1e9b1

* commit '781af1e9b11912f706a7ca00f8b20427fbfe996a':
Add timestamp to last scans
5c07523b0b5d32176d7ff3ab28555123123261dd 24-Feb-2016 Ajay Panicker <apanicke@google.com> Add timestamps to last LE scan log

Ex:
no.nordicsemi.android.mcp (Registered)
LE scans (started/stopped) : 5 / 4
Scan time in ms (min/max/avg) : 97 / 1476 / 897
Last 4 scans (timestamp - duration):
1970/02/13 21:10:19 - 1476ms
1970/02/13 21:10:21 - 97ms
1970/02/13 21:10:23 - 929ms
1970/02/13 21:10:25 - 531ms
Application ID : 5
UUID : f77437a1-5e86-4e2d-8223-6193a095c7f5
Current scan duration in ms : 1452
Connections: 0


Bug: 27294154
Change-Id: I66ba6b4bc2d45ced7d6414db007394a16a30956e
luetooth/gatt/ContextMap.java
bcc88d63a2168c0eabaf0056435076c4864e5bef 19-Feb-2016 Ajay Panicker <apanicke@google.com> Clean up gatt dump output

Bug: 27294154
Change-Id: Ia411bb3446b657b06a1748daa14628da79d59ca0
luetooth/gatt/GattService.java
899ebeb890b5564b1515ee289b7877399a4b47fe 24-Feb-2016 Ajay Panicker <apanicke@google.com> Add timestamp to last scans

Ex:
no.nordicsemi.android.mcp (Registered)
LE scans (started/stopped) : 5 / 4
Scan time in ms (min/max/avg) : 97 / 1476 / 897
Last 4 scans (timestamp - duration):
1970/02/13 21:10:19 - 1476ms
1970/02/13 21:10:21 - 97ms
1970/02/13 21:10:23 - 929ms
1970/02/13 21:10:25 - 531ms
Application ID : 5
UUID : f77437a1-5e86-4e2d-8223-6193a095c7f5
Current scan duration in ms : 1452
Connections: 0


Bug: 27294154
Change-Id: I66ba6b4bc2d45ced7d6414db007394a16a30956e
luetooth/gatt/ContextMap.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)
e8363190528d0d95a35ab265ab91c591eb17a7c3 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
1a1169dcb2627c9667153232a356984e81f24e82 18-Dec-2015 Liejun Tao <baibai@motorola.com> DO NOT MERGE Enhance AVRCP Absolute Volume control implementation

1. Remember the current local volume level, current remote volume level.
When user adjusts the volume, compare the returned remote volume
level with desired volume level, if they don't match, do retry.

2.Learn and remember the volume mapping between phone volume level and
remote volume level as the user adjusts volume. When user adjusts to one
remembered volume level, use the mapping directly. Otherwise calculate
the remote volume level and try with method described in step one.

3. Blacklist device if remote device does not tell its initial volume.

4. Define optional threshold for initial volume level to avoid headset
being too loud upon re-connection.

Signed-off-by: Liejun Tao <baibai@motorola.com>
Change-Id: I78112f5f401666f5a680561473a5c7f914071fbe
luetooth/a2dp/A2dpService.java
luetooth/avrcp/Avrcp.java
luetooth/btservice/BondStateMachine.java
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
luetooth/btservice/AdapterService.java
fe0f221cf5e6bb81a2be0cfb22b2ea1a6531cbe5 17-Feb-2016 Erik Kline <ek@google.com> Use IpManager when feeling Pan-tastic

Convert Bluetooth PAN from dhcpcd to IpManager.

Bug: 26991160
Change-Id: Iec8a48294702a8d214f43bea5ef9a041fa52d20f
luetooth/pan/BluetoothTetheringNetworkFactory.java
8b6b4213f509a69731d04e00dce450e86434c0f7 20-Feb-2016 Ajay Panicker <apanicke@google.com> Merge "Clean up gatt dump output"
am: afdc8ec399

* commit 'afdc8ec399bc0d4ab118a83e3cacec41263e2d15':
Clean up gatt dump output
e852adacf44eaad5756b9c7d176fe343abd5d86a 19-Feb-2016 Ajay Panicker <apanicke@google.com> Clean up gatt dump output

Change-Id: Ia411bb3446b657b06a1748daa14628da79d59ca0
luetooth/gatt/GattService.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)
luetooth/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
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
luetooth/btservice/bluetooth.proto
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
cc810f757b28d95d3a67d1810426bbedd69a0d88 09-Oct-2015 Deepak A Metri <deepak.a.metri@intel.com> Improve BT OPP throughput

Progress Bar updation during OPP takes around 40ms for each update.
This causes a significant delay in OPP file transfer, which eventually
will decrease the throughput.
To improve the throughput, invoke the progressBar updation only if there
is a change in the percentage.

Change-Id: I64a0b47093698959026d2b97f296c709a7d92703
Signed-off-by: Deepak A Metri <deepak.a.metri@intel.com>
Signed-off-by: Cedric Bondier <cedric.bondier@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
0787917a687e31cbd1a9d8af5eca6b684a3ef894 14-Aug-2014 jun.x.wang <jun.x.wang@sonymobile.com> Fix NPE crash while removeBatch

When unpairing two devices, the BluetoothOppShareInfo
in BluetoothOppBatch may be null during transfer.

Change-Id: I7b4fbd0f291250deebdeaea4bf2d2f540fe233dc
luetooth/opp/BluetoothOppService.java
b5dde8c7ec12952afb9fee7a41707e65d2a61737 08-Jan-2016 Ajay Panicker <apanicke@google.com> Null terminate MAP instance information

Bug: 26437927
Change-Id: I673de7f7c68b9a02b234bb99c6f89c7fc36f90c9
luetooth/map/BluetoothMapUtils.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
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
luetooth/btservice/bluetooth.proto
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
abdbe8346c368588d8ed36a5bb922651ce0fa984 18-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "Improve BT OPP throughput"
am: ceba109434

* commit 'ceba109434fca8bf56b051edd888244adf54687d':
Improve BT OPP throughput
944be107f513c90a7a8319f19bbe132b236ef1e7 09-Oct-2015 Deepak A Metri <deepak.a.metri@intel.com> Improve BT OPP throughput

Progress Bar updation during OPP takes around 40ms for each update.
This causes a significant delay in OPP file transfer, which eventually
will decrease the throughput.
To improve the throughput, invoke the progressBar updation only if there
is a change in the percentage.

Change-Id: I64a0b47093698959026d2b97f296c709a7d92703
Signed-off-by: Deepak A Metri <deepak.a.metri@intel.com>
Signed-off-by: Cedric Bondier <cedric.bondier@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
1af8d21d56d7d00f644514db067a3c63fc7d640a 17-Feb-2016 Bill Yi <byi@google.com> Merge commit 'f54b7cfd127ce744d1957947a631a92a242748f8' into HEAD
082275e31109a282c9ba1a00467d3d11bd65067c 08-Jan-2016 Ajay Panicker <apanicke@google.com> [DO NOT MERGE ANYWHERE] Null terminate MAP instance information

Bug: 26437927
Change-Id: I673de7f7c68b9a02b234bb99c6f89c7fc36f90c9
luetooth/map/BluetoothMapUtils.java
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)
luetooth/btservice/AdapterService.java
9fd2069d25d38bc3ae6b1d14732cbaa24be292e8 14-Aug-2014 jun.x.wang <jun.x.wang@sonymobile.com> Fix NPE crash while removeBatch

When unpairing two devices, the BluetoothOppShareInfo
in BluetoothOppBatch may be null during transfer.

Change-Id: I7b4fbd0f291250deebdeaea4bf2d2f540fe233dc
luetooth/opp/BluetoothOppService.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
luetooth/btservice/AdapterService.java
bc5ec351447ea8841b9a27e18772aefd62b047bc 08-Jan-2016 Ajay Panicker <apanicke@google.com> Null terminate MAP instance information

Bug: 26437927
Change-Id: I673de7f7c68b9a02b234bb99c6f89c7fc36f90c9
luetooth/map/BluetoothMapUtils.java
5e5ec9a2c715137cdef73e13cedc96c345daf935 06-Feb-2016 Adam Lesinski <adamlesinski@google.com> Merge "Reset ble scans in BatteryStats on start up"
7a51f31646fa78a10bb89ff691a9e1fb8b8a1e34 05-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "Enhance AVRCP Absolute Volume control implementation" am: b8a26db0b7
am: 6b82837c0f

* commit '6b82837c0facc5f3c343a00f407abd6ee2312496':
Enhance AVRCP Absolute Volume control implementation
6b82837c0facc5f3c343a00f407abd6ee2312496 05-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "Enhance AVRCP Absolute Volume control implementation"
am: b8a26db0b7

* commit 'b8a26db0b7c4eabcd7784d087793dd8c8f9973a2':
Enhance AVRCP Absolute Volume control implementation
11798b011c962b602217b479130d413f3b30f19a 18-Dec-2015 Liejun Tao <baibai@motorola.com> Enhance AVRCP Absolute Volume control implementation

1. Remember the current local volume level, current remote volume level.
When user adjusts the volume, compare the returned remote volume
level with desired volume level, if they don't match, do retry.

2.Learn and remember the volume mapping between phone volume level and
remote volume level as the user adjusts volume. When user adjusts to one
remembered volume level, use the mapping directly. Otherwise calculate
the remote volume level and try with method described in step one.

3. Blacklist device if remote device does not tell its initial volume.

4. Define optional threshold for initial volume level to avoid headset
being too loud upon re-connection.

Signed-off-by: Liejun Tao <baibai@motorola.com>
Change-Id: I78112f5f401666f5a680561473a5c7f914071fbe
luetooth/a2dp/A2dpService.java
luetooth/avrcp/Avrcp.java
luetooth/btservice/BondStateMachine.java
28e370be5bbe2c54bb91c70f54b05326063e32ce 04-Feb-2016 Andre Eisenbach <eisenbach@google.com> Merge "Implement createBondOutOfBand"
am: c450f89460

* commit 'c450f89460855d6dfeb4d28364091f3b99bab447':
Implement createBondOutOfBand
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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
214b72b021e94649f5015ab3e5ae64a4e2012c1b 28-Jan-2016 Adam Lesinski <adamlesinski@google.com> Reset ble scans in BatteryStats on start up

Bug:22718669
Change-Id: I89b0106776aadfd383a11c509f6eba660461bd31
luetooth/btservice/AdapterService.java
ce1e250b06d8bc83c43e226e0c1c9cfa9edb510f 27-Jan-2016 Marie Janssen <jamuraa@google.com> Merge "Remove IBluetooth.dump(), dumpsys arguments"
am: 85fef74108

* commit '85fef74108ac3671ae2d4b230942b2ee6e7fd0f1':
Remove IBluetooth.dump(), dumpsys arguments
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
luetooth/btservice/AdapterService.java
44f6d970c611bb13000f4eae052a6de316191fa4 16-Jan-2016 Adam Lesinski <adamlesinski@google.com> Use the incoming WorkSource to notify batterystats of BLE scans

BatteryStats is going to start tracking bluetooth scanning, so
we start by passing along the WorkSource we were given (or we created
if none was specified).

This is only done for BLE scanning at the moment, and only for regular scans.
Batched scans will also need to be considered.
Bug:22718669

Change-Id: I3ff042d6c344f13b600602c5966aef60b4587916
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
d8f88f77836e24c20b67cd872105eb7700f59942 25-Jan-2016 Shishir Agrawal <shishir@google.com> Unhiding MSIM APIs.

1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.

Bug: 26772894
Change-Id: I823ee075e8f77b459977b7546b27e1b373633c53
luetooth/hfp/HeadsetPhoneState.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)
luetooth/btservice/AdapterService.java
d38ba29ff12eea818f2fd502ee9d5a4f1bfb278e 23-Jan-2016 Sanket Agarwal <sanketa@google.com> Synchronize HF and AG volume.

Use normalization where required to convert from Android volume range to
HF volume range.

Bug: b/26714956

Change-Id: Ia90ec6aba41d6f66ca2e34ecc877c52c80cd7a0c
luetooth/hfpclient/HeadsetClientStateMachine.java
847fcb35baaa8083d191d5a616a5581684bbe2ff 21-Jan-2016 Adam Lesinski <adamlesinski@google.com> Merge "Add traffic accounting to Bluetooth App."
am: d23eaab475

* commit 'd23eaab4755da60af6b669b865fdbf0e07c8ab5a':
Add traffic accounting to Bluetooth App.
053048d9ab4f56415ad97a04e94d1b2fbb9d93e7 21-Jan-2016 Adam Lesinski <adamlesinski@google.com> Merge "Add traffic accounting to Bluetooth App."
15d43d60be04035c107211fa8fc10956b41637be 21-Jan-2016 Ajay Panicker <apanicke@google.com> Merge "Add extra logging for BLE scans"
am: e9b5054375

* commit 'e9b505437574d21b7648ee18789f1124939df536':
Add extra logging for BLE scans
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
luetooth/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
luetooth/btservice/AdapterService.java
e9b505437574d21b7648ee18789f1124939df536 21-Jan-2016 Ajay Panicker <apanicke@google.com> Merge "Add extra logging for BLE scans"
9fa95f7c39df16aa059391a637b4469f97e7d987 15-Jan-2016 Ajay Panicker <apanicke@google.com> Add extra logging for BLE scans

Added logging for application name, number of scans, and scan times
for each application that uses gatt scanning.

Example output:
GATT Client Map
Entries: 1

Application Name: com.broadcom.app.leexplorer (Registered)
LE scans (started/stopped) : 4 / 4
Scan time in ms (min/max/avg) : 6 / 7321 / 2744
Time since last scan ended in ms : 3522
Last 4 scans in ms (oldest first): 763 6 7321 2887
Application ID : 5
UUID : f69badb3-212b-40b5-b5b3-3bf9214310f9
Connections: 1
5: 6B:1F:6C:45:3D:DC

Bug: 26463429
Change-Id: I52376541a5b5874d0e40978990149a1283fd9c6a
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
8a0bc0a61e97f8923cb362e1dbb7ff66ffe51507 15-Jan-2016 Ajay Panicker <apanicke@google.com> Add extra logging for BLE scans

Added logging for application name, number of scans, and scan times
for each application that uses gatt scanning.

Example output:
GATT Client Map
Entries: 1

Application Name: com.broadcom.app.leexplorer (Registered)
LE scans (started/stopped) : 4 / 4
Scan time in ms (min/max/avg) : 6 / 7321 / 2744
Time since last scan ended in ms : 3522
Last 4 scans in ms (oldest first): 763 6 7321 2887
Application ID : 5
UUID : f69badb3-212b-40b5-b5b3-3bf9214310f9
Connections: 1
5: 6B:1F:6C:45:3D:DC

Bug: 26463429
Change-Id: I52376541a5b5874d0e40978990149a1283fd9c6a
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
f648ebe608f62462c90f84235df774abbcf2ad47 20-Jan-2016 Sanket Agarwal <sanketa@google.com> Merge "A2DP Sink:Audio Rendering patch and AutoConnect Functionality"
am: a22d9acc77

* commit 'a22d9acc77d60cfad31ecfe67cef806657406725':
A2DP Sink:Audio Rendering patch and AutoConnect Functionality
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
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/NowPlaying.java
luetooth/avrcp/RemoteMediaPlayers.java
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.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
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/avrcp/AvrcpControllerClasses.java
luetooth/avrcp/AvrcpControllerConstants.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/avrcp/NowPlaying.java
luetooth/avrcp/RemoteMediaPlayers.java
luetooth/btservice/AdapterService.java
e005c18fa8fd19ef68580c57760e91735e66a48b 12-Jan-2016 Ashwini Munigala <AshwiniM@codeaurora.org> DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue am: f81566bb85
am: ff7beb91be

* commit 'ff7beb91bee0db50b4ce03aba1b39a3362f767c6':
DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue
ff7beb91bee0db50b4ce03aba1b39a3362f767c6 12-Jan-2016 Ashwini Munigala <AshwiniM@codeaurora.org> DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue
am: f81566bb85

* commit 'f81566bb85a1d0388b738dc5553d096591fc9030':
DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue
352e218bcaa0f4c47636f8aeef02eef543aeb131 09-Jan-2016 Jeff Sharkey <jsharkey@android.com> Follow AIDL refactoring.

Bug: 26471205
Change-Id: I20aa94fb599eda9ee4b1d0b8de208aecb9e560e7
luetooth/Utils.java
e7bdb9a333e9610bb654cce8858d8f8aadbb629d 07-Jan-2016 Ashwini Munigala <AshwiniM@codeaurora.org> DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue
am: 1983bccf61

* commit '1983bccf614d61dfcf20ba3cbf14f4ebf7f49943':
DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue
1983bccf614d61dfcf20ba3cbf14f4ebf7f49943 07-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue

Receive and handle ACTION_MESSAGE_SENT intent for SMS type
message to move it to SENT folder when pushMessage request
from MCE is processed and SMS delivered successfully.

Bug: 22343270
CRs-Fixed: 903561
Change-Id: I337fb1fb870873bf9f1add58d6d898465fc003c8
luetooth/map/BluetoothMapContentObserver.java
b145f33f93ad319ce11e541f5ae48888f07de719 06-Jan-2016 Andre Eisenbach <eisenbach@google.com> Merge "Enforce BLUETOOTH_PRIVILEGED permission for FIDO U2F over GATT"
am: 28ca6b2d79

* commit '28ca6b2d791358a1938c5ab1693f01522c4338f4':
Enforce BLUETOOTH_PRIVILEGED permission for FIDO U2F over GATT
717eb278a0deefdb6f43b97f40986641a8ac170b 22-Dec-2015 Alexei Czeskis <aczeskis@google.com> Enforce BLUETOOTH_PRIVILEGED permission for FIDO U2F over GATT

All access to external Bluetooth U2F devices must go through system
APIs so that calling apps cannot spoof their idenity. This change
blocks the whole FIDO U2F service from being accessed.

Change-Id: I122849452c09fb8bc3bff9ead2db1edf64ddfabc
luetooth/gatt/GattService.java
f81566bb85a1d0388b738dc5553d096591fc9030 07-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> DO NOT MERGE Fix SMS delivered successfully but stuck SENDING issue

Receive and handle ACTION_MESSAGE_SENT intent for SMS type
message to move it to SENT folder when pushMessage request
from MCE is processed and SMS delivered successfully.

Bug: 22343270
CRs-Fixed: 903561
Change-Id: I9dafffc737a34233ede2d10e22cd969f520a12cf
luetooth/map/BluetoothMapContentObserver.java
a6ebe46992bcdf60bfc40cbb78974425b8901449 22-Dec-2015 Alexei Czeskis <aczeskis@google.com> Enforce BLUETOOTH_PRIVILEGED permission for FIDO U2F over GATT

All access to external Bluetooth U2F devices must go through system
APIs so that calling apps cannot spoof their idenity. This change
blocks the whole FIDO U2F service from being accessed.

Change-Id: I122849452c09fb8bc3bff9ead2db1edf64ddfabc
luetooth/gatt/GattService.java
4f341a3ac7cdfd7c976a9eb59117542d50458398 07-Sep-2015 Ashwini Munigala <AshwiniM@codeaurora.org> Fix SMS delivered successfully but stuck SENDING issue

Receive and handle ACTION_MESSAGE_SENT intent for SMS type
message to move it to SENT folder when pushMessage request
from MCE is processed and SMS delivered successfully.

Change-Id: I9dafffc737a34233ede2d10e22cd969f520a12cf
CRs-Fixed: 903561
luetooth/map/BluetoothMapContentObserver.java
146e0f4edc2e93f686c7db901ced096d0c507ded 19-Dec-2015 Bryce Lee <brycelee@google.com> Map Bluetooth profiles correctly in isProfileDisabled helper function. am: 0a9659da81 am: c88e96d906
am: 15446e898b

* commit '15446e898b8f832b46be44249058cbd2b9a1a7d5':
Map Bluetooth profiles correctly in isProfileDisabled helper function.
15446e898b8f832b46be44249058cbd2b9a1a7d5 19-Dec-2015 Bryce Lee <brycelee@google.com> Map Bluetooth profiles correctly in isProfileDisabled helper function. am: 0a9659da81
am: c88e96d906

* commit 'c88e96d90674d9b19e8bc904efc05bd64a268853':
Map Bluetooth profiles correctly in isProfileDisabled helper function.
0a9659da81c1367bf40a8340ecdff4227f88203b 18-Dec-2015 Bryce Lee <brycelee@google.com> Map Bluetooth profiles correctly in isProfileDisabled helper function.

Change-Id: Ic38736a653e6413f1f3bb41c8dfe049abe8883f0
luetooth/btservice/Config.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.
7504ddeec934d6107b251fb45fefcddb8259e0ae 17-Dec-2015 Bryce Lee <brycelee@google.com> Monitor disabled profile setting and enable/disable profiles on change. am: 3602a64c6b
am: 14675b24f4

* commit '14675b24f4c1bf1800ecd243a71fcdd96c9818af':
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
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
luetooth/btservice/ProfileObserver.java
0156b38a345f9ddecae09d90737c31435f5ff911 15-Dec-2015 Andre Eisenbach <eisenbach@google.com> Merge "Fix race condition when doing GATT discovery" am: 82e316efe6
am: 9ff4e56e2b

* commit '9ff4e56e2b6ade75aba3c48ed26eab06290bbf61':
Fix race condition when doing GATT discovery
9ff4e56e2b6ade75aba3c48ed26eab06290bbf61 15-Dec-2015 Andre Eisenbach <eisenbach@google.com> Merge "Fix race condition when doing GATT discovery"
am: 82e316efe6

* commit '82e316efe6568d498a9bca1477745c429ac287d1':
Fix race condition when doing GATT discovery
bac1f06eeded99fa43e00ac4114846a96c22e03c 12-Dec-2015 Jakub Pawlowski <jpawlowski@google.com> Fix race condition when doing GATT discovery

Right now if discovery to multiple GATT clients is happening
simultaneously, onSearchComplete will be run only for device that
finishes discovery last, while it should be run for each device.

mSearchQueue is one for all discovery sessions. Instead of checking if
it's empty, we must check if there are no elements for given connId.

Bug: 26038939
Change-Id: I9417cd7be8cab4b808ce7f045861e1adc2055629
luetooth/gatt/GattService.java
luetooth/gatt/SearchQueue.java
3076d2acccf5c3db0db19b622f062e259be39f3a 02-Dec-2015 Sanket Agarwal <sanketa@google.com> Delegate HFP Audio focus (HF) to entity controlling the actual phone call.

HF role currently handles audio focus itself although the idea is to
have telecom stack do it (it already does in ConnectionService and
CallAudioManager). We rip out the Audio focus management and ringer
control from the state machine and only leave the audio routing and
volume control here.

SCO routing and volume control is currently still handled by Hfp Client
since audio manager does not yet support HF responsibilities.

Bug: b/25261431

Change-Id: I893654de2427cf031c7cddda888ed3694b0001be
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
128616129f2ed5525c2b9655e4fc112ab239b5c1 17-Nov-2015 Bryce Lee <brycelee@google.com> Allow for automatic routing on HF AG to be disabled. am: 9e1b34b2a5
am: e58438d821

* commit 'e58438d821210e57c2240befdaa99e4ab996c51c':
Allow for automatic routing on HF AG to be disabled.
9e1b34b2a5a80c9b16cfc9e71fd4ff015086ab16 16-Nov-2015 Bryce Lee <brycelee@google.com> Allow for automatic routing on HF AG to be disabled.

Bug: 25485578
Change-Id: Iefe06f9df811311040f154ddf8f578893b275ef4
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
bba0a48e032a216f22722baadbe39f7e43fd124a 10-Nov-2015 Jean-Michel Trivi <jmtrivi@google.com> Remove useless imports

Change-Id: I306df32b76612d5de2b8741e858298fd7aae5c36
luetooth/avrcp/Avrcp.java
ba117eea73260a9f7a908eb64b61a2851fa92711 29-Oct-2015 Bryce Lee <brycelee@google.com> Implement setting/getting whether audio can be routed to the HFP HF device. am: 22bb394443 am: c3da0f7bb3
am: 80ebb2a7df

* commit '80ebb2a7dfb1aa1cd44f06d989801b628e138f98':
Implement setting/getting whether audio can be routed to the HFP HF device.
770dfc79291eb3a9de78b1756243ba18fd124aa5 29-Oct-2015 Bryce Lee <brycelee@google.com> Revert "Allow HFP HF implementations to specify a client controller." am: 84d1aab871 am: 4af80a65ff
am: d6dfef0fc5

* commit 'd6dfef0fc53f2cf6f36246411af5fabf360f22a0':
Revert "Allow HFP HF implementations to specify a client controller."
3a870c1c83340c45aa08d4ee9787fde947c16d01 29-Oct-2015 Bryce Lee <brycelee@google.com> Allow HFP HF implementations to specify a client controller. am: 8843d8a825 am: 13a0edb5e7
am: 831b78a467

* commit '831b78a4678a209fa4e4b72929f033956881ec1b':
Allow HFP HF implementations to specify a client controller.
22bb39444356637fbcabd4acf04f2fdb9e3da177 29-Oct-2015 Bryce Lee <brycelee@google.com> Implement setting/getting whether audio can be routed to the HFP HF device.

Bug: 25332357
Change-Id: I2d37d082673255a165dad955aa1ca4b9f00d599e
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
84d1aab871b03d94dddce4ad2d17f3c2acb892b5 29-Oct-2015 Bryce Lee <brycelee@google.com> Revert "Allow HFP HF implementations to specify a client controller."

This reverts commit 8843d8a82571b0a2f1b003cad999bed595814257.

Change-Id: I5371e263fd92c6790558d38f19945492731e17f6
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
8843d8a82571b0a2f1b003cad999bed595814257 29-Oct-2015 Bryce Lee <brycelee@google.com> Allow HFP HF implementations to specify a client controller.

The client controller service is used by the HeadsetClientService to
determine conditions such as whether audio routing to device is permitted.

Bug: 25332357
Change-Id: I8971960f959084ed3969db7c8cdef11673a58994
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
1ad7934465e14f7b074ccd75dc57c1e3a1f2639a 28-Oct-2015 Tony Mak <tonymak@google.com> Merge "Proper fix of contact_id in bluetooth"
cdc0ae72094c96cc0f6715a8408e74056e9f8214 26-Oct-2015 Zach Johnson <zachoverflow@google.com> Remove receiver status foreground flag am: 65842bfe88 am: 4a894feccc
am: 8d8b8093f7

* commit '8d8b8093f727b552e0b5a3d9c4423b4a00e7dfcf':
Remove receiver status foreground flag
65842bfe88b3d91060cd05446024f14061524dcd 26-Oct-2015 Zach Johnson <zachoverflow@google.com> Remove receiver status foreground flag

Turns out this actually causes more problems than
it attempts to solve.

b/25116554
b/25256719

Change-Id: Ia30ab5bf0f6e794376eae85b2616bcdb0049ef76
luetooth/hfpclient/HeadsetClientStateMachine.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
luetooth/btservice/AdapterService.java
8205c75067d22e6385db183b3352c0059eacb2af 23-Oct-2015 Ajay Panicker <apanicke@google.com> Remove Vcard filter for call-logs am: b211df6fcb am: d83da25118 am: afe7ca2198
am: eeb5647233

* commit 'eeb56472331cced520d7bc1fb492d2c828ba80f7':
Remove Vcard filter for call-logs
d83da25118e3b487df56f9e17f3c52bb60b25926 23-Oct-2015 Ajay Panicker <apanicke@google.com> Remove Vcard filter for call-logs
am: b211df6fcb

* commit 'b211df6fcbd7dcd055354b75afc2e68ea49a36d9':
Remove Vcard filter for call-logs
b211df6fcbd7dcd055354b75afc2e68ea49a36d9 22-Oct-2015 Ajay Panicker <apanicke@google.com> Remove Vcard filter for call-logs

Timestamps were being incorrectly filtered out of Vcards when sending
call-logs.

Bug: 25084927
Change-Id: Ied8912e7d2fdbcc6e6980c3773c4ec5a449842ec
luetooth/pbap/BluetoothPbapVcardManager.java
9d68ffa1079ca2e85a8ccf62bf8dca2f43f1ade3 21-Oct-2015 Tony Mak <tonymak@google.com> Proper fix of contact_id in bluetooth

Instead of checking null, explictly state which column(s) we need.

Change-Id: I9780930d8c3457cc8e11ae78cd448f3ffa724183
luetooth/pbap/BluetoothPbapVcardManager.java
601d924b0055dff62d42f5529f3ab2209700c506 21-Oct-2015 Ajay Panicker <apanicke@google.com> Fix file permissions for Bluetooth share am: 66d643091e am: 33e7f11a36 am: 3a7bd34e60
am: ec664957c6

* commit 'ec664957c66d277270de163a42f83ff04ffb316b':
Fix file permissions for Bluetooth share
33e7f11a36a8553285a1fd4c3cfff1e9458df842 21-Oct-2015 Ajay Panicker <apanicke@google.com> Fix file permissions for Bluetooth share
am: 66d643091e

* commit '66d643091edba75b4524483ea640273344533378':
Fix file permissions for Bluetooth share
66d643091edba75b4524483ea640273344533378 14-Oct-2015 Ajay Panicker <apanicke@google.com> Fix file permissions for Bluetooth share

Used a file provider to serve up URIs to allow
applications to access files in the external
Bluetooth directory.

Bug: 23367919
Change-Id: Iadcdcafb235f3eeb50a0e147f3ef982fc9ee38b3
luetooth/opp/BluetoothOppUtility.java
5ad4cd0e052701eb5a19d43db41faf99c8748528 20-Oct-2015 Xiaohui Chen <xiaohuic@google.com> Clean up USER_OWNER in bluetooth

Bug: 25086442
Change-Id: Icac372ed39f549184f6c9e98e10e88a2510ae692
luetooth/Utils.java
3aea695dff7f2449d7f41e91176d647f9131e1c8 18-Oct-2015 Zach Johnson <zachoverflow@google.com> am 774d31b9: am 264d46d6: am 5040e76e: Only apply foreground flag for audio state connected

* commit '774d31b9d4b0a7bf13f81ee5faa992944782f25e':
Only apply foreground flag for audio state connected
2fe4c32e0bc3bb9f67550439e1058be0a7d91cbd 18-Oct-2015 Zach Johnson <zachoverflow@google.com> am 178b204b: am 8fe21aec: am 5d0f2973: Add FLAG_RECEIVER_FOREGROUND to audio state broadcasts

* commit '178b204bd6e5a557018aef3c56a8fbbdd7d1ddad':
Add FLAG_RECEIVER_FOREGROUND to audio state broadcasts
5040e76e2b2742a210e5e1ef29ae1b1779f12ee3 18-Oct-2015 Zach Johnson <zachoverflow@google.com> Only apply foreground flag for audio state connected

The other states aren't really that important, and
this reduces the chance of ANR.

Change-Id: Ie019b81a9fbfb9238cf8b6cce1308d0d7358cbf8
luetooth/hfpclient/HeadsetClientStateMachine.java
5d0f29737bfa7d9e2891b1e99c87e86fce434599 18-Oct-2015 Zach Johnson <zachoverflow@google.com> Add FLAG_RECEIVER_FOREGROUND to audio state broadcasts

This is important so audio can be rejected in a timely manner
when necessary.

Change-Id: I4a7789d262ac74c5014b34eb959d502a68217362
luetooth/hfpclient/HeadsetClientStateMachine.java
80a654ab3be8109bc427e27055b569127941215d 15-Oct-2015 Fyodor Kupolov <fkupolov@google.com> am 4a9f9b02: Fix foreground scans for pre-M apps when location is disabled

* commit '4a9f9b0253fde7341bf9e12c5bd0e6f29fced4fc':
Fix foreground scans for pre-M apps when location is disabled
4a9f9b0253fde7341bf9e12c5bd0e6f29fced4fc 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Fix foreground scans for pre-M apps when location is disabled

Foreground scans were still broken even for L-or-earlier apps when the
location was disabled.

Bug: 24203266
Change-Id: Iaad8d7828a4b383b6cc0a033e94c7d2cd8c9328b
luetooth/Utils.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
2def42b73585bbb6590332544b91156b34496ce9 12-Oct-2015 Hemant Gupta <hemantg@codeaurora.org> am 07c7cfbc: am 7c2df255: am 836f7d38: am faf199e4: SAP: Fix missing connect response when call ongoing at connect

* commit '07c7cfbc93cddc5b87127aaf0800413e8081c950':
SAP: Fix missing connect response when call ongoing at connect
836f7d384eea45c1cc29ab671be798e6b26da519 11-Oct-2015 Hemant Gupta <hemantg@codeaurora.org> am faf199e4: SAP: Fix missing connect response when call ongoing at connect

* commit 'faf199e456dbb987f343c829c603c035df10add7':
SAP: Fix missing connect response when call ongoing at connect
faf199e456dbb987f343c829c603c035df10add7 29-Sep-2015 Hemant Gupta <hemantg@codeaurora.org> SAP: Fix missing connect response when call ongoing at connect

The CALL_ONGOING_STATE was set twice, causing the connect
response not to be sent to the peer device when there was an
ongoing call on DUT. This was violating the SAP Spec.

Bug: 24520367
Change-Id: I290d924870381a82a4abd8b6c42a6d0ebf55652f
luetooth/sap/SapServer.java
e88f00de97d54518db844e03fbd1ef31239bb405 28-Sep-2015 Ajay Panicker <apanicke@google.com> Merge "NullPoiterException protection for mTelephonyManager"
83c9e07d8b1e7f07e875db70b9f85882d6f37fbc 28-Sep-2015 Ajay Panicker <apanicke@google.com> Merge "Prevent NullPointerException on AdapterService.mRemoteDevices"
6c5983e604a6c2f30717f110f046432b6f749238 27-Sep-2015 Sharvil Nanavati <sharvil@google.com> am a0dccfff: am 4310d139: am 7618faa5: Avoid NPE when dumping headset profile state.

* commit 'a0dccfff9c6093c6b6ab65997f5fde4df203f266':
Avoid NPE when dumping headset profile state.
7618faa5df18324c581ade91f75454e2e3d8ad49 27-Sep-2015 Sharvil Nanavati <sharvil@google.com> Avoid NPE when dumping headset profile state.

Change-Id: I91767bcc09d4e16a9bd5c8dbe2e662a96f9880a5
luetooth/hfpclient/HeadsetClientStateMachine.java
766b3209ac1702fd871d19cc9f7c7c114ed6e8b0 21-Sep-2015 Ajay Panicker <apanicke@google.com> NullPoiterException protection for mTelephonyManager

Protect against null pointer exceptions from occuring when
mTelephonyManager is null. This occures if a function using
the variable is called while the service is shutting down and
cleaning up.

Bug: 23793590
Change-Id: I0313880aa6953e54cb2d13d6fb1a06bcba9058c3
luetooth/hfp/HeadsetPhoneState.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
luetooth/btservice/AdapterService.java
a072c9e05c551dba0a938e158cb3a650c18b4ded 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Fix foreground scans for pre-M apps when location is disabled

Foreground scans were still broken even for L-or-earlier apps when the
location was disabled.

Bug: 24203266
Change-Id: Iaad8d7828a4b383b6cc0a033e94c7d2cd8c9328b
luetooth/Utils.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
31afac09a255a43b5f23b4736bffab4f5289c0c0 14-Sep-2015 Sharvil Nanavati <sharvil@google.com> am bd0b5870: am eddb5912: am 0e94b62d: Merge "Send the AUDIO_CONNECTED broadcast after switching to the AudioOn state." into cw-e-dev

* commit 'bd0b5870d3bb4f902473c9da976d6ea6d44bc12f':
Send the AUDIO_CONNECTED broadcast after switching to the AudioOn state.
0e94b62d60f3a729b03841a1891af3a889c9748f 14-Sep-2015 Sharvil Nanavati <sharvil@google.com> Merge "Send the AUDIO_CONNECTED broadcast after switching to the AudioOn state." into cw-e-dev
4247061147878788333e3fc2fa871bd555c0b5d6 14-Sep-2015 Sharvil Nanavati <sharvil@google.com> am b67ba1ba: am 98fbe6c1: am 93793893: Read connection intervals from config.xml so it can be overriden by device.

* commit 'b67ba1ba297fd7cc962f26f79b57f844e9613d8b':
Read connection intervals from config.xml so it can be overriden by device.
93793893b122e5eb3101899411fccaabc075dfaf 14-Sep-2015 Sharvil Nanavati <sharvil@google.com> Read connection intervals from config.xml so it can be overriden by device.

Wear needs the minimum possible connection interval for BLE connections
to support the Wear iOS companion app. This change simply moves the hard-
coded connection intervals to config.xml so they can be overriden for
Wear devices.

Bug: 23903184
Change-Id: I1f60772ef6a100ad5e4f02f629b5ca6e80fc207a
luetooth/gatt/GattService.java
a27628d5cb96981b65daec4db798d06ba9d98ce2 13-Sep-2015 Sharvil Nanavati <sharvil@google.com> Send the AUDIO_CONNECTED broadcast after switching to the AudioOn state.

The broadcast is currently sent while the HFP client state machine is
in the Connected state. As a result, a broadcast receiver who wishes
to disconnect the incoming audio connection won't be able to successfully
call disconnectAudio. By changing the internal state first and then
broadcasting, receivers can immediately perform audio operations.

Bug: 23568208
Change-Id: I60de9775f9a0126774275d08ef999f082ae41747
luetooth/hfpclient/HeadsetClientStateMachine.java
1488545ab6b1736cd103e08b94a23260f2f9b667 11-Sep-2015 Ajay Panicker <apanicke@google.com> am 3b14189e: am 8df0d5da: am fb540d85: am 1c28582b: Allow senderAddressing on default filter for message Listing

* commit '3b14189e9f1387bae5318149dc651131a6f7b80b':
Allow senderAddressing on default filter for message Listing
fb540d85c3591020df3615101fbb9f788a27c139 11-Sep-2015 Ajay Panicker <apanicke@google.com> am 1c28582b: Allow senderAddressing on default filter for message Listing

* commit '1c28582b0e780eed2f8480e5c2dfbf0da745e4e8':
Allow senderAddressing on default filter for message Listing
1c28582b0e780eed2f8480e5c2dfbf0da745e4e8 11-Sep-2015 Ajay Panicker <apanicke@google.com> Allow senderAddressing on default filter for message Listing

Adjusted the PARAMETER_MASK_DEFAULT constant for when a
message listing request is recieved and a message filter isnt
provided. This new filter value causes the sender_address field
to be sent along with all the other default information.

Bug: 22163529
Change-Id: I49444cfb341d2e6cc72bdab55aa441d712b03f14
luetooth/map/BluetoothMapContent.java
47bdb24c2d9b5bef2b8c19133e5a79ceeceac8f5 10-Sep-2015 Ajay Panicker <apanicke@google.com> am 008abd13: am e462643f: am 4d5be8f0: am 0ebd4e58: Move SMS message to proper folder after sending

* commit '008abd13f97077d04dbecf132f53f463df4db06c':
Move SMS message to proper folder after sending
4d5be8f02eedfcdb9b49962a2d881d7db7adb273 10-Sep-2015 Ajay Panicker <apanicke@google.com> am 0ebd4e58: Move SMS message to proper folder after sending

* commit '0ebd4e58920add6114b1f345b7d95e0709096fe3':
Move SMS message to proper folder after sending
0ebd4e58920add6114b1f345b7d95e0709096fe3 09-Sep-2015 Ajay Panicker <apanicke@google.com> Move SMS message to proper folder after sending

Move a SMS message to the correct folder upon receiving an intent
detailing if the message was succesfully sent or not. If sent
successfully, move to the SENT folder, otherwise move it to
the FAILED folder.

Bug: 22992865
Change-Id: Ifdcfb7bb613844f507ef27460ead520c6573b89d
luetooth/map/BluetoothMapContentObserver.java
dd94daf8b6658427767660aa5509b29c8711a2fc 09-Sep-2015 Sungmin Choi <sungmin.choi@lge.com> am 809769be: am de79c722: am e48e8d0b: am 6385f5ec: Add NREC setting routine even after SCO connected

* commit '809769bef24a453e751eb3a1512f43d2bb4154b2':
Add NREC setting routine even after SCO connected
e48e8d0b7c5b9ce8c2310d68c836cac4444f09f8 09-Sep-2015 Sungmin Choi <sungmin.choi@lge.com> am 6385f5ec: Add NREC setting routine even after SCO connected

* commit '6385f5ec823dd1113708532d20729dba67d9beaa':
Add NREC setting routine even after SCO connected
6385f5ec823dd1113708532d20729dba67d9beaa 05-Sep-2015 Sungmin Choi <sungmin.choi@lge.com> Add NREC setting routine even after SCO connected

Bug: 23471393
Change-Id: I46264238e4810a7f280e656220bc68e76eb0cb37
Signed-off-by: koh.changseok <koh.changseok@lge.com>
Signed-off-by: Sungmin Choi <sungmin.choi@lge.com>
luetooth/hfp/HeadsetStateMachine.java
7f0d0742627c59cf327ddb5dc7a9c2efd762eaa7 08-Sep-2015 Casper Bonde <c.bonde@samsung.com> am 0306f7bd: am de4e03af: am 9ff028cc: am 471e023d: SAP: Fix missing attribute in disconnect_ind

* commit '0306f7bd124426a52b8101b80213107f9555b043':
SAP: Fix missing attribute in disconnect_ind
9ff028cca112cf2fb1ebc9a73f77f6a4033a644e 08-Sep-2015 Casper Bonde <c.bonde@samsung.com> am 471e023d: SAP: Fix missing attribute in disconnect_ind

* commit '471e023da5f39d21ebcb1d3fad43a591c15f6be3':
SAP: Fix missing attribute in disconnect_ind
471e023da5f39d21ebcb1d3fad43a591c15f6be3 28-Aug-2015 Casper Bonde <c.bonde@samsung.com> SAP: Fix missing attribute in disconnect_ind

The internal TEST flag was removing too much code.
To make it easier to run test, and avoid future issues
with removing needed code, the TEST flag is no longer used
to remove code.

This bug was noticed when running the PTS testcases without the
PTS_TEST flag set. It is assumed that this fix will make
TC_SERVER_DCN_BV_02_I work without the PTS flag, but unless PTS
have updated their test case to accept both a gracefull disconnect
and a forced disconnect, TC_SERVER_DCN_BV_03_I will still fail in
a production build. The SAP spec suggest to use a gracefull disconnect
when initiating a disconnect from a server, hence it is not a good
idea to expose a force disconnect option to the used without first
having tried a gracefull disconnect. Hence the PTS test case
implementation is in conflict with the intented use specified in
the SAP specification.

Without this fix a build with PTS_TEST=false will not work as
intented.

PTS_TEST replaced with system property bt.sap.pts. Set it to true
to enable the force disconnect button.

Bug: 23614694
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: I776a53d6e786c21000ef62094f9a9948ee5880b8
luetooth/sap/SapMessage.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
1bf0fac2d72158da006084b7adb911727d0601fe 04-Sep-2015 Casper Bonde <c.bonde@samsung.com> am 54c16c1d: am 50b1fd6a: am 2ecfab69: am e377aae9: SAP: Fix logic to skip padding bytes for requests received

* commit '54c16c1d01b44570de2e3089a55b559e0e761ebc':
SAP: Fix logic to skip padding bytes for requests received
2ecfab690d8a15de275f665008a3645dd71db95d 04-Sep-2015 Casper Bonde <c.bonde@samsung.com> am e377aae9: SAP: Fix logic to skip padding bytes for requests received

* commit 'e377aae948e58f974c3af14360d2f6ce09b868aa':
SAP: Fix logic to skip padding bytes for requests received
e377aae948e58f974c3af14360d2f6ce09b868aa 28-Aug-2015 Casper Bonde <c.bonde@samsung.com> SAP: Fix logic to skip padding bytes for requests received

As per SAP spec, padding bytes can be 0-3 bytes, but the current code
has incorrect logic, that would lead to calculation of padding bytes
as 4 in case the APDU length was multiple of 4, which would lead to
incorrect parsing logic in SAP Server and can lead to issues of no
response for APDU request from SAP Server as it keeps waiting for
reading more bytes from rfcomm which are not present.

Also check added in code not to send msg to RIL if socket is null to
prevent crash in BT Sap module.

Bug: 23024598
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: I24e4a6b850709c9c32b7e0992626a0219dacef03
luetooth/sap/SapMessage.java
luetooth/sap/SapServer.java
242decf575404c79de55d58a5b9b170a80b6fc37 01-Sep-2015 Andre Eisenbach <eisenbach@google.com> am a601d554: am af89c589: am fa60067c: am 08fba96f: am bf37a029: Fix column ID for PBAP name lookup

* commit 'a601d554265aa4191f9032192ec3cdb614bb536f':
Fix column ID for PBAP name lookup
fa60067ce39759fc2a3ae60127b02753c0dba162 01-Sep-2015 Andre Eisenbach <eisenbach@google.com> am 08fba96f: am bf37a029: Fix column ID for PBAP name lookup

* commit '08fba96fc3955528bc3a2761731876c1b03f9e4f':
Fix column ID for PBAP name lookup
08fba96fc3955528bc3a2761731876c1b03f9e4f 01-Sep-2015 Andre Eisenbach <eisenbach@google.com> am bf37a029: Fix column ID for PBAP name lookup

* commit 'bf37a0295d110b77b635ca2986172bbdd59331bb':
Fix column ID for PBAP name lookup
bf37a0295d110b77b635ca2986172bbdd59331bb 01-Sep-2015 Andre Eisenbach <eisenbach@google.com> Fix column ID for PBAP name lookup

When a phonebook lookup is performed to resolve a phone number into a
name, the wrong column ID is used to retrieve the value from the cursor,
causing an un-caught exception and a failed lookup.

Bug: 22953958
Change-Id: I1f826412916012382903fdf30d43d5cb3516432c
luetooth/pbap/BluetoothPbapVcardManager.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
luetooth/btservice/AdapterService.java
547646cc155d3e6c12183ca623b3d61ffdb942f9 31-Aug-2015 Sunny Goyal <sunnygoyal@google.com> Merge "Updating incoming file notification > Notificaiton shows the file name, sender and file size > Quick action to accept or decline > Shows as heads-up, removed toast"
f6ae67403c20cec20bc8f906411fce4c9ea769f0 28-Aug-2015 Sunny Goyal <sunnygoyal@google.com> Updating incoming file notification
> Notificaiton shows the file name, sender and file size
> Quick action to accept or decline
> Shows as heads-up, removed toast

Bug: 23490378
Change-Id: I6a1b4110fbf0c0198a31f91b818df00914fa2da3
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/BluetoothShare.java
luetooth/opp/Constants.java
157a5b491ca74ecd8dde0400d3d6fc175d28165b 28-Aug-2015 Zach Johnson <zachoverflow@google.com> HFP should let the system handle ringtones

https://www.youtube.com/watch?v=NJVrTYbxwgA

First of all, it was choosing the sound in this order:

1. alarm sound
2. notification sound
3. ringtone sound

me: o_O

Second of all, it can't take custom ringtones
for contacts into account.

Change-Id: I16e04e69bdc9b190f8d12412dfd8365420f1da5b
luetooth/hfpclient/HeadsetClientStateMachine.java
38347a7e66a7c8a47767d8aad3d9534d95a0f070 27-Aug-2015 Ajay Panicker <apanicke@google.com> am d678c40f: am 9135d866: HFP/A2DP: Remove pending auto-connect messages when connected

* commit 'd678c40f35f18ef48bddbbf07934bd2b82f92400':
HFP/A2DP: Remove pending auto-connect messages when connected
d678c40f35f18ef48bddbbf07934bd2b82f92400 27-Aug-2015 Ajay Panicker <apanicke@google.com> am 9135d866: HFP/A2DP: Remove pending auto-connect messages when connected

* commit '9135d866b12ff019a4eae37e7a8c0df56a4383f2':
HFP/A2DP: Remove pending auto-connect messages when connected
9135d866b12ff019a4eae37e7a8c0df56a4383f2 26-Aug-2015 Ajay Panicker <apanicke@google.com> HFP/A2DP: Remove pending auto-connect messages when connected

Fixes a bug in which being paired with multiple headsets causes
previously connected headsets to disconnect. This fix removes
pending connect attemps once one device is successfully connected.

Bug: 23111466
Change-Id: Id471189d92643b9626e63197c00e76defd0a72bf
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
37604004520846495a5dba50d7c3afef05a9ecf9 25-Aug-2015 Sharvil Nanavati <sharvil@google.com> Fix low volume on Nemo devices after accepting incoming HFP call.

Bug: 23495386
Change-Id: I98c60188dd5d4aaf4bc5a7f212219918e1374989
luetooth/hfpclient/HeadsetClientStateMachine.java
8f1def75a6f57a04fd0e8a6423343a690d694154 20-Aug-2015 Sharvil Nanavati <sharvil@google.com> am 72ecb4ca: Make location enabled check configurable when returning scan results.

* commit '72ecb4caa630b63f66505ccb202a807b1af4e294':
Make location enabled check configurable when returning scan results.
72ecb4caa630b63f66505ccb202a807b1af4e294 19-Aug-2015 Sharvil Nanavati <sharvil@google.com> Make location enabled check configurable when returning scan results.

Some device classes (e.g. Wear) don't allow location to be enabled but
would still like to allow LE scanning to take place. This patch allows
the location enabled check to be bypassed if the platform is so configured.
Even if the location check is disabled, the calling app must still have
one of the location permissions.

Bug: 21852542
Change-Id: I206366ce262776d4668c0c42e066f0e20f5fdfeb
luetooth/gatt/GattService.java
fe7270b5aee5b3345d5c60f161d866a0648dead9 14-Aug-2015 Vineeta Srivastava <vsrivastava@google.com> Merge "SAP: Do not send padding when packet size is mutiple of 4" into mnc-dr-dev
312e10ad5bcbb1e3d021c4798d55c40f99c7a6ef 10-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Block results if location is disabled in Settings

Apps holding PEERS_MAC_ADDRESS permission can still access scan results.

Bug: 21852542
Change-Id: I75fc289e8965df64efb7ff84fe5a4204904724ab
luetooth/Utils.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
fdb62835992e82681d2166dbf5716e26ab57d964 08-Aug-2015 Pavlin Radoslavov <pavlin@google.com> Revert "Bluetooth-OPP: Enable support to send same file multiple times"

This reverts commit 86449ac4bc7a8f4b2afeab4da420ae4f980c850a.

The revert is needed to address an issue that crashes Bluetooth.

Bug: 22836458
Change-Id: I8c8b51544637dd1c2250eb91e86cb2ca1bbc9fe7
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.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
luetooth/btservice/AdapterService.java
d73503eb9d27edf6b942876f510d347e9c4a2970 22-Jul-2015 koh.changseok <koh.changseok@lge.com> SAP: Do not send padding when packet size is mutiple of 4

Bug: 22943799
Change-Id: I48d411f4e3a79a891360a9a855c4680bea19d748
luetooth/sap/SapMessage.java
1dd20863cde3b61cea48d2e06d1814f5f9651691 31-Jul-2015 Dianne Hackborn <hackbod@google.com> Merge "Change MNC codename to just M." into mnc-dev
c16dd2fad8325f24f5099e9ab175894b247859ec 30-Jul-2015 Dianne Hackborn <hackbod@google.com> Change MNC codename to just M.

Change-Id: I1e5989dbc73f89bd292465142560952bc8e44f59
luetooth/Utils.java
1b1433ad9b4d769a1f9e37284c5d80fb021d31d7 29-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Legacy foreground apps should continue getting scan results

Pre-M apps running in the foreground now get scan results. For legacy apps
running in the background, no results are returned and the error is logged.

Bug: 21852542
Change-Id: Ic7a91f34c6718c26f0dae30dade6a436fe1061af
luetooth/Utils.java
edb6da171b8b7a6f9d4aa5a773d734a464f1ec66 20-Jul-2015 Miao Chou <mcchou@google.com> Fix security vulnerabilities in permission of deleting MMS/SMS

This CL adds permission and PID checks to avoid unauthorized deletion of any
MMS/SMS messages in BluetoothMapContentObserver.actionMessageSentDisconnected
function.

Bug: 22343270
Change-Id: I30254036309733be4d54db17a8ef17a571cd1c5a
luetooth/map/BluetoothMapContentObserver.java
e8e870c24930f9b687572dbb80614e5aad6fbdfa 03-Jul-2015 beryl hou <beryl_hou@asus.com> Return no track selected if no track is currently selected.

Fix to satisfy AVRCP 1.4 spec.
In EVENT_TRACK_CHANGED response request,
if a track is selected , then return 0x0 in the response.
if no track currently selected,then return 0xFFFFFFFFFFFFFFFF in the INTERIN response.

Bug: 22519285

Change-Id: Iaaae1d4acf918049d99c27d9ad98bde15242ade1
luetooth/avrcp/Avrcp.java
ca8db07314e44453d807e6afeb8eb4eef303ee85 23-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Enforce location permission for apps targeting M" into mnc-dev
976a53f0f946e589aa2b5204ce3262abcf2afc55 24-Jun-2015 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fixes for proper working of filter functionality.

The change consists of fixes required for the filter to work properly.

Without this change the API isFilteredOut() was basically removing those
attributes which are set in the filter while the expected behaviour is other
way round, so renamed the API to isFilteredIn().
This patch also adds provision for filtering call log date and time when
it is not been asked as per the filter since it is not a mandatory attribute
as per the PBAP specification.
This patch also renames "NOTES" to "NOTE" which was incorrect property for
vcards.

Bug: 20077258
Change-Id: Ifbe57706b86031cbb9656556843da1bab700ef5d
luetooth/pbap/BluetoothPbapVcardManager.java
586ba822a87a5cb0f58035ce0983825f5f23285d 22-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Enforce location permission for apps targeting M

Enforce location permission for apps targeting M, for legacy apps, log an
error.

Bug: 21852542
Change-Id: Ic406df1727eb0939531a22b76c2df9b13f03ec81
luetooth/Utils.java
51b7ab3d2d9a166e1fac22ff442ad3221a838c91 15-Jul-2015 Chenjie Luo <cjluo@google.com> Merge "Remove extra logging with privacy info" into mnc-dev
bdf33c0f7176de2bee64b6488a8327d837599fc8 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Require ACCESS_COARSE_LOCATION for ACTION_FOUND broadcast

Receivers of ACTION_FOUND intent are now required to have
ACCESS_COARSE_LOCATION permission.

Bug: 21852542
Change-Id: Ia3bca7e9cd117536a3eb4f4d1fe405604b2ff40f
luetooth/btservice/RemoteDevices.java
69e5f6f65981c49c1723188469b79389841c9f2e 15-Jul-2015 Chenjie Luo <cjluo@google.com> Remove extra logging with privacy info

Bug: 22075764
Change-Id: Id2f1c0d1660abd0c18de46c64596fc1a17b974ce
luetooth/hfp/AtPhonebook.java
luetooth/hfpclient/HeadsetClientStateMachine.java
ff33061e763656438daea7249e45e38b8a174288 19-Feb-2014 kschulz <k.schulz@samsung.com> PBAP: New Missed calls parameter not set correctly

When a PCE pull the missed-calls-phonebook (mch.vcf) from the PSE, a parameter
stating the number of _new_ missed calls must be included in the reply.
Currently the parameter is included but it is always set to zero, which is
incorrect.
This fix corrects the variable used for new missed calls

Bug: 13022843
Change-Id: I6094c50a76711cfff9347596d70ac2300cfbb543
luetooth/pbap/BluetoothPbapObexServer.java
9e78435c8538516635e377720cabec0f2c0e1d71 09-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Do not return devices when caller has no location permission" into mnc-dev
a933175cbc1cdcbd0583642ba6eaf4555b3ed55c 09-Jul-2015 Sanket Padawe <sanketpadawe@google.com> Merge "Make string to plurals in BT inbound/outbound notification." into mnc-dev
cc8b02f2b8f8d820358a1b66b6ba138a4ab44642 09-Jul-2015 Sanket Padawe <sanketpadawe@google.com> Make string to plurals in BT inbound/outbound notification.

Bug: 22215773
Change-Id: I21d06ec7839fdb4e1ba9b5a70c6ac7791788eb4f
luetooth/opp/BluetoothOppNotification.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
luetooth/btservice/AdapterState.java
391be75c27b6d36930a5645925ed7ab118fa634a 04-Sep-2013 Anubhav Gupta <anubhavg@codeaurora.org> Update UI properly in Connection race Conditions.

Broadcast connection state of incoming device in pending
state and update UI for disconnection of outgoing connection.
This change in conjunction with bluedroid change handles
race condition scenarios when incoming and outgoing A2dp
connections collides.

Bug: 22028876
Change-Id: Ibd80fc7010613887df74fb1903b16de73c77939a
luetooth/a2dp/A2dpStateMachine.java
d2fc8cbd87c7a742223e8742a442a48690d426ce 20-Jun-2015 Fyodor Kupolov <fkupolov@google.com> Do not return devices when caller has no location permission

In onScanResult, skip a device if calling process has no location
permission/appop

Bug: 21852542
Change-Id: I4e3511b33d69d94c1df6e1bf2f9a351303a90685
luetooth/Utils.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
3d10f5428e566355ce786e00201bef72d99fdc2a 31-Jan-2014 Subramanian Srinivasan <subrsrin@codeaurora.org> Sends bond state change intent for unbonding a device

When remove bond API is called from the stack layer,
the bond state change intent is not sent in the
upper layers to unbond a device.

Change-Id: I515bfaf3f1a575106b10e2f688b1e9de58770b87
luetooth/btservice/BondStateMachine.java
b99a8af5a27318bb5ae3745531d5a2175370b892 28-Apr-2015 Hemant Gupta <hemantg@codeaurora.org> PBAP: Add support for PBAP 1.1.1 specification

This patch adds support for erratas to make the specification version
compatible to PBAP 1.1.1 specification.

Following errata needs to be supported to make the specification version
compatible to PBAP 1.1.1

https://www.bluetooth.org/errata/errata_view.cfm?errata_id=1824

Proposed modification to the text of the spec:
5.3.3 Name
This is the name of the folder to be retrieved. The value shall not include
any path information, since the PullvCardListing function uses relative paths.
An empty name header may be sent to retrieve the vCard Listing object of the
current folder. However, it is illegal to issue a PullvCardListing request with
an emtpy name header from the telecom/ folder.
Any such request shall be responded to with a "Not Found" error message.

Bug: 21896912
Change-Id: I0fb2c7d96b6e34d0bf83bb62901a8fd47c470fe6
luetooth/pbap/BluetoothPbapObexServer.java
db94389c30d5ad5555a922d28868b119e1c6f2e1 23-Jun-2015 Andre Eisenbach <eisenbach@google.com> Fix compile errors due to OPP merge

Change-Id: Ia07d99d58785c7e974b1fb32afaeb157ad337932
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
0f2f4d93c88a9d8fc5a2489cb51831b3caf178e1 29-Aug-2013 Pradeep Panigrahi <pradeepp@codeaurora.org> Display proper file name while cancelling transfer

Use Case:
1) Send files in batch from remote to DUT
2) Cancel the transfer in between from either side.
3) Check name of the files in failed tranfer message.

Failure:
Name shown in the failure message is different than actual file
name in batch

Fix:
Save names of all the selected files to be transferred even
before starting of client thread so that names remain intact
in the outbound information even when the batch is cancelled
from initiator.

Bug: 21896912
Change-Id: I42c98721365c4c8acb746d49ba9ceff5b0737b71
luetooth/opp/BluetoothOppManager.java
00400c15a9a300419a6c50eaed1b50a2289c30d1 27-Jan-2015 Pradeep Panigrahi <pradeepp@codeaurora.org> Acquire the full wakelock only during user confirmation request

Use Case:
1. Create obex connection from remote to DUT.
2. Dont transfer any file and wait for the screentimeout.
3. Check if device goes to suspend.

Failure:
Device does not go to suspend mode if OPP connection is present.

Root Cause:
Acquire the full wakelock when user confirmation is required and
not during opp connection request.

Fix:
Obex server session will acquire the full wakelock only when user
confirmation is required. Otherwise, if session acquires the full
wakelock during connect request and did not receives the PUT
request from remote full wakelock will not be released. In this
scenario DUT will not go to suspend and cause battery drain.

Bug: 21896912
Change-Id: I17b90b206016c2a34d724393ac3b17a41983722c
luetooth/opp/BluetoothOppObexServerSession.java
3aecf54308d60eea10fe10a5c18e4dff455aef66 05-Jun-2015 Pradeep Panigrahi <pradeepp@codeaurora.org> Use long as file size instead of int while using OPP.

Use Case:
1. Pair and connect to Dongle
2. Send a 2GB file from Dongle to DUT.

Failure:
File transfer failed in between.

Fix:
This patch fixes issue of problems in sending/receiving files
which cannot be accomodated in int type of Java. Instead of using
int, long data type is used, which can hold 64 bits data size in JAVA
which is suitable for storing file sizes in GB. Changes are done
in how updates are sent to progress bar which supports only int
by using the percentage of data transferred to update the progress.

Bug: 21896912
Change-Id: I49f9bf8a4a0e3668e32058d582a2700b0e6057e8
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppTransferInfo.java
luetooth/opp/BluetoothOppUtility.java
ae8997b870d52d6701813e6f3ff9d87a5a083bf3 29-Aug-2013 Pradeep Panigrahi <pradeepp@codeaurora.org> Mark proper file transfer status upon OBEX response timeout

Use Case:
1) Pair with remote dongle and send a file over OPP.
2) Reset dongle such that there is obex response timeout.

Failure:
File transfer status is not marked a failed and hence cannot be retried

Fix:
This patch will handle the scenario of obex timeout which occurs due
to cancelling the transfer in between and trying sending again.

Bug: 21896912
Change-Id: Ide1a64e5874bda2c5cf71531f5971bc8bebf5e9f
luetooth/opp/BluetoothOppObexClientSession.java
fbe0089395f9f81c1143cffe0674d0e406dfb983 29-Jan-2014 Pradeep Panigrahi <pradeepp@codeaurora.org> Avoid sending TRANSFER_COMPLETED_ACTION intent multiple times.

Use Case:
1. Share a picture through Bluetooth, select partner devices.
2. The partner devices do not confirm to receive the file.
3. Check the transfer status on the DUT.

Failure:
Failure Notification pops up twice when the shared files not
received by the partner phone

Fix:
This change ensure that TRANSFER_COMPLETED_ACTION intent will not
sent to receiver if there is any exception occurred during OPP
operation because this intent is already sent to receiver from message
handler.

Bug: 22028876
Change-Id: I3ad2f24be185c37355dff43009a5236bede0106a
luetooth/opp/BluetoothOppObexClientSession.java
77b75f59e3285a9b1b2b25f769456781b0806926 02-Feb-2015 Anubhav Gupta <anubhavg@codeaurora.org> Check for AVRCP handler validity before cleanup

In stress testing of BT on-off usecase, crash was observed
due to triggering double clean-up. This fix introduces
additional Check for handler validity while clean-up to
avoid the crash.

Bug: 21896912
Change-Id: I14b1c35d1fa0345c59d61682d92795aa617436b5
luetooth/avrcp/AvrcpControllerService.java
dc68435fca66933c844700040b2497eaf08b0fb9 20-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #20494208: Go out of device idle when headset button is pressed

We tell the device idle controller to go out of idle before
starting the voice command activity.

Change-Id: I41900518af61f0cb477ec56eaebfe798c69512f9
luetooth/hfp/HeadsetStateMachine.java
113ae3c3e7a3755dd984b97033f6d1a91122cccb 16-Jun-2015 Wei Wang <weiwa@google.com> Merge "Make address type agnostic in mac address scan filtering." into mnc-dev
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
luetooth/btservice/AdapterService.java
14929a82d56b94b9b75e2aefeb9c6ef29482eed0 13-Jun-2015 Wei Wang <weiwa@google.com> Make address type agnostic in mac address scan filtering.

b/20187218

Change-Id: I2349c9ca2cd1186ceff98f3eb42b6ecba9da002e
luetooth/gatt/ScanFilterQueue.java
luetooth/gatt/ScanManager.java
8f3a54a0ed8591f4844ee7b47e37bd6451650783 12-Jun-2015 Wei Wang <weiwa@google.com> Merge "Enforce permission check in BLE scan only mode." into mnc-dev
f6d53a6dcdd7cfa4065cc762c87fafdb7f491bf7 12-Jun-2015 Wei Wang <weiwa@google.com> Enforce permission check in BLE scan only mode.

Bug:21494402
Change-Id: I3d5d6e87bb8aef8760aa4087559abfeebabb42b1
luetooth/gatt/GattService.java
3c81700fa6a57cdceb256e03d942f71842d75878 08-Jun-2015 Kim Schulz <k.schulz@samsung.com> SAP: turn debugging and test flags off

Currently DEBUG, VERBOSE and PTS_TEST_MODE is on as a default.
There is no reason for that in production code (except for during test
where the code needs to go through PTS test)

Bug: 21692162
Change-Id: Id092a79959fa38608d06755cc43148eee9ec3e00
luetooth/sap/SapService.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>
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/sap/SapService.java
acc99899ec1c747365d7568a2fe53f53dfc3593f 04-Jun-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Handle SLC in MultiHFPending state

Use case:
Connect 2 headsets one after another in quick
succession.

Failure:
SLC for first headset is not happening.

Root cause:
SLC for first headset is not handled when second
headset is connecting.

Fix:
Add handling for SLC event for HS1 in MultiHFPending state.

Change-Id: If0c2553c28e233bea4622fca10c94fddd913afa7
luetooth/hfp/HeadsetStateMachine.java
6455f2788e2d67c7a7ffa79b94269af06473bc0b 02-Apr-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Add null checks

Added null checks identified by static analysis tool.

Change-Id: I5ff04775313b06d549c5ae97e497dd44e9231b04
luetooth/hfp/HeadsetStateMachine.java
c924fea547063adc907a3a25044588aa58ac8879 04-Jun-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Handle SCO volume change in multihfpending state.

Use case:
1. Connect one headset.
2. Make MO/MT call.
3. While connecting second headset, change
call volume on the phone.

Failure:
SCO volume changed is not updated to first headset.

Root cause:
Volume change is not handled in MultHFPending state.

Fix:
Added handling volume change in MultiHFPending state.

Change-Id: I6ac3cb2968b99de194fa7c0114d45f9d81dcb663
luetooth/hfp/HeadsetStateMachine.java
8e79653c4d093d6f6696312f668429feb6d62bf3 22-May-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Handle multiple BLDN commands from headset

When multiple AT+BLDN commands are received
from headset, return ERROR if dialling process
is started for the first AT+BLDN.

Change-Id: I603eb5c5ccdd5f8606a355e5d464e6493d1e7fd9
luetooth/hfp/HeadsetStateMachine.java
e316dfc9b3f648ad3d7b2691927758ea885043c0 17-Sep-2013 Anubhav Gupta <anubhavg@codeaurora.org> Check for A2dp SNK UUID supported by remote

Check for A2dp sNK UUID supported by remote before proceeding
with A2dp SNK connection when DUT acts as A2dp SRC.
This change addresses the issue where Host being A2dp SRC is
seen trying connecting to other A2dp SRC repeatedly.
This will ensure that DUT being A2dp SRC does not try to connect
to A2dp SRC only peers.

Change-Id: I0200582a69b3d4e9b7f92516ba92f34054a1f4dc

(cherry picked from commit 5b7325d795331a249a70fdfd20a9f29bed388f1d)
(cherry picked from commit 27f0077dde25b69442aff316e5c60d32f2275a65)
(cherry picked from commit c5b6b44414be53bbb75e064412a7d2d49ffe871f)
luetooth/a2dp/A2dpService.java
6ddb5d5b31b3e4e21b57bbe0457692fdbcc97eba 05-Sep-2013 Anubhav Gupta <anubhavg@codeaurora.org> Move A2dp State to Disconnected when BT is Turned OFF

A2dp State gets Stuck in Connecting state If User tries to connect to
other paired device when device is already connected to one, and before
connection swap succeeds, power-cycles BT.
This change allows the state to move properly to disconnected for the
device pending connect when BT is turned off.

Change-Id: I17bc620551bf735f39327eff59102c14551bcf26

(cherry picked from commit 0ce6816d43761b838b65adbf1e636630e1047fcf)
(cherry picked from commit 51c4d0f1df682f3874915f99ef49ec5c3d9e74ed)
(cherry picked from commit 6583fca29318b3c8bc0b16d588fc939ffdde6142)
luetooth/a2dp/A2dpStateMachine.java
1f7879f020043ee2f255ec3c04804b9b9c2ff869 04-Jun-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Do not accept SCO without any active listener.

Use case:
1. Connect to Motorola s305 headset.
2. start playing music on Phone.
3. Make an MO call for last dialled number from headset.
4. Accept and end the call from remote phone.

Failure:
After call ends, music resumes on headset for 1-2secs and
routed to speaker.

Root cause:
Headset is re-connecting SCO after call disconnection.

Fix:
- Some HS re-connect SCO after call disconnection.
Do not accept such incoming SCO connection requests.
- Check for valid SCO listener(active CS or VOIP call, VR started)
before accepting incoming SCO connection requests.

Change-Id: Ifcb1f760b3eabf52d9b507c5d25021b90bfec561
luetooth/hfp/HeadsetStateMachine.java
0fb10ac5e193a87c0d6c09ef8719a0296589d9e6 17-Sep-2014 Mallikarjuna GB <gbmalli@codeaurora.org> Handle startScoUsingVirtualVoiceCall in HeadsetService

Use case:
Connect headset while in VOIP call

Failure:
SCO is not established with headset

Root cause:
When HS is connected while in VOIP call, sometimes
startScoUsingVirtualVoiceCall() is called even before HSM is
transitioning from Disconnected/Pending to Connected state.

Fix:
Do not ignore startScoUsingVirtualVoiceCall in HeadsetService
if HeadsetStateMachine is still in process of transition to
Connected state.

Change-Id: I8a6c7f3e08b8a9dfc4c4efc6d1d041149874eab0
luetooth/hfp/HeadsetService.java
303898f623aa134fac30f9ddcbc1523a3538d231 04-Jun-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Set correct callState for MT/MO call while in Voip Call.

Use case:
Start MO/MT call during VOIP call.

Failure:
Incorrect response sent to AT+CIND? to headset

Root cause:
terminateScoUsingVirtualVoiceCall() resets callState
from INCOMING/DIALING to IDLE. At the same time, if HS sends AT+CIND?
to read call indicators, it will get wrong value of callsetup. This case
is hit only when SCO for VOIP call is not terminated via SDK API call.

Fix:
When VOIP is ended, save current MO/MT call state to
HeadsetPhoneState class to be able to respond with
proper call states when queried by headset.

Change-Id: Ia3a0a2d67dbfffef474de48cab6ee63b82fa4572
luetooth/hfp/HeadsetStateMachine.java
103e4f404bcd3c82f98cd125e53a5fd197232a6d 04-Jun-2015 Andre Eisenbach <eisenbach@google.com> Merge "Update the roam status to headset" into mnc-dev
e6a27a58d8b8f9424579d9f6105185d4a2683b79 22-May-2015 Mallikarjuna GB <gbmalli@codeaurora.org> Update the roam status to headset

This change makes sure that roam status
change is updated to headset immediately
as soon as it is changed. With this, we will
not wait to update the roam status till network
service state changed.

This fixes a PTS test case. Notmally a roaming
state change would be accompanied by a service
state change.

Change-Id: Ib30a69e58ee81e67986ffde52093e5f37315f814
luetooth/hfp/HeadsetPhoneState.java
22fa8a39e020ff8f74b7d8ac052bddd8328cadc5 28-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Correct ResultCode for setTransportProtocolResp

Changed to respond with "Error, not supported" according to
the SAP specification, to pass PTS tests.

Change-Id: If4f3ddf27468d13f1162c19ab6c0a712fc81fd92
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapMessage.java
b6791189b3c8be04b521b8520aed006f012304d1 27-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Shorten long lines

Change-Id: I89d5bf6d68b8aba9d9e86e891bfb1b79eb241432
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapMessage.java
luetooth/sap/SapServer.java
a49b4e45faf378e3848c4f6eb468e0a14565aa6c 17-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Fix exception at shutdown

Restructures the disconnect/shutdown code, to avoid exception.
Also ensure cleanup of notifications and profile public state.
This also fixes the bug introduced when handling ACL_disconnect
intent, where the rfcomm-listener was not restarted.

Change-Id: I3b4561f610abc77011689b7cfb67a4b54c41500c
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
bbb071e6d73df46230ec654e3066a46f6e35a88d 22-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Dynamic use of wake locks

This changes the way wake locks are used for SAP from acquiring
wake lock at connect, and releasint at disconnect to acquiting
a wake lock each time activity is detected, either between
Bluetooth and the RIL or between Bluetooth and the client.
The wake lock is released when there has been no activity for
one second.

This is the same scheme as for MAP, except using a lower timeout
value, based on analysis of the traffic when connected to a
Nokia 616 car-kit.

Change-Id: Ie4bcf7e991d81e88b64dc4ba20fa74b327fde3c6
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.java
f98ad52d9b979273b01fb97466f2e077dc7b6bd6 21-Apr-2015 Casper Bonde <c.bonde@samsung.com> Add support for MITM for BluetoothSockets (2/4)

This change enables use of the option to enforce Man-in-the-middle protection
for the authentication process for the Sim Acces Profile.

Change-Id: I98244d5e822c25f3f8f51833f38c79e13bb60e63
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapService.java
1f1103e93ba7ebd48c57c9627dc7b262c6f01c77 16-Apr-2015 Casper Bonde <c.bonde@samsung.com> SAP: Change to use new SDP Api (2/4)

Added support for Sim Access Profile (SAP) in the SDPManager.
To make it easier to test, both SDP record creation and seach
is added.

Change-Id: I871eb762389e3717b8bd6bc37a8ffc09fff6f589
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/sap/SapService.java
luetooth/sdp/SdpManager.java
7ac99a6ff9b5389948eec70d2afa96bb255feedd 15-Oct-2014 Hemant Gupta <hemantg@codeaurora.org> Add null checks in PanService

This patch fixes issues identified by static analysis tool
in Bluetooth apk wrt PAN.

Change-Id: Icd65c87450c8a3c3e745b2820bfca1d1f49b98db
luetooth/pan/PanService.java
686377aa851b5cb6d5c32234dd340089b7959b49 01-Jun-2015 Tony Mak <tonymak@google.com> Merge "Add unit test for commit "Support work contacts in HFP, PBAP, MAP"" into mnc-dev
0ff315d60bb44c5cc4223abff48e086defaec8ad 01-Jun-2015 Tony Mak <tonymak@google.com> Add unit test for commit "Support work contacts in HFP, PBAP, MAP"

1. In ag/674009, entire bluetooth is diabled temporarily.
This commits enable the test and just comment out test case that need the removed dependency.

2. Fixed a potential NPE in composeAndSendPhonebookOneVcard

3. Refactor the code a bit to allow testing

Bug: 19551175
Change-Id: I20e17d38cebdccc39c14e960503ac7d23a9bd928
luetooth/pbap/BluetoothPbapVcardManager.java
534bbd9a2347141644a684ce179b2cedf20541b4 09-May-2015 Pavlin Radoslavov <pavlin@google.com> Add a missing check for a null pointer when processing an Intent

This fixes Low severity vulnerability in Bluetooth: Denial of Service

Bug: 20952998
Change-Id: Ifec45568f0e7e158b96a2557a7e1eefcee5bb6f5
luetooth/pbap/BluetoothPbapService.java
35e1ec3c673b81022339978a37f191b5ed67f065 27-May-2015 Prerepa Viswanadham <dham@google.com> Increase the min LE connection interval to 11.25ms

To reduce audio choppiness, increase the min LE connection interval
to 11.25ms from 7.5ms

Bug: 18776956
Change-Id: I4722a85f0d3204ec741f6a88142907a29bffe0bf
luetooth/gatt/GattService.java
cd72c4dfe4db77c6df24db94f8d9a04efff7ab1d 12-May-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix MAP server inter-op issues

- Fix no recipient address info available when GETMessage
and MessagesListing requested on Draft folder. Fetch
Draft recipient address from "canonical_address" table
based on threadId when no address available from regular
"sms" table in telephony database.
- Avoid dummy entry in sms database when requested to push a
empty message. Reject empty SMS body and handle a possible
exception from telephony stack for invalid message body.
- Send MMS complete "size" as attachment size fetched from
database and subject or text length available.
- Donot include "old_folder" info in MessageDeleted MNS event.
As per Spec, only MessageShift event should use the later info.
- Handle possible exception while processing message listing.
A case where message is saved in draft with no recipeint name,
when we try to fetch contact name during messagelisting, null
number passed to ContactsProvider would cause IllegalArgumentException.
Add null and empty check before quering contact provider.

Change-Id: I5f2234ae7e50ed719a31f463e372d2026988539c
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
f48c0b98b5d1823fbb0fc3e4eba7d5054d9385fa 27-Apr-2015 Casper Bonde <c.bonde@samsung.com> MAP: Restart MAS servers after ACL disconnect

Code was introduced to remove MAP Access Request early at
ACL disconnect. By removing the notification as wall as the
UserTimeout timer caused the MAS instances not to be restarted,
to be able to accept a new conection. Hence if this occured
no connection to MAP was possible untill the phone or Bluetooth
was power cycled.

This fix causes the MAS instances to be restarted in
the event of a ACL disconnect before user accepts MAP req.

Also, applied some updates to the log messages:
- Changed the VERBOSE flag to false
- Changed some DEBUG messages to VERBOSE (for privacy reason)
- Updated the message priorities to match their purpose. E.g.,
"if (VERBOSE) Log.i(...)" -> "if (VERBOSE) Log.v(...)"

Bug: 19239028

Change-Id: Icf6d065a7a48c70a9bbc1593267f6a3605433af2
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/map/BluetoothMapService.java
72014e2b0523c72ba34ca43d91bc4e8be104d95a 12-May-2015 Pavlin Radoslavov <pavlin@google.com> Catch an exception when updating incoming message status

Note: this change does not fix the root cause for Bug 16042763,
but addresses an issue that could be triggered within the
same context as Bug 16042763.

Bug: 16042763
Change-Id: Ib56894f3fa3b7754d1d3f3214a923d9d0a23eb80
luetooth/map/BluetoothMapObexServer.java
7769a12fc51ed9ac3c61b60ea0df26706561bcb0 04-May-2015 Casper Bonde <c.bonde@samsung.com> MAP: Fix of cursor closed too early

A cursor variable was reused for a new query, which lead to
the cursor being closed too early.
This fix introduces a second cursor variable and appropriate
close calls.

Bug: 20227071
Bug: 20565456

Change-Id: I1fa271497a9eb37bb3e435b61dc5daa2b9727af4
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/map/BluetoothMapContent.java
f5f90873574eefe5f50a7b383fcd8fefb961f66c 05-Dec-2014 Andre Eisenbach <eisenbach@google.com> Bluetooth native dumpsys logging support (4/5)

Bug: 18508263
Change-Id: Ib9546ff2cf64d2e085e27e691032749e869e0795
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
f6154624f5d94ee078d4208340411630e9e50bf3 30-Apr-2015 Nitin Arora <niarora@codeaurora.org> Cancel inquiry during the transition from Bluetooth off to LE on state

This change cancels any inquiry or device discovery that is ongoing
while Bluetooth transitions from BT_ON state to BLE_ON state, before
disabling all core services.

Change-Id: I3f14b6a1f6629c60c897ab39e49c44516400d737
luetooth/btservice/AdapterProperties.java
57be75cbd210c54f9a20acb87e044cb80d46972d 06-May-2015 Wei Wang <weiwa@google.com> Workaround to increase onLost timeout.

Change-Id: I9dfc24198be436f489b7c2f2051a7448478f6762
luetooth/gatt/ScanManager.java
1155fc94f0e26f33ab0059e1aa10544e3caa7077 05-May-2015 Prerepa Viswanadham <dham@google.com> Merge "Merge commit '4626db5' into master_merge" into mnc-dev
6ff33c6c221899b0a6f1f81cf8cab1e42e8d1a70 01-May-2015 Prerepa Viswanadham <dham@google.com> Tune onfound/onlost timeouts for platform

Change-Id: Ieefcc7cbd94f698aabf8497b6db7182d28bde8e4
luetooth/gatt/ScanManager.java
9d5707fc9ffbcb0b3a6b9112d0c6df4a8211d51e 01-May-2015 Prerepa Viswanadham <dham@google.com> Merge commit '4626db5' into master_merge
6c97deb7ff61f29b0d5957baf5df72c0d49f8724 01-May-2015 Wei Wang <weiwa@google.com> Revert "Fix no resource tracking available for more than 2 filters."

This reverts commit d5a562fbd16db8b10daf3f4920166659f3ceaf03.

Revert the temp hack. We should think of a better solution.

Change-Id: Ibee3a060ca9ec21e91ceb0cc0e612d08745a9376
luetooth/gatt/ScanManager.java
d5a562fbd16db8b10daf3f4920166659f3ceaf03 30-Apr-2015 Wei Wang <weiwa@google.com> Fix no resource tracking available for more than 2 filters.

Change-Id: I29ddbe348134c673b6cce754033df165d6d40743
luetooth/gatt/ScanManager.java
12adb6a704e8f484cdd0004edd44edeed2c37890 30-Apr-2015 Wei Wang <weiwa@google.com> Workaround to fix Bluetooth crash when using onFound/onLost.

Bug:20694614
Change-Id: I87b9f58af53551f7b919e6db76ada516eac33176
luetooth/gatt/ScanManager.java
4626db541e2eb7d910fd0d79c75341f948a11d41 30-Apr-2015 Prerepa Viswanadham <dham@google.com> Take out TBD comments.

Change-Id: I5e02b4874b6cbc25f2361226e48e4c879698d0c8
luetooth/btservice/AdapterProperties.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
ecbac5b723ac906c46271c2b740a52ccef625c57 31-Mar-2015 Satya Calloji <satyac@broadcom.com> LE low power scan feature

LE low power extended scan feature JNI changes
based on Google spec v0.95

Bug: 20029342
Change-Id: I5efd7ee3c644a51371bf250fca535e06c466640e
luetooth/btservice/AdapterProperties.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
2e7dd83a6b3b4bf15e0dec6aad9ab826e6e2531b 22-Apr-2015 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix possible NullPointerException while GetMessagesListing

Fix possible NullPointerException while processing GetMessagesListing
on a MSE without a valid SIM , case wherein invalid messageType value
occurs on MAP SMS/MMS Instance. Now by default SMS type is set to GSM.

Following basic PTS test cases and also other PTS cases dependent on
GetMessagesListing functionality fail without this fix:
TC_MSE_MMB_BV_11_I
TC_MSE_MMB_BV_20_I
TC_MSE_MMU_BV_02_I

Change-Id: I8ed0a2787534159342af88ec413a1c0407961d91
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapUtils.java
cd152eb16444369d9fbdb642fbb8560fed96b83a 28-Apr-2015 Wei Wang <weiwa@google.com> Fix crashes when calling numHwTrackFiltersAvailable.

Initialize curUsedTrackableAdvertisements in constructor. Also remove
BLUETOOTH_PRIVILEGED permission check on onFound/onLost APIs.

Bug:20643021

Change-Id: I2de6afd31d7af6cb927bc532f6cd855e1a7f46a4
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
6649a9dfaa405b240f5ef680fd8d7f4c279afcf1 26-Apr-2015 Elliott Hughes <enh@google.com> am 82431cec: am 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"

* commit '82431cecda9c1e68c58028ea49f0059aef0dab21':
Add hwp MIME type to transfer/receive over bluetooth
82431cecda9c1e68c58028ea49f0059aef0dab21 26-Apr-2015 Elliott Hughes <enh@google.com> am 2bc6e65d: Merge "Add hwp MIME type to transfer/receive over bluetooth"

* commit '2bc6e65d7ac443ac976aa7aac8c84bf601f85eaa':
Add hwp MIME type to transfer/receive over bluetooth
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
luetooth/btservice/AdapterService.java
2e8302083499fdf5bb391d055e54c3402b0dc556 23-Apr-2015 Andre Eisenbach <eisenbach@google.com> Reduce AdaperService and HeadsetStateMachine log levels

Bug: 20460314
Change-Id: I6d1750845ccd0995800a8f82d2122cb1f3bc108d
luetooth/btservice/AdapterService.java
luetooth/hfp/HeadsetStateMachine.java
ee928044471477ddcecd4e32aa6efe292d892464 22-Apr-2015 Prerepa Viswanadham <dham@google.com> Fix some nit's in previous comments

Change-Id: I47fe325daff6dd2dbe83a7491fedf06daa19f18f
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/Config.java
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
luetooth/hid/HidService.java
dbe4c2517804b3e32587310b76f1c977b8749d8b 06-Mar-2015 kschulz <k.schulz@samsung.com> MAP: Change MMS to use new API to send message

Removed the send MMS message intent, and replaced by
SmsManager.sendMultimediaMessage()

Change-Id: I226b7b0e8fdb101ab160563937ae6e7a1a13be41
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/MmsFileProvider.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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/Config.java
luetooth/sap/SapMessage.java
luetooth/sap/SapRilReceiver.java
luetooth/sap/SapServer.java
luetooth/sap/SapService.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
luetooth/hid/HidService.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
ed70219e41ba68196798dcbf75b782d13fb88603 06-Mar-2015 kschulz <k.schulz@samsung.com> MAP: Change MMS to use new API to send message

Removed the send MMS message intent, and replaced by
SmsManager.sendMultimediaMessage()

Change-Id: I226b7b0e8fdb101ab160563937ae6e7a1a13be41
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/MmsFileProvider.java
3178b08c6823899dbb58513673bf2a80f637be7c 27-Mar-2015 Ricky Wai <rickywai@google.com> Add contact sharing policy checking

Bug: 19990833

Change-Id: Ic9344cc78679930a388272165ee8db0ec56cbced
luetooth/hfp/AtPhonebook.java
luetooth/pbap/BluetoothPbapVcardManager.java
luetooth/util/DevicePolicyUtils.java
165d7facb456fe3c15a07692a70723fda1ad135f 06-Mar-2015 kschulz <k.schulz@samsung.com> MAP: Errata service release 8 changes

- Exclude folderListingSize for requests MaxListCount != 0
- Exclude body-header for MaxListCount == 0
- Removing 'old_folder' from delete message event and place folder from
which message has been delete in 'folder' attribute

Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Signed-off-by: Trine Jensen <trine.jensen@samsung.com>
Change-Id: I5bf6d50e0a078bb8a9d261d81efd4a9272bcb226
luetooth/map/BluetoothMapObexServer.java
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
luetooth/BluetoothObexTransport.java
luetooth/SignedLongLong.java
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
luetooth/map/BluetoothMapAccountItem.java
luetooth/map/BluetoothMapAccountLoader.java
luetooth/map/BluetoothMapAppObserver.java
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapConvoContactElement.java
luetooth/map/BluetoothMapConvoListing.java
luetooth/map/BluetoothMapConvoListingElement.java
luetooth/map/BluetoothMapEmailAppObserver.java
luetooth/map/BluetoothMapEmailSettings.java
luetooth/map/BluetoothMapEmailSettingsAdapter.java
luetooth/map/BluetoothMapEmailSettingsDataHolder.java
luetooth/map/BluetoothMapEmailSettingsItem.java
luetooth/map/BluetoothMapEmailSettingsLoader.java
luetooth/map/BluetoothMapFolderElement.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMapSettings.java
luetooth/map/BluetoothMapSettingsAdapter.java
luetooth/map/BluetoothMapSettingsDataHolder.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/BluetoothMapbMessage.java
luetooth/map/BluetoothMapbMessageMime.java
luetooth/map/BluetoothMapbMessageMms.java
luetooth/map/BluetoothMnsObexClient.java
luetooth/map/MapContact.java
luetooth/map/SmsMmsContacts.java
0dcecb2cfd921916ed586183d64ec9fd250a6e4c 06-Mar-2015 kschulz <k.schulz@samsung.com> MAP: fix exception when Email in SMS list request

Fixed problem where an exception was thrown if the
client requests to get email listed on a MAS instance that only contains
SMS/MMS.

Bug: SD-4355
Change-Id: Id0e7f627424cc1f6f2047ec8564479288bf84d77
luetooth/map/BluetoothMapFolderElement.java
a8873ca26b4bf9bf9a6cc13f1f3a81a6bc8deea5 11-Apr-2015 Andre Eisenbach <eisenbach@google.com> Merge "Handle response to AT+NREC command" into m-wireless-dev
d1fadc3b23a03cbf028bfbdca9fd64640d7a05bd 03-Apr-2015 David Stevens <stevensd@google.com> Handle response to AT+NREC command

The AG will send either an OK or an ERROR in response to AT+NREC.
Not expecting a response to that command was skewing the responses
received for later commands.

Bug: 20157416
Change-Id: I992320403da7aabdc09f0315376e85ce905ecaf2
luetooth/hfpclient/HeadsetClientStateMachine.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>
luetooth/BluetoothObexTransport.java
luetooth/IObexConnectionHandler.java
luetooth/ObexRejectServer.java
luetooth/ObexServerSockets.java
luetooth/btservice/AdapterService.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapRfcommTransport.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/BluetoothMnsObexClient.java
luetooth/map/BluetoothMnsRfcommTransport.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppRfcommTransport.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/TestActivity.java
luetooth/pbap/BluetoothPbapRfcommTransport.java
luetooth/pbap/BluetoothPbapService.java
luetooth/sdp/SdpManager.java
2e85ea37c1ba495d3f0fd702f0a3920f3faf2848 04-Apr-2015 Prerepa Viswanadham <dham@google.com> Onlost onfound feature

Change-Id: I7ceace5f14ed1cbdb8b66267ced318741febee73
luetooth/btservice/AdapterService.java
luetooth/gatt/AdvtFilterOnFoundOnLostInfo.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
f0026eb09f5def1252fde42040861fc2252c29a9 20-Mar-2015 Prerepa Viswanadham <dham@google.com> Fix file format.

Change-Id: I780adcab6bb8622b1be15aa2a97b84fb724d7bc9
luetooth/gatt/AdvtFilterOnFoundOnLostInfo.java
luetooth/gatt/FilterParams.java
ced9530661c9591eadc712e83b870b9f94f7ec43 07-Apr-2015 Ricky Wai <rickywai@google.com> Merge "Support work contacts in HFP, PBAP, MAP"
2bc6e65d7ac443ac976aa7aac8c84bf601f85eaa 02-Apr-2015 Elliott Hughes <enh@google.com> Merge "Add hwp MIME type to transfer/receive over bluetooth"
655434047df38242c1848eee283f134cfd299fd1 10-Feb-2015 Satya Calloji <satyac@broadcom.com> OnFound/OnLost feature JNI changes based on BLE spec v0.90.

Bug: 19609671
Change-Id: I2ac0687ea53616287d82fe47f256686619c0998a
luetooth/btservice/AdapterProperties.java
luetooth/gatt/AdvtFilterOnFoundOnLostInfo.java
luetooth/gatt/FilterParams.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
5006c8597521a7652eafa89a6fb5483b5cb567b6 19-Feb-2015 Ricky Wai <rickywai@google.com> Support work contacts in HFP, PBAP, MAP

Change-Id: Iac752d75cf93c4d197f57bca0b209f3d5400f485
luetooth/hfp/AtPhonebook.java
luetooth/map/BluetoothMapContent.java
luetooth/pbap/BluetoothPbapVcardManager.java
dea3455df17f60987c982a2a55f8604ba9186434 24-Mar-2015 Prerepa Viswanadham <dham@google.com> Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge
6c53637d2d9afebe66195754be864fa354fba9ab 18-Mar-2015 Paul Jensen <pauljensen@google.com> Remove dead code, mostly DataStateTracker.

(cherry picked from AOSP commit 6dbd9366698ea1a6139ace0c47c9175f42b8c60a)

Change-Id: I18c44cd08dfb51e02a96d0b726e9af1db21e3058
luetooth/pan/BluetoothTetheringNetworkFactory.java
f0af155794693099bf536be79c5ceecae1522ffb 09-Jan-2015 Wei Wang <weiwa@google.com> Add opportunistic ble scan mode. (2/2)

Bug:19003667
Change-Id: I51c609cf9941143637f0a5b4060705adc50ace72
(cherry picked from commit e90cdc4a5d2ea50178931e459c0e57e4116b55be)
luetooth/gatt/ScanManager.java
b4d40f9e98362bc49ec660cc87a61322536b2196 03-Mar-2015 Sunny Goyal <sunnygoyal@google.com> Removing deprecated live_folders creation support

> live_folders are no longer supported by launcher

Change-Id: I08aed20b22f57cccdfce1cb193d6e03de494bc76
luetooth/opp/BluetoothOppLiveFolder.java
luetooth/opp/BluetoothOppProvider.java
6797e50e9bd5f979a0f4751da857e8b97843edb4 05-Feb-2015 Prerepa Viswanadham <dham@google.com> Use overlay values for computing the energy used.

Change-Id: Ifddeccbb555e5db19434b13b69f9a7b0c139332e
luetooth/btservice/AdapterService.java
cafa35bd3b5f2309111fd3136553a1dd33f30458 12-Mar-2015 Lorenzo Colitti <lorenzo@google.com> am 0001d4fb: am c73c92b4: Merge "Remove dead code, mostly DataStateTracker."

* commit '0001d4fbaf09de60e550699e739cf27cac70280e':
Remove dead code, mostly DataStateTracker.
0001d4fbaf09de60e550699e739cf27cac70280e 11-Mar-2015 Lorenzo Colitti <lorenzo@google.com> am c73c92b4: Merge "Remove dead code, mostly DataStateTracker."

* commit 'c73c92b49cc7b974b31e933bbd15ee2e20771a5f':
Remove dead code, mostly DataStateTracker.
6dbd9366698ea1a6139ace0c47c9175f42b8c60a 21-Nov-2014 Paul Jensen <pauljensen@google.com> Remove dead code, mostly DataStateTracker.

Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd
luetooth/pan/BluetoothTetheringNetworkFactory.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
luetooth/btservice/AdapterService.java
85fcb73115478754b9abaa8d43fcce9d7cfd60b3 19-Feb-2015 Amit Mahajan <amitmahajan@google.com> am 944d9882: am f53939e3: am 15354c93: am a1c94c68: Adding a new param to calculateLength for SMS to indicate if called for a segment of multipart msg.

* commit '944d98822fc53a15cc68cfdb855fabb448ed7632':
Adding a new param to calculateLength for SMS to indicate if called for a segment of multipart msg.
944d98822fc53a15cc68cfdb855fabb448ed7632 19-Feb-2015 Amit Mahajan <amitmahajan@google.com> am f53939e3: am 15354c93: am a1c94c68: Adding a new param to calculateLength for SMS to indicate if called for a segment of multipart msg.

* commit 'f53939e3c742e4bdba81ff2796312aa9904530ca':
Adding a new param to calculateLength for SMS to indicate if called for a segment of multipart msg.
a1c94c681b7064a22ba7d6331af62e175767695c 19-Feb-2015 Amit Mahajan <amitmahajan@google.com> Adding a new param to calculateLength for SMS to indicate if called for a
segment of multipart msg.

Encoding type is calculated separately for entire msg vs individual
segments. Change is to avoid overwriting the calculated value for
individual segment based.

Bug: 19399335
Change-Id: I8e89b7596e9c7440ace0486eceb1252094c373fa
luetooth/map/BluetoothMapSmsPdu.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)
6c384c5927aa0f02c5bda611fc31225447f710e2 10-Feb-2015 Andre Eisenbach <eisenbach@google.com> am c9d93376: am 1e3e1ddf: Add API to check if a Bluetooth connection is encrypted (2/2)

* commit 'c9d93376d13cb682c30fbfd7c2ad2c725d96b41d':
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
luetooth/btservice/AdapterService.java
d81eaacffeb206e1acde0e6b4a2ab2c5abca838c 27-Jan-2015 Matthew Xie <mattx@google.com> am d85c4615: am 7c38b7f0: am 9b017745: Use LTE signal level when under LTE

* commit 'd85c46153b8bda2a9cd98387b31f2bdd1efb02b7':
Use LTE signal level when under LTE
d85c46153b8bda2a9cd98387b31f2bdd1efb02b7 27-Jan-2015 Matthew Xie <mattx@google.com> am 7c38b7f0: am 9b017745: Use LTE signal level when under LTE

* commit '7c38b7f0dddd18dd652866f5764b506be2f6f46f':
Use LTE signal level when under LTE
9b0177459ddc1412c4e9d44af53a1badb476bdd9 23-Jan-2015 Matthew Xie <mattx@google.com> Use LTE signal level when under LTE

Bug: 17898918
Change-Id: I9f3bb8d874e24440c2b8de85a6a0d7dbdadb3935
luetooth/hfp/HeadsetPhoneState.java
8f7e19cb0eaabfe620078b609f21b154e76d280b 21-Jan-2015 Andre Eisenbach <eisenbach@google.com> am 7b7e5b6e: am dc8fecc2: am 0e3af27d: Merge "Remove GATT context if client registration did not succeed" into lmp-mr1-dev

* commit '7b7e5b6ee51bae92a5fbe617aa3794518da729e5':
Remove GATT context if client registration did not succeed
7b7e5b6ee51bae92a5fbe617aa3794518da729e5 21-Jan-2015 Andre Eisenbach <eisenbach@google.com> am dc8fecc2: am 0e3af27d: Merge "Remove GATT context if client registration did not succeed" into lmp-mr1-dev

* commit 'dc8fecc2d6f3b43c9fcde39bfbd69ac2ff7539fc':
Remove GATT context if client registration did not succeed
0e3af27dd1acd8034efb9b53bdb824fc342e7c7b 21-Jan-2015 Andre Eisenbach <eisenbach@google.com> Merge "Remove GATT context if client registration did not succeed" into lmp-mr1-dev
3f8164cd8c4bcce5e79770ee7c02fe00ba9581d5 16-Jan-2015 Andre Eisenbach <eisenbach@google.com> Remove GATT context if client registration did not succeed

Bug: 19028495
Change-Id: I25827e365621fa9b3ef6e85ef9c103cf03654b7c
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
a606581cff733498b7b7624c1868831ed59a85d3 16-Jan-2015 Andre Eisenbach <eisenbach@google.com> am 998e9bfa: am e2aaf550: am 45f25f7b: Merge "Improve VCARD filter logic and reduce log spam" into lmp-mr1-dev

* commit '998e9bfad3268db0ea3c84ba10c96f155d6e0967':
Improve VCARD filter logic and reduce log spam
998e9bfad3268db0ea3c84ba10c96f155d6e0967 16-Jan-2015 Andre Eisenbach <eisenbach@google.com> am e2aaf550: am 45f25f7b: Merge "Improve VCARD filter logic and reduce log spam" into lmp-mr1-dev

* commit 'e2aaf5500f317bab75c0548610251d86a7ab3d6a':
Improve VCARD filter logic and reduce log spam
45f25f7ba5aca87e8709b4901ca7057dbb4a3ccf 16-Jan-2015 Andre Eisenbach <eisenbach@google.com> Merge "Improve VCARD filter logic and reduce log spam" into lmp-mr1-dev
b863e5f549a068e6ebdaeffd1ca7d2e6b346e207 13-Jan-2015 Wink Saville <wink@google.com> am 4ab90596: am c40ed4d7: am 8dae225b: Merge "Rename reg/unreg OnSubscriptionsChangedListener." into lmp-mr1-dev

* commit '4ab905968e6af0b181143fa85080cbfccbd43107':
Rename reg/unreg OnSubscriptionsChangedListener.
d35ffe7518beab32715992ce33d78d8f30ee6181 13-Jan-2015 Wei Wang <weiwa@google.com> am 68cd4586: am a9b2d01f: am a8f9e639: Fix Bluetooth crash when all filters are used.

* commit '68cd458645085d61a3b38ce63a035ce62106a942':
Fix Bluetooth crash when all filters are used.
4ab905968e6af0b181143fa85080cbfccbd43107 13-Jan-2015 Wink Saville <wink@google.com> am c40ed4d7: am 8dae225b: Merge "Rename reg/unreg OnSubscriptionsChangedListener." into lmp-mr1-dev

* commit 'c40ed4d76a7ce8b36e14ef00b25e2189f90c35f5':
Rename reg/unreg OnSubscriptionsChangedListener.
8dae225b378f250f7a0348e923bade61895171d6 13-Jan-2015 Wink Saville <wink@google.com> Merge "Rename reg/unreg OnSubscriptionsChangedListener." into lmp-mr1-dev
68cd458645085d61a3b38ce63a035ce62106a942 13-Jan-2015 Wei Wang <weiwa@google.com> am a9b2d01f: am a8f9e639: Fix Bluetooth crash when all filters are used.

* commit 'a9b2d01fbd0839d44c9505b84a6b00f1621e58b6':
Fix Bluetooth crash when all filters are used.
a93f4e21950d6edc2bfd68356ddefffa259a277c 13-Jan-2015 Wink Saville <wink@google.com> Rename reg/unreg OnSubscriptionsChangedListener.

To addOnSubscriptionsChangedListener and
removeOnSubscriptionsChangedListener.

Bug: 18984103
Change-Id: I6636905093812af89c1c3702840e44c8c5ea891f
luetooth/hfp/HeadsetPhoneState.java
5f659853fff6a50fd12e1f7956997cbef244f798 07-Jan-2015 Andre Eisenbach <eisenbach@google.com> Improve VCARD filter logic and reduce log spam

Remove a stray log message in VCardFilter.applyFilter() function that
leads to high-frequency log spam during phone book synchronization. Also
refactored the logic to avoid multiple loops & loop iterations causing
higher CPU load.

Bug: 18913091
Change-Id: I3c6d3c3373d4a74a930d182ee2641959461b0556
luetooth/pbap/BluetoothPbapVcardManager.java
a8f9e6399874fa392e12d82409281da04607d64d 09-Jan-2015 Wei Wang <weiwa@google.com> Fix Bluetooth crash when all filters are used.

Bug:18963121

Change-Id: Ia69ad697d5be5b0a5e076f33e513aa2698a7468c
luetooth/gatt/ScanManager.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
97f537976cab544a1533338938eaa0547350903e 18-Dec-2014 Andre Eisenbach <eisenbach@google.com> am a4774d88: am cd1091ef: Merge "Add EventLog for configHciSnoopLog() security check" into lmp-mr1-dev

* commit 'a4774d8857beabf477f5093060bda2ca0356632d':
Add EventLog for configHciSnoopLog() security check
cd1091ef948a708bd5ce83f6dc2921710a217684 18-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Add EventLog for configHciSnoopLog() security check" into lmp-mr1-dev
ab5a7206638a3b68207800687a606894d629291e 18-Dec-2014 Sungmin Choi <sungmin.choi@lge.com> Add hwp MIME type to transfer/receive over bluetooth

Bug: 18788282
Change-Id: I2f67cf7b492d3e22d09dbe002a2a93d653db7736
luetooth/opp/Constants.java
9ab1d44d3d9cfd459b868879ba9a5eefe3ed0cbf 17-Dec-2014 Andre Eisenbach <eisenbach@google.com> Add EventLog for configHciSnoopLog() security check

Bug: 18643224
Change-Id: I9c3f5e0880310e02a187d88349c5624bdade42eb
luetooth/btservice/AdapterService.java
6cc821c53da5a042fd80cbc80a63ad6064647037 17-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 2cb62f86: am b8a3025b: am da70d245: Merge "Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT" into lmp-mr1-dev

* commit '2cb62f8611ea63a0546fef97a86f664fe147dab2':
Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT
2cb62f8611ea63a0546fef97a86f664fe147dab2 17-Dec-2014 Andre Eisenbach <eisenbach@google.com> am b8a3025b: am da70d245: Merge "Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT" into lmp-mr1-dev

* commit 'b8a3025ba9c8bd166496e7683613402d302323e5':
Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT
da70d245699bdf2d6c9ffcf409ce3213804de81a 17-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT" into lmp-mr1-dev
6a6259b859cca9a5cc5b6ec42ab487a5d81f2119 17-Dec-2014 Santos Cordon <santoscordon@google.com> am f4e76824: am dd7ad56b: am 17adc53c: Merge "Allow system process to interact with Bluetooth across users." into lmp-mr1-dev

* commit 'f4e76824ca9c8b728680bd8159ee96cdfd354f79':
Allow system process to interact with Bluetooth across users.
f4e76824ca9c8b728680bd8159ee96cdfd354f79 17-Dec-2014 Santos Cordon <santoscordon@google.com> am dd7ad56b: am 17adc53c: Merge "Allow system process to interact with Bluetooth across users." into lmp-mr1-dev

* commit 'dd7ad56b9bd470c7312136e91d6d803287c3a3cc':
Allow system process to interact with Bluetooth across users.
17adc53c8583e7cadbdfbe39f6a989ff2b98c521 17-Dec-2014 Santos Cordon <santoscordon@google.com> Merge "Allow system process to interact with Bluetooth across users." into lmp-mr1-dev
02bebee111e2ff96ed1484a49bdabebe40137fb5 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Enforce BLUETOOTH_PRIVILEGED permission for HID-over-GATT

Bug: 18359172
Change-Id: I06ed22af9dab8129ba7668dadd5b988d63c8a527
luetooth/gatt/GattService.java
8e6936eae2f949066dcc6e2e66a48ffa50450402 16-Dec-2014 Santos Cordon <santoscordon@google.com> Allow system process to interact with Bluetooth across users.

Bug: 18688307
Change-Id: If31703fbe515baa40c242f99a61479a1ec8152b1
luetooth/Utils.java
5464d3b93bb16dcfba2659363419c0061da605c1 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am af4453d7: am b8997ce7: am 561f8821: Merge "Prevent possible NullPointerException when service is destroyed" into lmp-mr1-dev

* commit 'af4453d7d169f94b8f561b226dbf767d76d9d28a':
Prevent possible NullPointerException when service is destroyed
af4453d7d169f94b8f561b226dbf767d76d9d28a 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am b8997ce7: am 561f8821: Merge "Prevent possible NullPointerException when service is destroyed" into lmp-mr1-dev

* commit 'b8997ce7ac3c917edf71a2880b68541678c5fec3':
Prevent possible NullPointerException when service is destroyed
561f8821e976cfcdd5503e1b645417ef6506a995 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Prevent possible NullPointerException when service is destroyed" into lmp-mr1-dev
a1772b03b58d2821a621b40b7e8d1dba1213a556 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Prevent possible NullPointerException when service is destroyed

Bug: 18757778
Change-Id: Iaf2c8e41a5733379d171f58a35d09c506080fe5d
luetooth/btservice/ProfileService.java
da5ad59790c084cee112a7341d1bed0e748ed87e 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 86111508: am 64c4e01e: am ff125cce: Merge "Prevent duplicate OPP permission request dialogs" into lmp-mr1-dev

* commit '86111508c9adddf8f26c4d1b05ba28d21c0033c2':
Prevent duplicate OPP permission request dialogs
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
86111508c9adddf8f26c4d1b05ba28d21c0033c2 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 64c4e01e: am ff125cce: Merge "Prevent duplicate OPP permission request dialogs" into lmp-mr1-dev

* commit '64c4e01e7d4c0257f074ad03e149474a4f19d086':
Prevent duplicate OPP permission request dialogs
3ef42ba6d68aeda0c52b936da3196804365c4452 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 8959f11b: am 79606a97: Prevent non-system users from enabling Bluetooth HCI logging

* commit '8959f11b523a4418f3ec2b46c7c50199c0d4de86':
Prevent non-system users from enabling Bluetooth HCI logging
ff125cce1a5689a64e0eb4810851c3ef4304a1d3 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Prevent duplicate OPP permission request dialogs" into lmp-mr1-dev
79606a976b1ba0399ef94798b82e180c8376ecaf 16-Dec-2014 Andre Eisenbach <eisenbach@google.com> Prevent non-system users from enabling Bluetooth HCI logging

Bug: 18643224
Change-Id: I990aa3dac478d332f565496d0353c9677ea85d46
luetooth/btservice/AdapterService.java
0a7aa4ad09ec442621266bae8d1815afdcb0d3c4 15-Dec-2014 Narayan Kamath <narayan@google.com> am a4a61b09: Merge "Remove bogus apache-http dependency."

* commit 'a4a61b09975d8cefbc7baa7313376c87a585b476':
Remove bogus apache-http dependency.
9e86038fdfa10e96fb5193f2b2e572a47fea8f06 15-Dec-2014 Narayan Kamath <narayan@google.com> Merge "Remove bogus apache-http dependency."
4c890d1d51db9f70ce0e67e4d1c20bed9e03f6b8 12-Dec-2014 Narayan Kamath <narayan@google.com> Remove bogus apache-http dependency.

Wasn't really being used for much of anything.

bug: 18027885

(cherry picked from commit 74d126e2f790c5946c7be0e087cdcbabc22468d7)

Change-Id: I04c8eeb05bef98176b1c523dd255948b42184867
luetooth/map/BluetoothMapContent.java
01b3991ff968cbc8300fdaf42bbe3f5614ac4c56 14-Dec-2014 Andre Eisenbach <eisenbach@google.com> Prevent duplicate OPP permission request dialogs

When multiple files are sent in a single OPP session, the user should be
prompted to accept/reject only once.

Bug: 17770561
Change-Id: I438116915883c5fdc2d743f13456006f66511c0f
luetooth/opp/BluetoothOppObexServerSession.java
46833e97a97c6feb614fb942a1e43451522850b9 12-Dec-2014 Wink Saville <wink@google.com> am 74904502: am fc659040: am 75f77e99: Merge "Rename isValidSubId to isValidSubscriptionid." into lmp-mr1-dev

* commit '74904502b34ebf7967a045ea6056bb664f0d4c45':
Rename isValidSubId to isValidSubscriptionid.
f959c5ec67faca63050e27e70901bdaa5db4d1a4 12-Dec-2014 Kim Schulz <k.schulz@samsung.com> am ac972c4f: am ac3708eb: am 28446a56: Prevent Cursor leakage in Bluetooth MAP

* commit 'ac972c4fef8edcf587976e469f7a8810a4985006':
Prevent Cursor leakage in Bluetooth MAP
74d126e2f790c5946c7be0e087cdcbabc22468d7 12-Dec-2014 Narayan Kamath <narayan@google.com> Remove bogus apache-http dependency.

Wasn't really being used for much of anything.

bug: 18027885
Change-Id: I714eaa0e066301c32a23fe46858a33f656106cfa
luetooth/map/BluetoothMapContent.java
74904502b34ebf7967a045ea6056bb664f0d4c45 12-Dec-2014 Wink Saville <wink@google.com> am fc659040: am 75f77e99: Merge "Rename isValidSubId to isValidSubscriptionid." into lmp-mr1-dev

* commit 'fc65904080390e0ce02f8c0cc2d4033ed0f61494':
Rename isValidSubId to isValidSubscriptionid.
ac972c4fef8edcf587976e469f7a8810a4985006 12-Dec-2014 Kim Schulz <k.schulz@samsung.com> am ac3708eb: am 28446a56: Prevent Cursor leakage in Bluetooth MAP

* commit 'ac3708eb8c12d68feac636487db01f06acaf7681':
Prevent Cursor leakage in Bluetooth MAP
75f77e9970a4b4492e025257fccefcce612bc501 12-Dec-2014 Wink Saville <wink@google.com> Merge "Rename isValidSubId to isValidSubscriptionid." into lmp-mr1-dev
28446a56718e80574ba7b81901fc5a1368bf5839 10-Dec-2014 Kim Schulz <k.schulz@samsung.com> Prevent Cursor leakage in Bluetooth MAP

Bug: 18415378
Change-Id: Id513ee848dd21c641d77be38bdc6be85b5ef87a8
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapEmailSettingsLoader.java
luetooth/map/BluetoothMapObexServer.java
02e4dd41f4f1e7c4c929df709a4e75cf4a469a4f 11-Dec-2014 Wink Saville <wink@google.com> Rename isValidSubId to isValidSubscriptionid.

Bug: 18668873
Change-Id: Ie709a62bbb74e0a767daeb9e3fb3aecd4c45df44
luetooth/hfp/HeadsetPhoneState.java
b61d88635795c88729c2e50820afb248b4e491a8 10-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 1334c9c3: am 1c0e2f0a: am 95ada143: Merge "Remove missing object to avoid NPE" into lmp-mr1-dev

* commit '1334c9c374f1644a42be38402a67d103fd5774a3':
Remove missing object to avoid NPE
a98eb048a07b35461906df94a0fa0e1f46690c4c 10-Dec-2014 Wei Wang <weiwa@google.com> am 1b432543: am 4dd91650: am 4bb5e13f: Fix timestamp parsing issue for full scan results.

* commit '1b4325430a61fec066348beb943152d5ef30383b':
Fix timestamp parsing issue for full scan results.
83c509111b13efb605b53080ac8ff84be7a87367 10-Dec-2014 Jason Monk <jmonk@google.com> am e51e96d8: am 7d8cf021: am c493bf36: Merge "Allow SystemUI access to bluetooth from user 0" into lmp-mr1-dev

* commit 'e51e96d8abc5f64dcefc6a6acef043e74cac88b6':
Allow SystemUI access to bluetooth from user 0
2d7d3ec0224ad440c823264ee5c3c2645480edae 10-Dec-2014 Prem Kumar <premk@google.com> am f50894ec: am 608d17e9: am fa9d2030: Merge "Revert "Bluetooth: Added Shared Preferences to restore tethering preference"" into lmp-mr1-dev

* commit 'f50894ecea6c3eddb1c9994ad07122386f6dc29a':
Revert "Bluetooth: Added Shared Preferences to restore tethering preference"
1334c9c374f1644a42be38402a67d103fd5774a3 09-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 1c0e2f0a: am 95ada143: Merge "Remove missing object to avoid NPE" into lmp-mr1-dev

* commit '1c0e2f0af82c2dedb4919e935e911edb9d0f6830':
Remove missing object to avoid NPE
95ada14315a8ed5650508342a673710b3504af7e 09-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Remove missing object to avoid NPE" into lmp-mr1-dev
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.
1b4325430a61fec066348beb943152d5ef30383b 09-Dec-2014 Wei Wang <weiwa@google.com> am 4dd91650: am 4bb5e13f: Fix timestamp parsing issue for full scan results.

* commit '4dd916507f692ca52a67fd9cc150d805e36055eb':
Fix timestamp parsing issue for full scan results.
e51e96d8abc5f64dcefc6a6acef043e74cac88b6 08-Dec-2014 Jason Monk <jmonk@google.com> am 7d8cf021: am c493bf36: Merge "Allow SystemUI access to bluetooth from user 0" into lmp-mr1-dev

* commit '7d8cf02125e4589270a2a6952ea068660e34e743':
Allow SystemUI access to bluetooth from user 0
f50894ecea6c3eddb1c9994ad07122386f6dc29a 08-Dec-2014 Prem Kumar <premk@google.com> am 608d17e9: am fa9d2030: Merge "Revert "Bluetooth: Added Shared Preferences to restore tethering preference"" into lmp-mr1-dev

* commit '608d17e9c62c36c900259cd16fe41e1b02e93664':
Revert "Bluetooth: Added Shared Preferences to restore tethering preference"
4bb5e13f2902dc78048ede782996e78e7314afd5 08-Dec-2014 Wei Wang <weiwa@google.com> Fix timestamp parsing issue for full scan results.

Bug:18663523
Change-Id: If0ba083125d75e857072519fc7d6226a4db0273a
luetooth/gatt/GattService.java
64e6c05fac01604ac12676118d6b111781fc55c8 08-Dec-2014 Benjamin Franz <bfranz@google.com> am ebdd2435: am 42a756a0: Merge "Allow managed profile apps to use some bluetooth functionality." into lmp-mr1-dev

* commit 'ebdd243545cb732eda9a69e71ff2499c54467fb0':
Allow managed profile apps to use some bluetooth functionality.
c493bf3669d606a18604d201ac52617e65da4958 08-Dec-2014 Jason Monk <jmonk@google.com> Merge "Allow SystemUI access to bluetooth from user 0" into lmp-mr1-dev
fa9d203017d7d78d45b48ff4362a56cb1300521a 08-Dec-2014 Prem Kumar <premk@google.com> Merge "Revert "Bluetooth: Added Shared Preferences to restore tethering preference"" into lmp-mr1-dev
465bbd2160749d9e0a3f3aabeb4e20bb51573001 05-Dec-2014 Jason Monk <jmonk@google.com> Allow SystemUI access to bluetooth from user 0

SystemUI always runs in the owner user, so when a secondary user
if foreground we need a special case to allow it access to bluetooth.

Bug: 18151285
Change-Id: I555dc2e4b4ff4929f9796fb888dd845fd066b368
luetooth/Utils.java
42a756a0362820b268136d8357bc0ab3befea129 05-Dec-2014 Benjamin Franz <bfranz@google.com> Merge "Allow managed profile apps to use some bluetooth functionality." into lmp-mr1-dev
6600afba0efab1e786ebc64c2b4374a2caea2fa4 05-Dec-2014 Matthew Xie <mattx@google.com> am fc1b918c: am d854a3d9: am c7b57a32: Merge "Nullpointer check on mAdapterService in ProfileService#onCreate" into lmp-mr1-dev

* commit 'fc1b918c75994c90158ef169fda88c35bb9e43de':
Nullpointer check on mAdapterService in ProfileService#onCreate
fc1b918c75994c90158ef169fda88c35bb9e43de 04-Dec-2014 Matthew Xie <mattx@google.com> am d854a3d9: am c7b57a32: Merge "Nullpointer check on mAdapterService in ProfileService#onCreate" into lmp-mr1-dev

* commit 'd854a3d9f26d14e9238180ccc4441fdf13de2e61':
Nullpointer check on mAdapterService in ProfileService#onCreate
8d18ea6347e6ca1d6cce153be0f12dfe25524f6d 04-Dec-2014 Matthew Xie <mattx@google.com> am 76ef321b: am 08b0b7ac: am ee66ca5f: Merge "Turn off map debug verbose messages" into lmp-mr1-dev

* commit '76ef321b367cbf8e81fa31aad3a277f086effb2f':
Turn off map debug verbose messages
76ef321b367cbf8e81fa31aad3a277f086effb2f 04-Dec-2014 Matthew Xie <mattx@google.com> am 08b0b7ac: am ee66ca5f: Merge "Turn off map debug verbose messages" into lmp-mr1-dev

* commit '08b0b7ac225cb954c0767903d9568bc6d6b645d9':
Turn off map debug verbose messages
c7b57a322ddf96f5c7f5398a36f72700dc0081da 04-Dec-2014 Matthew Xie <mattx@google.com> Merge "Nullpointer check on mAdapterService in ProfileService#onCreate" into lmp-mr1-dev
abe1879f779481f9ee1a48b2de343097a6ddcf85 04-Dec-2014 Matthew Xie <mattx@google.com> Nullpointer check on mAdapterService in ProfileService#onCreate

Bug: 18595130
Change-Id: I02d588dab94e1dc6c24402259e5b8cea2a98b482
luetooth/btservice/ProfileService.java
4b55d952e08f719b77270741b13e2dace90d2aa1 03-Dec-2014 Matthew Xie <mattx@google.com> Revert "Bluetooth: Added Shared Preferences to restore tethering preference"

This reverts commit cdd2da9489cdfcf35ffdc622eba6f2155f6d376e.
Bug 18452422
Change-Id: I6039ab98038773691dce7667c53256fa04c51df9
luetooth/pan/PanService.java
ee66ca5f8bc0f2b7ab26ff3a008f4fd7e30e1d44 03-Dec-2014 Matthew Xie <mattx@google.com> Merge "Turn off map debug verbose messages" into lmp-mr1-dev
9c031dab027f0e0e5400437fa4ce8be9491a34e7 31-Oct-2014 Michal Labedzki <michal.labedzki@sonymobile.com> Remove missing object to avoid NPE

Initialization of mContentView was removed in commit
addfd25b639047e8463772b14f249758bdb20fbc, but is still
referenced during timeout causing NPE. Remove reference
as it is not needed.

Bug: 18309654
Change-Id: Id42810a97d638fd761a32069b591fc2b647e3a67
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
e73166fc402f8835646d7733a577bceb2753d7c7 03-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 6c43243b: am f5610d22: am 888d015c: Merge "Add GATT debug information to dumpsys/bugreport" into lmp-mr1-dev

* commit '6c43243b30211ca71811d3ace639010c732fc141':
Add GATT debug information to dumpsys/bugreport
6c43243b30211ca71811d3ace639010c732fc141 02-Dec-2014 Andre Eisenbach <eisenbach@google.com> am f5610d22: am 888d015c: Merge "Add GATT debug information to dumpsys/bugreport" into lmp-mr1-dev

* commit 'f5610d223b65142730fae0112187eef9dee3bb4c':
Add GATT debug information to dumpsys/bugreport
888d015c7d6f2c98ff963cb78414cf86611bd84b 02-Dec-2014 Andre Eisenbach <eisenbach@google.com> Merge "Add GATT debug information to dumpsys/bugreport" into lmp-mr1-dev
a02de6484f9b6cac6b8c811edae11be55746b555 02-Dec-2014 Andre Eisenbach <eisenbach@google.com> Add GATT debug information to dumpsys/bugreport

Bug: 17894347
Change-Id: I70a2e237e4aa6a1057e5ff519f3f6148a27b3a98
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDebugUtils.java
luetooth/gatt/GattService.java
luetooth/gatt/HandleMap.java
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
luetooth/Utils.java
luetooth/btservice/AdapterService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
013ed2ea8e6a67c1b6b637aa75d4302d56b48688 02-Dec-2014 Andre Eisenbach <eisenbach@google.com> am a9993c9f: am 657b88c6: am 63fce3b9: Merge "Add server-side callback for change in MTU (3/4)" into lmp-mr1-dev

* commit 'a9993c9fa5a4ba5ddcf9c918013712799f96379a':
Add server-side callback for change in MTU (3/4)
a9993c9fa5a4ba5ddcf9c918013712799f96379a 02-Dec-2014 Andre Eisenbach <eisenbach@google.com> am 657b88c6: am 63fce3b9: Merge "Add server-side callback for change in MTU (3/4)" into lmp-mr1-dev

* commit '657b88c6cb0fd51bd6309e1f80af9743f8d3ebc4':
Add server-side callback for change in MTU (3/4)
ec8c0726bf056f79c1ad070ea1db2ed2910f2ef0 01-Dec-2014 Matthew Xie <mattx@google.com> Turn off map debug verbose messages

Still leave the debug messages on to provide some basic debug info
Bug: 18486776

Change-Id: I08fc5c69d9a128ec5ddc97203d02b82ced255262
luetooth/map/BluetoothMapService.java
e632e4bb8c873f102cac7d6f39585ea06f34c082 26-Nov-2014 Andre Eisenbach <eisenbach@google.com> Add server-side callback for change in MTU (3/4)

When a client requests to update the LE transport MTU, the server
currently does not get notified and can therefor not properly size
notifications appropriate to the current MTU.

Bug: 18388114
Change-Id: Ie075871cbc643bd3840e9ab472706f1565b74467
luetooth/gatt/GattService.java
e5c5677d15aea04acc475bba18c7bfd26ec0eff4 26-Nov-2014 Matthew Xie <mattx@google.com> am 328357fa: am 317f4e89: am fcd9bd0d: DO NOT MERGE Move wake alarm setting and releasing into AdapterService\'s handler

* commit '328357faf9d72738c0fe39b041e0cd98ccc383e1':
DO NOT MERGE Move wake alarm setting and releasing into AdapterService's handler
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
luetooth/btservice/AdapterService.java
ee8eff192b824a5666b99ce513c404976d3be9f5 25-Nov-2014 Matthew Xie <mattx@google.com> am c6001f91: am be875574: am 51d409fd: Merge "Check previous user confirmation before auto-confirm put request" into lmp-mr1-dev

* commit 'c6001f91a1d92b68273b22035922f82341b6c5fc':
Check previous user confirmation before auto-confirm put request
c6001f91a1d92b68273b22035922f82341b6c5fc 25-Nov-2014 Matthew Xie <mattx@google.com> am be875574: am 51d409fd: Merge "Check previous user confirmation before auto-confirm put request" into lmp-mr1-dev

* commit 'be875574c2f3f797732814ee41c7ffbb10c14f6c':
Check previous user confirmation before auto-confirm put request
2f65cee9a3058a183c67f95571aa1dda7077112f 25-Nov-2014 Matthew Xie <mattx@google.com> am 38a952fe: am b16b868d: am d4a6ad3a: am d981ab06: Check previous user confirmation before auto-confirm put request

* commit '38a952fe66d78602095ab65ef36f321e99c295a6':
Check previous user confirmation before auto-confirm put request
38a952fe66d78602095ab65ef36f321e99c295a6 25-Nov-2014 Matthew Xie <mattx@google.com> am b16b868d: am d4a6ad3a: am d981ab06: Check previous user confirmation before auto-confirm put request

* commit 'b16b868dc8df463e688069870d6f53ae17ecdaa8':
Check previous user confirmation before auto-confirm put request
b16b868dc8df463e688069870d6f53ae17ecdaa8 25-Nov-2014 Matthew Xie <mattx@google.com> am d4a6ad3a: am d981ab06: Check previous user confirmation before auto-confirm put request

* commit 'd4a6ad3a5f5d12ee6901b7a83260267c83dabd76':
Check previous user confirmation before auto-confirm put request
d981ab06c6844ef345cd0a1d3077c4840f978989 17-Nov-2014 Matthew Xie <mattx@google.com> Check previous user confirmation before auto-confirm put request

Also correct a confirm status change check in updateShare.
Bug: 17770561, 18343032

Change-Id: I8e7d10e73604c0bf1c88801a1caef7d579fbd1eb
(cherry picked from commit e93cc4d347fd5d263d7740ad85f7f99b64651126)
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
51d409fd2f9f594afea03463e45f28a67b010ed2 24-Nov-2014 Matthew Xie <mattx@google.com> Merge "Check previous user confirmation before auto-confirm put request" into lmp-mr1-dev
20bf4cb367b5258070d381b10212176b2decb985 24-Nov-2014 Wink Saville <wink@google.com> am cfc6bc9d: am 0f21f326: am 3eacacc7: Additional changes to SubscriptionManager API as per API council.

* commit 'cfc6bc9d9d197ab01da6fca8d80858a0934af222':
Additional changes to SubscriptionManager API as per API council.
cfc6bc9d9d197ab01da6fca8d80858a0934af222 24-Nov-2014 Wink Saville <wink@google.com> am 0f21f326: am 3eacacc7: Additional changes to SubscriptionManager API as per API council.

* commit '0f21f326ddcd76460fd18f1532a7d00981c08003':
Additional changes to SubscriptionManager API as per API council.
7b679c99b585e6070eda3716e0eb8df7e265655e 21-Nov-2014 Wink Saville <wink@google.com> am 0a037333: am da689e99: am 5532bb8c: Revert "Additional changes to SubscriptionManager API as per API council."

* commit '0a03733338043fb9e23426dbc39125def3a37db9':
Revert "Additional changes to SubscriptionManager API as per API council."
3de2ab0fea4111574dc80ecb3b9ed37bbddc6fbb 21-Nov-2014 Wink Saville <wink@google.com> am 864dcfa8: am 7a4b67f7: am 13e1a71b: Additional changes to SubscriptionManager API as per API council.

* commit '864dcfa845bfe8e900bd37689d17de30cfd37255':
Additional changes to SubscriptionManager API as per API council.
0a03733338043fb9e23426dbc39125def3a37db9 21-Nov-2014 Wink Saville <wink@google.com> am da689e99: am 5532bb8c: Revert "Additional changes to SubscriptionManager API as per API council."

* commit 'da689e99b43d46926525229536bc2d7579ed25d5':
Revert "Additional changes to SubscriptionManager API as per API council."
864dcfa845bfe8e900bd37689d17de30cfd37255 21-Nov-2014 Wink Saville <wink@google.com> am 7a4b67f7: am 13e1a71b: Additional changes to SubscriptionManager API as per API council.

* commit '7a4b67f70896bc9743bea465332da07564f6edcb':
Additional changes to SubscriptionManager API as per API council.
3eacacc7fd744658af7a862eb91172a6ae1ffba5 20-Nov-2014 Wink Saville <wink@google.com> Additional changes to SubscriptionManager API as per API council.

bug: 17575308
Change-Id: Idd98aa46c15a9219ccf28091c62602ac8bf16c62
luetooth/hfp/HeadsetPhoneState.java
5532bb8c2dd4a785951df8baffe8b7a07f3a4b01 20-Nov-2014 Wink Saville <wink@google.com> Revert "Additional changes to SubscriptionManager API as per API council."

This reverts commit 13e1a71bf0cf955ac39390fd96fd3f04e1954ef6.

Change-Id: Ib22d745d17dcf6dca3567e903670ca7cc323138b
luetooth/hfp/HeadsetPhoneState.java
13e1a71bf0cf955ac39390fd96fd3f04e1954ef6 18-Nov-2014 Wink Saville <wink@google.com> Additional changes to SubscriptionManager API as per API council.

bug: 17575308
Change-Id: I7773965094510999bfce8fc6b2b31ba6ce496653
luetooth/hfp/HeadsetPhoneState.java
e93cc4d347fd5d263d7740ad85f7f99b64651126 17-Nov-2014 Matthew Xie <mattx@google.com> Check previous user confirmation before auto-confirm put request

Also correct a confirm status change check in updateShare.
Bug: 17770561, 18343032

Change-Id: I8e7d10e73604c0bf1c88801a1caef7d579fbd1eb
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
318e34c3f0d60e3373dab8026aacea6880b5f448 12-Nov-2014 Wink Saville <wink@google.com> am cea09836: am a49560c0: am cf496e42: Update SubscriptionManager API as per API council.

* commit 'cea09836d12a0aa1ab6748fb5328defedbebd958':
Update SubscriptionManager API as per API council.
cea09836d12a0aa1ab6748fb5328defedbebd958 12-Nov-2014 Wink Saville <wink@google.com> am a49560c0: am cf496e42: Update SubscriptionManager API as per API council.

* commit 'a49560c0d801f35b02b86d63bbadefc912147de3':
Update SubscriptionManager API as per API council.
cf496e4230a5067a19e067115502b3961c9bf220 11-Nov-2014 Wink Saville <wink@google.com> Update SubscriptionManager API as per API council.

bug: 17575308
Change-Id: Ib39a60e4f75981a466e9d606ec627756efad018d
luetooth/hfp/HeadsetPhoneState.java
5c48b66a94a8129824e741c06356dfad766f52f7 08-Nov-2014 Mike Lockwood <lockwood@google.com> am a8855e56: am fa46a2f6: am cc633970: Merge "Add dumpsys support for bluetooth" into lmp-mr1-dev

* commit 'a8855e560a20888731234a26a4753d902e6a11fe':
Add dumpsys support for bluetooth
a8855e560a20888731234a26a4753d902e6a11fe 08-Nov-2014 Mike Lockwood <lockwood@google.com> am fa46a2f6: am cc633970: Merge "Add dumpsys support for bluetooth" into lmp-mr1-dev

* commit 'fa46a2f6087f21c9cc6f7148900c99442fae9589':
Add dumpsys support for bluetooth
cc633970b1fc16db030da1634a0c92fa3548a465 08-Nov-2014 Mike Lockwood <lockwood@google.com> Merge "Add dumpsys support for bluetooth" into lmp-mr1-dev
2f9187a2c99f49a07d6c12e2bb4636b68f820ea6 07-Nov-2014 Matthew Xie <mattx@google.com> am 558571ba: am 5a8e9b03: am a75e97e7: am 6c32875f: am b81ccaea: am 964a72ae: updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

* commit '558571bac3e21acce0056fed8873b23e0309078a':
updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it
558571bac3e21acce0056fed8873b23e0309078a 07-Nov-2014 Matthew Xie <mattx@google.com> am 5a8e9b03: am a75e97e7: am 6c32875f: am b81ccaea: am 964a72ae: updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

* commit '5a8e9b03c2a3333a23bc143aa1e036c4556bbe7b':
updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it
5a8e9b03c2a3333a23bc143aa1e036c4556bbe7b 07-Nov-2014 Matthew Xie <mattx@google.com> am a75e97e7: am 6c32875f: am b81ccaea: am 964a72ae: updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

* commit 'a75e97e7e56415d4b4d580cf7c780bcf1659e2af':
updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it
6c32875f190e8d04f425ef142416a8f2a535a3df 07-Nov-2014 Matthew Xie <mattx@google.com> am b81ccaea: am 964a72ae: updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

* commit 'b81ccaea320de5e4fc19d5bc5d81874e9e68ead1':
updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it
964a72ae9eebe882aebcab4b5326afb6cc06f595 23-Oct-2014 Matthew Xie <mattx@google.com> updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

bug 17770561
Change-Id: I34fb018d9787b4deef8592c71f5539778e76e325
(cherry picked from commit 70743aa46fa95bd252acea614bfde8cc65e03890)
luetooth/opp/BluetoothOppService.java
0301badedb14c68fe1c0e46efc14eb24411e333c 22-Aug-2014 Mike Lockwood <lockwood@google.com> Add BluetoothDevice field to BluetoothHeadsetClientCall

Change-Id: I07134da3b93e1db087ebbb9b97b7a31dbae37272
luetooth/hfpclient/HeadsetClientStateMachine.java
7bf6f95f4f94ccd4c1d17c0606a497168b36312a 31-Oct-2014 Wei Wang <weiwa@google.com> am 0ce8246c: am cbc5d0ef: am ac67c808: Fix batch timestamp parsing error.

* commit '0ce8246cb73ba67ae1dab6854a3583c10e7c5117':
Fix batch timestamp parsing error.
a466ac649e0441327960619788be930a0a8651ba 31-Oct-2014 Matthew Xie <mattx@google.com> am ab21da70: am 4e6ac48c: Merge "updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it" into lmp-mr1-dev

* commit 'ab21da70380aeb912863ef5a0028b4bb7797708a':
updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it
cbc5d0efdcc51f6ca83175a69074371d07203781 30-Oct-2014 Wei Wang <weiwa@google.com> am ac67c808: Fix batch timestamp parsing error.

* commit 'ac67c808d9c8072da9f36c1a964ee78135f42edb':
Fix batch timestamp parsing error.
ac67c808d9c8072da9f36c1a964ee78135f42edb 29-Oct-2014 Wei Wang <weiwa@google.com> Fix batch timestamp parsing error.

Bug:18166784
Change-Id: I4817a1410c570bd1fa59425c257fb4a3d96e9e1f
luetooth/gatt/GattService.java
luetooth/util/NumberUtils.java
4e6ac48c933b3ac8666fbc2dc1d3021689847067 29-Oct-2014 Matthew Xie <mattx@google.com> Merge "updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it" into lmp-mr1-dev
838949d46a4cc054985a8cfd682004f8dd6d3bbb 28-Oct-2014 Mike Lockwood <lockwood@google.com> Add dumpsys support for bluetooth

Bug: 18159457
Change-Id: I807a7d921b6e5baf111d0f0e3e182c6633a93b7c
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
luetooth/gatt/GattService.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
luetooth/hid/HidService.java
luetooth/map/BluetoothMapService.java
luetooth/pan/PanService.java
6879cbf4c4550615a3e07edebfe6e259e4915f04 28-Oct-2014 Wink Saville <wink@google.com> am 22017f4e: am 9b95221e: Merge "Change subId to int from long" into lmp-mr1-dev

* commit '22017f4edcadedece774b1b4de97fd91ba09033a':
Change subId to int from long
9b95221e5d4efc1678f3342a15c05f293cc79a05 27-Oct-2014 Wink Saville <wink@google.com> Merge "Change subId to int from long" into lmp-mr1-dev
eb1cfb15a9bd8bed9f44be96bccac1c43ad77367 25-Oct-2014 Matthew Xie <mattx@google.com> am 056ba3b9: am 050d2d9e: am e60b413f: am 739fb187: When local device originated connection to hid device, move out of quiet mode

* commit '056ba3b9a92f73c63c9ab1de9f88510c7b5d6889':
When local device originated connection to hid device, move out of quiet mode
e60b413fa9920c2210cf4a31c8b660593b4d4415 25-Oct-2014 Matthew Xie <mattx@google.com> am 739fb187: When local device originated connection to hid device, move out of quiet mode

* commit '739fb187689df1113f8403ef22da811aa614193d':
When local device originated connection to hid device, move out of quiet mode
739fb187689df1113f8403ef22da811aa614193d 24-Oct-2014 Matthew Xie <mattx@google.com> When local device originated connection to hid device, move out of quiet mode

bug 17480992

Change-Id: Ia3f5ef4886dfde370abe5b35a80ab80a4f030f37
luetooth/hid/HidService.java
70743aa46fa95bd252acea614bfde8cc65e03890 23-Oct-2014 Matthew Xie <mattx@google.com> updateshare confirm logic missed cases like CONFIRMATION_DENIED, TIMEOUT. fix it

bug 17770561
Change-Id: I34fb018d9787b4deef8592c71f5539778e76e325
luetooth/opp/BluetoothOppService.java
7d05ab1e4565d883f26b1831b470d5f5baede45f 23-Oct-2014 Wink Saville <wink@google.com> Change subId to int from long

Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
luetooth/hfp/HeadsetPhoneState.java
1a74c7ed4d038c84d107e99bf7b2bc5ed4f3865d 20-Oct-2014 Wei Wang <weiwa@google.com> am 2fd9e483: am e8feb437: am e12e03fa: Merge "Remove spammy log information for BLE scan." into lmp-sprout-dev

* commit '2fd9e4837d7a36e52530152fdb66392b019798f0':
Remove spammy log information for BLE scan.
f7a5598424273fe514ce3293cb11ad6c31ad6f17 18-Oct-2014 Wei Wang <weiwa@google.com> Remove spammy log information for BLE scan.

Bug:17574681
Change-Id: I44a9725aa4103734418411e6dac9c2e6ec564c4d
luetooth/gatt/GattService.java
fc6d6d6db59e2f39b04abde6eafa3e5f37faf40e 15-Oct-2014 Matthew Xie <mattx@google.com> am 17771285: Merge "ignore telephony call state if telephony mgr state is idle"

* commit '177712858d5897db18e2adf689c8e75f81f05c87':
ignore telephony call state if telephony mgr state is idle
c10981d2a7e1d477c78e375d3d876fbafd3a02f2 15-Oct-2014 Matthew Xie <mattx@google.com> am 17771285: Merge "ignore telephony call state if telephony mgr state is idle"

* commit '177712858d5897db18e2adf689c8e75f81f05c87':
ignore telephony call state if telephony mgr state is idle
1cecad2692a0b0a8e81e5eb5ed8206b0d98edb38 15-Oct-2014 Matthew Xie <mattx@google.com> am 7a306fb7: Merge "Update AVRCP play status only if music is streaming" into lmp-dev

* commit '7a306fb7b52cdf99411aaef4c7b44f51a14dc559':
Update AVRCP play status only if music is streaming
7a306fb7b52cdf99411aaef4c7b44f51a14dc559 15-Oct-2014 Matthew Xie <mattx@google.com> Merge "Update AVRCP play status only if music is streaming" into lmp-dev
671e9ea90eb85e1a993ff2d56e02d1014a1b8f39 14-Oct-2014 Wei Wang <weiwa@google.com> Merge "Add support of advertising through standard instance.(2/4)" into lmp-sprout-dev
10260dc85133bbfbc51c53f06ba8992e00d9b67a 04-Aug-2014 jbelloua <jean-marie.bellouard@intel.com> ignore telephony call state if telephony mgr state is idle

When re-connecting a BT headset, the headset state machine requests
telephony stack call state (through queryPhoneState) once
SLC is established. The answer is received asynchronously.

If there is a virtual call (e.g. voip/hang out/skype) ongoing while
connecting BT headset, the audio will be switched automatically to BT SCO
path once connected.

Issue: if the call state from telephony is received while the BT headset
is being used for a virtual call, then the virtual call is stopped,
even if there is no call ongoing, and audio will be routed back to primary
device (speaker/headset).

Proposal: ignore the telephony state in case there is a virtual
call ongoing, but no CSV call, and keep audio routed to the BT
SCO path.

Change-Id: If0ebe8c5cd08f48dd56a593e37f3f05a4fccfc97
jean-marie.bellouard <jean-marie.bellouard@intel.com>
luetooth/hfp/HeadsetStateMachine.java
93e837dba1f1e976fe827466e2b2c3bd6f1d6ada 10-Oct-2014 Tyler Gunn <tgunn@google.com> am a40ac96c: Issue: turning on bluetooth headset in call doesn\'t change route (2/2).

* commit 'a40ac96c186b6f2105906bb07be45fc8d2ce1436':
Issue: turning on bluetooth headset in call doesn't change route (2/2).
a40ac96c186b6f2105906bb07be45fc8d2ce1436 10-Oct-2014 Tyler Gunn <tgunn@google.com> Issue: turning on bluetooth headset in call doesn't change route (2/2).

In addition to a failure to report CallState from Telecom, the broadcast
of the state change was happening before the active device was set,
causing Telecom to receive the broadcast indicating the audio state has
changed, only to have the Bluetooth service report that bluetooth audio
is not connected yet.

Bug: 17933664
Change-Id: Id4e7c6d4085f5ee990a8d19da8c089399ee60c6d
luetooth/hfp/HeadsetStateMachine.java
22bad7047263a6924423d12718738fdcc7b0352c 09-Oct-2014 Ravi Nagarajan <nravi@broadcom.com> Update AVRCP play status only if music is streaming

AVRCP play status was updated based on AVDTP stream state. Enhanced this
logic to update the status only when music is streaming
bug 12099469

Change-Id: Idef0180cd0d0b78fa392a5354320440fce9b81a7
luetooth/avrcp/Avrcp.java
5907b58808823e6b1c8835588c4eb65d2f00ba69 09-Oct-2014 Tyler Gunn <tgunn@google.com> am fbb1fe1e: Moving STATE_DISCONNECTED broadcast.

* commit 'fbb1fe1efa8459f932aed161fbcc0b5e4d52c2d5':
Moving STATE_DISCONNECTED broadcast.
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
luetooth/btservice/AdapterService.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
fbb1fe1efa8459f932aed161fbcc0b5e4d52c2d5 08-Oct-2014 Tyler Gunn <tgunn@google.com> Moving STATE_DISCONNECTED broadcast.

In Telecom we were seeing a bug where we received an
ACTION_CONNECTION_STATE_CHANGEDSTATE intent indicating the disconnection
of a bluetooth headset. The BluetoothManager in Telecom would then
query the Bluetooth service to see if there are any devices. Despite
being informed that the device in use was disconnected, it still showed
up as connected.

To fix this, I moved the state broadcast AFTER the disconnected device is
removed from the headset state machine. Looking through all other
disconnect broadcasts in that file, the disconnection happens AFTER in
all other cases as well.

Bug: 17899941
Change-Id: Ice4b2a5b1093e04ffe4c3241a3379aba56898792
luetooth/hfp/HeadsetStateMachine.java
b5f209a8886cb6ee47535f4f3878b6eff9c80709 02-Oct-2014 Matthew Xie <mattx@google.com> am 3d4a5452: Merge "MAP: Return OBEX_HTTP_NOT_IMPLEMENTED for msgUpdate for sms/mms" into lmp-dev

* commit '3d4a54529dd6033c082113b600d945531b759492':
MAP: Return OBEX_HTTP_NOT_IMPLEMENTED for msgUpdate for sms/mms
3d4a54529dd6033c082113b600d945531b759492 02-Oct-2014 Matthew Xie <mattx@google.com> Merge "MAP: Return OBEX_HTTP_NOT_IMPLEMENTED for msgUpdate for sms/mms" into lmp-dev
2d97e3bd45542e6e0289151fa0606e54247ddfd3 02-Oct-2014 Prem Kumar <premk@google.com> am 0bdf4df1: Merge "Add HOGP as hid profile when the remote device contain HOGP service" into lmp-dev

* commit '0bdf4df10c03602f609a1eb23aabe1fe772a89fd':
Add HOGP as hid profile when the remote device contain HOGP service
0bdf4df10c03602f609a1eb23aabe1fe772a89fd 02-Oct-2014 Prem Kumar <premk@google.com> Merge "Add HOGP as hid profile when the remote device contain HOGP service" into lmp-dev
ba4b2f5b1e32e742a130f79ee1a1d0509390c6b3 01-Oct-2014 Matthew Xie <mattx@google.com> MAP: Return OBEX_HTTP_NOT_IMPLEMENTED for msgUpdate for sms/mms

In MAP profile message update is not implemented for sms/mms.
bug 17723738

Change-Id: I6c7baaf9e6f54e7af1b6c8458a6a458239da7d10
luetooth/map/BluetoothMapObexServer.java
99f9e9b58a4214280d3ef678d098c2062c890815 01-Oct-2014 PauloftheWest <paulofthewest@google.com> am 335b2b8f: Fixed a Bluetooth MAP bug.

* commit '335b2b8f6f17c93a4c2b192c8e1b629e48b230b3':
Fixed a Bluetooth MAP bug.
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
luetooth/btservice/AdapterService.java
335b2b8f6f17c93a4c2b192c8e1b629e48b230b3 29-Sep-2014 PauloftheWest <paulofthewest@google.com> Fixed a Bluetooth MAP bug.

+ Beforehand, if a user disabled MAP and then unpaired the device, then
Settings would automatically deny future MAP requests from the device.

Bug: 17391677
Change-Id: I068f37426ed6a044ed2b5e9391cd9dd00908f867
luetooth/map/BluetoothMapService.java
01e6b152e182721e5d5dc28d9ae3e15d1c88eb7d 29-Sep-2014 Matthew Xie <mattx@google.com> am acb400b0: Merge "BT MAP: fix problem with fetching CDMA messages" into lmp-dev

* commit 'acb400b0598107c0427e3fb07b0a4a8fade5481e':
BT MAP: fix problem with fetching CDMA messages
acb400b0598107c0427e3fb07b0a4a8fade5481e 28-Sep-2014 Matthew Xie <mattx@google.com> Merge "BT MAP: fix problem with fetching CDMA messages" into lmp-dev
e796818505a0b57b225c3aeffc53f580c1e0c66e 25-Sep-2014 kschulz <k.schulz@samsung.com> BT MAP: fix problem with fetching CDMA messages

A bug in Java makes the Long.parse() function throw and exception when message
handles start to become negative (which happens for CDMA SMS messages).
Fix simply shifts the handle masks on byte down in order to get around
the bug.

Bug: 17627572
Change-Id: Ie41aef589dc9d3ecb8bc7167472218e57a52fa33
luetooth/map/BluetoothMapUtils.java
f83ecae321db18c40a867f4079a04e521ee2e472 25-Sep-2014 Andre Eisenbach <eisenbach@google.com> am b5b51ca8: Merge "Defer callbacks if the transport is congested" into lmp-dev

* commit 'b5b51ca82e3db31705e54687f998b1ea1787396a':
Defer callbacks if the transport is congested
b5b51ca82e3db31705e54687f998b1ea1787396a 25-Sep-2014 Andre Eisenbach <eisenbach@google.com> Merge "Defer callbacks if the transport is congested" into lmp-dev
09bd88fce8737161cbb577793bf193eeef26cf2c 24-Sep-2014 Ariel Gertzenstein <agertzen@google.com> am a51c13ae: Set FLAG_RECEIVER_FOREGROUND when broadcasting ACTION_PAIRING_REQUEST.

* commit 'a51c13ae7e6ce56922316a979aef570abafc9f3f':
Set FLAG_RECEIVER_FOREGROUND when broadcasting ACTION_PAIRING_REQUEST.
934dee789c0c68607a704c5c31ae2e4b956dc227 19-Sep-2014 Prerepa Viswanadham <dham@google.com> Defer callbacks if the transport is congested

Hold client characteristic write callbacks and server notification
callbacks if the transport is congested. When the congestion clears up,
all queued callbacks are sent to the application.

Bug: 17289507
Change-Id: Ib22d7857ac3990fd3cc922aedd4258013e1af54c
luetooth/gatt/CallbackInfo.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
a51c13ae7e6ce56922316a979aef570abafc9f3f 23-Sep-2014 Ariel Gertzenstein <agertzen@google.com> Set FLAG_RECEIVER_FOREGROUND when broadcasting
ACTION_PAIRING_REQUEST.

Bug: 17590080

Change-Id: I0a7cde5953f706a2b41b02878f0fdbd2d9e8ae35
luetooth/btservice/BondStateMachine.java
69cf1e5bd33a030780112b8fb221c7cce73df3ce 19-Sep-2014 Matthew Xie <mattx@google.com> am 94023bd8: Merge "Save alias in RemoteDevice property before passing it to native layer" into lmp-dev

* commit '94023bd851cb80966d8f8006702d318057c83f09':
Save alias in RemoteDevice property before passing it to native layer
94023bd851cb80966d8f8006702d318057c83f09 19-Sep-2014 Matthew Xie <mattx@google.com> Merge "Save alias in RemoteDevice property before passing it to native layer" into lmp-dev
74277677d2a51d7c8ff60a778889f71e69763c21 18-Sep-2014 Matthew Xie <mattx@google.com> Save alias in RemoteDevice property before passing it to native layer

bug 17287682

Change-Id: Id7da194f66cf44d41e60f35665dfb1b279cac28f
luetooth/btservice/RemoteDevices.java
b821c49e043a7b34ce533d41406b8b2de20eaba4 18-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> am 00ab61e2: Merge "Use unified Tethering Permission Check" into lmp-dev

* commit '00ab61e21fd553620a466389907cb4dc089bb221':
Use unified Tethering Permission Check
00ab61e21fd553620a466389907cb4dc089bb221 18-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Use unified Tethering Permission Check" into lmp-dev
6a1885b17a039055a19a387c38e176a296a92f7f 17-Sep-2014 Wei Wang <weiwa@google.com> am e08a0eeb: Fix a typo that compares scanMode with callback types.

* commit 'e08a0eeb9cbf0ee732171d1c1d353aecdad0a7d2':
Fix a typo that compares scanMode with callback types.
e08a0eeb9cbf0ee732171d1c1d353aecdad0a7d2 17-Sep-2014 Wei Wang <weiwa@google.com> Fix a typo that compares scanMode with callback types.

Bug: 17187159
Change-Id: Ieca583e7cf02d63b9eceda7872511c9db280c04a
luetooth/gatt/GattService.java
b530067f2b3a212297560e8d3af19698eb4b20e9 17-Sep-2014 Rakesh Iyer <rni@google.com> am 620ff342: Merge "Don\'t leak PII into the logs." into lmp-dev

* commit '620ff342d30c30306d1aa73ec65e209dd3141ff0':
Don't leak PII into the logs.
620ff342d30c30306d1aa73ec65e209dd3141ff0 17-Sep-2014 Rakesh Iyer <rni@google.com> Merge "Don't leak PII into the logs." into lmp-dev
ec1d4bc6e702d180f3871f01c6b4884832f77d4e 17-Sep-2014 Wei Wang <weiwa@google.com> am 33a06059: Merge "Enforce permissions for BLE hidden APIs." into lmp-dev

* commit '33a06059be8506003003e41ec020bdce273da1a1':
Enforce permissions for BLE hidden APIs.
33a06059be8506003003e41ec020bdce273da1a1 17-Sep-2014 Wei Wang <weiwa@google.com> Merge "Enforce permissions for BLE hidden APIs." into lmp-dev
8e6c4bcf8f2275db33c7886b34eea0a6da427d08 17-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Use unified Tethering Permission Check

The BT and Wifi mechanisms for enabling Tethering did their own
permission checks. This set of changes unifies the check into
a ConnectivityManager function so they can be kept in sync.

bug:17435527
Change-Id: I8c157a5acf56ffbddd349cb6a45160ae7be8541b
luetooth/pan/PanService.java
02fc1acb99dbf3ae0a710ee7e4b6de8dd779e84e 17-Sep-2014 Rakesh Iyer <rni@google.com> Don't leak PII into the logs.

Guard a couple of the Log.v statements with the if (V) guard that
is used everywhere else in the file.

Bug: 17531755
Change-Id: I7ea06333132c400fca225d0c92cfca0d6c3024ab
luetooth/pbap/BluetoothPbapVcardManager.java
aee8955c63b2ff42e5655c89fe4cf4b212c25b36 17-Sep-2014 Stuart Scott <stuartscott@google.com> Merge topic 'ksd-to-lmp-sprout-dev' into lmp-sprout-dev

* changes:
[DS] Response fail instead of not response at all
Bluetooth sub selection
7808540749a98ff5f238b5d801a45d34d4f550ce 17-Sep-2014 Stuart Scott <stuartscott@google.com> Merge "[DS] Call cannot call out from Car kit" into lmp-sprout-dev
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
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/map/BluetoothMapService.java
luetooth/pbap/BluetoothPbapService.java
1cd7be76ea6af37476df0cc28e19248d94be4bfa 13-Sep-2014 Wei Wang <weiwa@google.com> Merge "Do not reuse all pass filter index." into lmp-dev
6ef76fa25c1de11cbb5ae35d645c68584f680ac8 12-Sep-2014 Wei Wang <weiwa@google.com> Enforce permissions for BLE hidden APIs.

Bug:17187159
Change-Id: Ibe467fa52fdead036a80922947cc295257221530
luetooth/gatt/GattService.java
8b17c7f2f98bbea105a41a0bb962a4581b7cce5c 10-Sep-2014 Casper Bonde <c.bonde@samsung.com> MAP: Workaround for missing size values in message data base

Not all messages in the MMS/Email message data bases have
the size/attachment size attribute set.

This causes MAP clients to behave wrongly, e.g. they
request to exclude attachments if the attachments size
is 0. Even for messages which actually have attachments.

The attachment size is the only way for MAP clients to
know if attachments are present, hence the behavior of
the client is not wrong.
bug 17389452

Change-Id: I82cd76bc044601eb6e8b190d0c6fc41b51410a93
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
luetooth/map/BluetoothMapContent.java
e25106a23565dfc7feeba707a2826ba2394d71e2 26-Jun-2014 Legler Wu <legler.wu@mediatek.com> [DS] Response fail instead of not response at all

when not able to get subscriber number (return null),
HFP shall response to remote devie with Error instead of
not responding at all.

Change-Id: I4dd90071b72d33de14c69f98a1360a4f53a8bb3f

Conflicts:
src/com/android/bluetooth/hfp/HeadsetStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
6ea139153681007ccf5d7b206296fb3c7d172ace 26-Jun-2014 Stuart Scott <stuartscott@google.com> Bluetooth sub selection

Change-Id: I181d4f8b206a4a46f1ae2305e22277f70eb24e69
luetooth/hfp/HeadsetPhoneState.java
2ca3331f43b767c108166dee9036b670cf126b88 11-Jun-2014 Legler Wu <legler.wu@mediatek.com> [DS] Call cannot call out from Car kit

The original code can not work since the subscription is wrong.
So BT can not correctly get the service / signal strength and update
to remote device. Thus some IOT issue happened.

Using the new interface to correctly register.

Change-Id: I2976eb12e44f78d896a04ef01a1a6ebb848f62f0

Conflicts:
src/com/android/bluetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetPhoneState.java
7ac43d2e29e3405b4df2e9ebd947ae7a9d10e8a0 11-Sep-2014 PauloftheWest <paulofthewest@google.com> Merge "Applied Material theme to Bluetooth file acceptance dialog." into lmp-dev
711d604b79f811f2fdeaae57bd4d5e31f3052747 11-Sep-2014 Ang Li <angli@google.com> Merge "Change broadcast ACTION_CONNECTION_ACCESS_REQUEST to be ordered." into lmp-dev
addfd25b639047e8463772b14f249758bdb20fbc 10-Sep-2014 PauloftheWest <paulofthewest@google.com> Applied Material theme to Bluetooth file acceptance dialog.

Bug: 17334507
Change-Id: I36d3ef5575ad84a27cda415c1d0e262f097e98a7
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
af5df2070741a4720abf61821fc217995b29101a 10-Sep-2014 Andre Eisenbach <eisenbach@google.com> Merge "Pairing failed after 50 attempts" into lmp-dev
44050ef0ada13303fc7d37f157b1afcf1c1da573 05-Sep-2014 Nitin Arora <niarora@codeaurora.org> BT-HF: Disable Multi HF feature.

Disable Multi HF feature by allowing max hf connections = 1
in HeadsetStateMachine.
bug 17321509

Change-Id: Ia477c728bfb1457def7f302d5533ce63446dffc7
luetooth/hfp/HeadsetStateMachine.java
11b41d8123241ba8e693e21c4db308bacff23f57 29-Jul-2014 Mudumba Ananth <ananthm@broadcom.com> Pairing failed after 50 attempts

-> The issue was caused due to delayed message sent for
bond_state_changed_callback in BondStateMachine and RemoteDevices
was sending the pairing request(sspRequestcallback) intent to the Settings APP
before even the bond state is changed.
-> Moved the SSPRequestCallback and PinRequestCallback to BondStateMachine
to synchronize the above two callbacks using a single message
queue in the BondStateMachine message handler.
-> Changed the pending command state to accept the SSP_REQUEST
and PIN_REQUEST messages and send the intents.

Bug: 16560957
Change-Id: I8372bdd2e96aa09215f2f1e98d6eed4e892637e6
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
beb0497605ef61062d0565d85897f4c842845a8f 09-Sep-2014 Ang Li <angli@google.com> Change broadcast ACTION_CONNECTION_ACCESS_REQUEST to be ordered.

Making this broadcast ordered makes it possible to be intercepted
before Settings get it. This is cruicial to Android Audo's use case
and test automation.

The previous change we put in:
https://googleplex-android-review.git.corp.google.com/#/c/499135
was accidentally overwritten by
https://googleplex-android-review.git.corp.google.com/#/c/503267

We are putting this change back in, and making similar changes for
PBAP and HFP.

Change-Id: Ia9b4c22a05d0c9beb1485b53ddf04c45fa210526
luetooth/hfp/AtPhonebook.java
luetooth/map/BluetoothMapService.java
luetooth/pbap/BluetoothPbapService.java
2b9ac142e56cf6a6cc0572fb75f8a5ce40894f8b 05-Sep-2014 Wei Wang <weiwa@google.com> Do not reuse all pass filter index.

Bug:17425379
Change-Id: Iba4c40f8822b182718db060c3f2eeff7aabdb286
luetooth/gatt/ScanManager.java
5ca43226937e098a2404d61de3f991af5c6a2689 05-Sep-2014 Wei Wang <weiwa@google.com> Merge "Fixed batch scan returning status 12 when restarted." into lmp-dev
96509d5ff7109bc42a4c25143f70ec41a127d109 03-Sep-2014 Wei Wang <weiwa@google.com> Fixed batch scan returning status 12 when restarted.

Also fixed no batch scan results when both truncated and
full batch are enabled.

Added a BatchScanParams to hold parameters for batch scan.

Bug:16850169
Bug:17213118
Change-Id: Ib3bb7442aa2657912ef4377f825388ac8e1010bb
luetooth/Utils.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
ab10811e960ed0a5c6098467b2184895831f33ac 05-Sep-2014 Prerepa Viswanadham <dham@google.com> Return right connection status when connection failed

bug: 17326529
Change-Id: I57abf2f6a98c469248613ea386f0fa2ffaf5eac4
luetooth/gatt/GattService.java
76b4771991363ff69a099f483362805e4df63836 29-Aug-2014 Andre Eisenbach <eisenbach@google.com> Merge "redirect the ff/rw key event to ff/rw enabled player" into lmp-dev
b8bc0231e0074d923d7d961548d407babd41eb79 29-Aug-2014 Wei Wang <weiwa@google.com> Merge "More precise control of batch alarm." into lmp-dev
b4326c19eafb1d4437a82973b9019274e1e07aed 28-Aug-2014 Selim Cinek <cinek@google.com> Merge "Colored notifications" into lmp-dev
efbb85824de09776725d264cd872ccbedcc8b42b 28-Aug-2014 Matthew Xie <mattx@google.com> Merge "Listen for phone state on connect instead of SLC" into lmp-dev
3bfba36385f686ef63445dbecb627030573a04fd 21-Aug-2014 Wei Wang <weiwa@google.com> More precise control of batch alarm.

Use setWindow instead of setRepeating for alarms.
SetRepeating is inexact and the alarm can be triggered quite randomly,
while setWindow gives more precise control of trigger time.

Also unregister alarmReceiver during cleanup to avoid leak of
IntentReceiver.

Bug: 16689485, Bug:16826684
Change-Id: I5245e1424aad3c11ab5ce8a7393031e9d4f1dd03
luetooth/gatt/ScanManager.java
881675b362bde18acbbcf69c513175addca4a8ba 27-Aug-2014 Zhenye Zhu <zhenye@broadcom.com> redirect the ff/rw key event to ff/rw enabled player

Added code to cleanup the forward/rewind
event queue and redirect the key event to
the ff/rw enabled player
Bug 16890205

Change-Id: If09c0693621d9f36fb7dc14177597e30450b87b6
luetooth/avrcp/Avrcp.java
0ce48bf302e010af811c903f8a986df567562ecf 27-Aug-2014 Selim Cinek <cinek@google.com> Colored notifications

Bug: 17128331
Change-Id: Ic1a4d9803790cc0f3e8003ede4da8cc8f26729cf
luetooth/opp/BluetoothOppNotification.java
luetooth/pbap/BluetoothPbapService.java
7c405bac41fc4ebb5c9cc7b5c896b023f7b1e9fc 25-Aug-2014 Prerepa Viswanadham <dham@google.com> Set batch scan params based on scan settings.

bug 17134263

Change-Id: Id0d314ad1c14ad20e32830ae2c8ad5f80765b28b
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
8e00c15a0c32c9bc7dab5038edf24bb418f181ef 19-Apr-2013 Ravi Nagarajan <nravi@broadcom.com> Listen for phone state on connect instead of SLC

Phone state listener changed to start on connect. This gaurantees
that the CIND response as part of SLC reflects the right indicator
values
bug 17020870

Change-Id: I47989643600edfa4d4e422998c3a644a7f7556b9
luetooth/hfp/HeadsetStateMachine.java
d54785926fc0150661b6e70d5d0dabef87be3d73 25-Aug-2014 Wei Wang <weiwa@google.com> Merge "Fix API council review comments. Also hide certain APIs(2/3)." into lmp-dev
24cb4d5082f4568074e5d1f375027a219aa40be7 24-Aug-2014 Wei Wang <weiwa@google.com> Merge "Fix race condition when advertising app dies." into lmp-dev
f9a51c08a1acf9a70a3e49f89f543b309822bd97 21-Aug-2014 Andre Eisenbach <eisenbach@google.com> Merge "LE: Rename new MTU and connection paramter update APIs" into lmp-dev
039bf1606bddb3794fd6aa9adee704733f89544f 12-Aug-2014 Wei Wang <weiwa@google.com> Fix race condition when advertising app dies.

Bug: 16565960
Change-Id: Ica801a1186e62fcba666deabe5989dd47d404b68
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
1dc1aab071533430ff1a0cfe1aa49e5f954f3518 20-Aug-2014 Andre Eisenbach <eisenbach@google.com> LE: Rename new MTU and connection paramter update APIs

bug 17005342
Change-Id: Ic773b5c4bb3da9777613c8094ad21ea6f720110d
luetooth/gatt/GattService.java
ecbfd7771dd2ee7665f7fc18bf869e480c6f5449 12-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Stop using LinkProperties for static configuration.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
luetooth/pan/BluetoothTetheringNetworkFactory.java
db0920ed7d9ef5385e36dfa922f351e4e6556a3e 15-Aug-2014 Wei Wang <weiwa@google.com> Fix API council review comments. Also hide certain APIs(2/3).

b/17006825

Change-Id: I6c0e739e44f8a9d26f3f2b03937b38d4dec893e7
luetooth/gatt/AdvertiseManager.java
03f23ee7d3868e97ec7ed1a3d81c149b5b0ebd69 13-Aug-2014 Wei Wang <weiwa@google.com> Add protection before cleaning up adv and scan manager.

b/16845251

Apparently for GattService stop and cleanup could be called before start
is even called.

Change-Id: Id0ac2e68da504f79160264012a0cdf5127eccfc7
luetooth/gatt/GattService.java
55a7eff213d57dd0ff948d441edb16f4a6ae2ea6 11-Aug-2014 Wei Wang <weiwa@google.com> Use nanos instead of micros in BLE scan.

Change-Id: Ifdaf101f92ae4c8d2bcecf62a1942961d6610151
luetooth/gatt/GattService.java
0d8f1ae3e070d7a13f8e482895bcab428a6c8381 08-Aug-2014 Wei Wang <weiwa@google.com> Merge "fix build." into lmp-dev
c1d460a4ee15238f33e9c2a61b571965accf9838 08-Aug-2014 Wei Wang <weiwa@google.com> fix build.

Change-Id: I034cc118ea4dca67ed6240b700d4ac504562ddfc
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
c43ce5118eab93469e31d56ee30043e5e011fa89 07-Aug-2014 Wei Wang <weiwa@google.com> Fix build.

Change-Id: Ied3bd289b662cd342ba05f5038175007d3211a63
luetooth/gatt/GattService.java
50cc9194f72c040f04c2ae0f0322246a570e8bfa 07-Aug-2014 Prerepa Viswanadham <dham@google.com> OnFound/Lost reporting: s/w detects the first match and
hw signal is used to report onlost.

Bug 16733710

Change-Id: I4d1d0320b6894fe1af59192eb56a4a801609049a
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
755ef770144daf1a0fbbabaa310bc300190dfd9c 08-Aug-2014 Andre Eisenbach <eisenbach@google.com> Merge "LE: Add limited advertising duration capability (3/3)" into lmp-dev
c1512abbe9bb60c94c5f46e90918983d1514c8e3 08-Aug-2014 Andre Eisenbach <eisenbach@google.com> LE: Add limited advertising duration capability (3/3)

Change-Id: Ib025d8a10cce07e8f731c005d963245aa988be73
luetooth/gatt/AdvertiseManager.java
5f8b46c673e2b862ab7ff7280915e89578bbd06e 07-Aug-2014 Wei Wang <weiwa@google.com> Merge "Clear pending data and allow all filter when batch stopped." into lmp-dev
00975169ba4eb5251397a66532ee9a3288c0f137 05-Aug-2014 Wei Wang <weiwa@google.com> Clear pending data and allow all filter when batch stopped.

Also send batch data to multiple clients for full batch.

b/16802098

Change-Id: Ife1723b818531fcf2cff897686f33f6b0a1d0aaa
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
326b5e610063ac24c0ba467ac585bd4c7f618a67 24-Jul-2014 Casper Bonde <c.bonde@samsung.com> BT MAP: added support for email sharing over BT

- added support for Emails
- added activity to do setup of the email accounts to share
- added improved handling of MMS, SMS and Email
- Many optimizations to speed (especially getMessageListing)
- fixed wakelock problem
- fixed user timeout problem when user do not react to msg access request
- added missing privileges
- support for Quoted Printable format
- added accountId in test case URIs
- fixed problem with service numbers being strings
- fixed problem with read flag in getMessage
- added support for transparent flag in Email Push
- added missing send-event for non-imap accounts
- set attachment size to 0 if text-only message
- fixed double send for sms messages with retry
- removed secondary phone numbers from recipient/originator
- removed insert-address-token in MMS messages
- fixed null-pointer exception in settings (missing extra in intent)
- send text-only mms as sms (workaround to make it cheaper)
- fixed rejection of native and fraction requests
- better handling of unknown message types in push
- fixed problem with possible illigal xml chars in message listing
- added missing WRITE_APN_SETTINGS permission to manifest
- fixed problem with notifications when pushing to folders other than OUTBOX
- removed debugging code
- added support for threadId
- fixed permission problems
- changed to use ContentProviderClients for Email app access
- fixed names for member vars

UPDATE: Moved the MAP E-mail API to the bluetooth package.

UPDATE: Added check for the presense of MMS parts.
This is needed due to a change in the MMS app/subsystem,
where deleted messages gets corrupted.

Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Change-Id: Ib5dbe7c2d5c0ba8d978ae843d840028592e3cab4
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapAuthenticator.java
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapEmailAppObserver.java
luetooth/map/BluetoothMapEmailSettings.java
luetooth/map/BluetoothMapEmailSettingsAdapter.java
luetooth/map/BluetoothMapEmailSettingsDataHolder.java
luetooth/map/BluetoothMapEmailSettingsItem.java
luetooth/map/BluetoothMapEmailSettingsLoader.java
luetooth/map/BluetoothMapFolderElement.java
luetooth/map/BluetoothMapMasInstance.java
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMapSmsPdu.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/BluetoothMapbMessage.java
luetooth/map/BluetoothMapbMessageEmail.java
luetooth/map/BluetoothMapbMessageMms.java
luetooth/map/BluetoothMapbMessageMmsEmail.java
luetooth/map/BluetoothMapbMessageSms.java
luetooth/map/BluetoothMnsObexClient.java
475a4f7727a082ccf289ce406e75c463750a515c 05-Aug-2014 Wei Wang <weiwa@google.com> Workaround for reversed mac addresses in batch scan.

b/16803363

Change-Id: I47299ed2a6191e7f05c229feb1f1f0424e486907
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
f021c4ee6ba53c8512807c1469b2432278cf6cca 05-Aug-2014 Andre Eisenbach <eisenbach@google.com> Merge "Add transport parameter to createBond() function (3/4)" into lmp-dev
db681f3973bd8a088a878fd6f41d4330cdbc5522 05-Aug-2014 Andre Eisenbach <eisenbach@google.com> Add transport parameter to createBond() function (3/4)

Change-Id: Id3c59bcc8f9efb20fffdebaff34d6b2593f5e5ca
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
62fb56f2ba7d998e3e7416fc19d25ea91cc85111 04-Aug-2014 Matthew Xie <mattx@google.com> Check null mHandler condition before invoking method on it

There is a path that clean up is called before stop call on HealthService
mHandler could be set to null
bug 16784750

Change-Id: Ie931fa502cf82d21c6bf97a8dc7035e5a1ed4b2e
luetooth/hdp/HealthService.java
a08ff547783c43175c90ed8bd3e4db53482b3dde 30-Jul-2014 Nitin Srivastava <nitinsr@codeaurora.org> MHF: Return the correct connection state for headset.

When more than 1 headset is connected, return the correct
connection state for a headset other than latest connected
headset.
bug 16514538
Change-Id: Id07165f2c023959b7a457a1c1c0ed5c227838973
luetooth/hfp/HeadsetStateMachine.java
97600f2df10fbbe1810141e1c4ef7091a6a55abe 03-Aug-2014 Wei Wang <weiwa@google.com> Change discard rule.

Change-Id: Icfc43371acb0e901a7f67a4c32c5dd2e63de49c3
luetooth/gatt/ScanManager.java
18999c2cfd477050de0ca88c3a73458235d82656 30-Jul-2014 Wei Wang <weiwa@google.com> Add a default impelementation of IBluetoothGattCallback(2/2).

b/16636127 Explicitly use UTF-8 for ScanRecord's local name

Change-Id: Ib152239cdee0becf3f49f1b610dfe1c2296c3647
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
7dca73a9bdbdbbea93bb0b6150702d21c533b229 01-Aug-2014 Wei Wang <weiwa@google.com> Merge "Change service data and manufacturer data to be repeated." into lmp-dev
e34b91565499994a4b04a1014432c8f90678972a 30-Jul-2014 Wei Wang <weiwa@google.com> Change service data and manufacturer data to be repeated.

Change-Id: Ie45ca40d3d84d192d65003ea3ac9ad428b281f94
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/ScanManager.java
5a95154a384076ae9ff43e79ae30085327e53cec 31-Jul-2014 Yicheng Fan <yichengfan@google.com> Merge "Remove client from advertiseManager correctly" into lmp-dev
61b76fd94c45ee1909cde1d08a643fc031ef287f 31-Jul-2014 Yicheng Fan <yichengfan@google.com> Remove client from advertiseManager correctly

Bug: 16711409
Change-Id: I3881593818edcf822ec07353da4a5ea6970f5d7c
luetooth/gatt/AdvertiseManager.java
3548bc374efdb3cc93d6856e71353291a90fd4a7 31-Jul-2014 Prerepa Viswanadham <dham@google.com> Reduce batch supported threshold to 1024 bytes

b/16680086

Change-Id: I671abd7dba321ab111280d1a1cb27aa93635a6d1
luetooth/btservice/AdapterService.java
f2f2e89a583d764066c4a84b3d5de5201310202b 31-Jul-2014 Prerepa Viswanadham <dham@google.com> Incorrect data type
bt_local_le_features_t of wrong size

b/16653133

Change-Id: Ifade7add084fcfbef60abb7d8e5d47e619b0e812
luetooth/btservice/AdapterProperties.java
f254208ae7231d227f4dd9f361d38d161bbecb97 29-Jul-2014 Wei Wang <weiwa@google.com> Merge "Combine manu id and data before setting to stack." into lmp-dev
5b79bdb4b17c09a17db7634d15e1d6b56bca6c48 29-Jul-2014 Prerepa Viswanadham <dham@google.com> Bug 16630976 - Fix for LE Scan not working

Change-Id: I287ff92b699bc798a7d208deed67bc4dce8e1af7
luetooth/gatt/ScanManager.java
a1feac750a78ef35ff83e381ca421d9c68c49673 28-Jul-2014 Wei Wang <weiwa@google.com> Fix build due to removal of configureScanParams.

Change-Id: If3458b47bb9dfc508e630fe1fb608f01c44284a9
luetooth/gatt/GattService.java
e0a211b1c15672734e329390cb2f04ca006b59bd 26-Jul-2014 Prerepa Viswanadham <dham@google.com> Refactor configuring scan params to scan manager

Change-Id: I8c60f0fa4307c2833bc5da6cd080515c5b16b652
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.java
466e67f34a72bbb43fa03aae7ad96cb41f02451d 27-Jul-2014 Wei Wang <weiwa@google.com> Fix service data filter and report delay issue.

Change-Id: I1e4dd400c94f8740e4e950c42be6beac858f3ab8
luetooth/gatt/GattService.java
luetooth/gatt/ScanFilterQueue.java
luetooth/gatt/ScanManager.java
bebb0fe84fe06a47bd88cdfb9cba8ffe4d2c463a 26-Jul-2014 Wei Wang <weiwa@google.com> Combine manu id and data before setting to stack.

Change-Id: Idef33daa87939a0533dae37dad53a827155d79ca
luetooth/gatt/AdvertiseManager.java
be3bd22d6f96ddce0e5d42bf25d1c8acf35addfe 25-Jul-2014 Wei Wang <weiwa@google.com> Merge "Use scanner for lagacy LE scan (2/2)." into lmp-dev
2609a11670563837625f7dde2192deaba7417e46 24-Jul-2014 Andre Eisenbach <eisenbach@google.com> Fix A2dp crash when re-starting Bluetooth services

When the Bluetooth process has died, the services will be restarted to
recover from a crash. This could cause an exception in the A2dp service
because the service maybe stopped without having successfully been
started before. Added null-check to prevent an exception during the
restart.

Bug: 16529242
Change-Id: I57c99ec72c0ba09c6c5325b262e83618aacb3e39
luetooth/a2dp/A2dpService.java
86c292ab0f0fed25345a2eaef0fd92ff9c72a9e5 24-Jul-2014 Wei Wang <weiwa@google.com> Use scanner for lagacy LE scan (2/2).

Change-Id: I273e7a2b6687f38d051c3264ff1bbb0025507820
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/ScanManager.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
luetooth/btservice/AdapterProperties.java
luetooth/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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
9c24a0ef159f3332a2e66648d8d3c7dfac26cbc8 22-Jul-2014 Wei Wang <weiwa@google.com> Add a ScanManager that handles Scan related operations. Remove
GattServiceStateMachine.

Change-Id: I03afefaa4ba534abbf8e2bd38b4888020764cb22
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanManager.java
f206ddd8115bdcb66ecee0c6feac35b3dc8d4da2 19-Jul-2014 Wei Wang <weiwa@google.com> Fix build

Change-Id: I0e4f8ffec53f606c75dbfae0db50da51118d8ddf
luetooth/gatt/AdvertiseManager.java
cdc69a341eae90f177ced91931bc744ee0d34c9d 17-Jul-2014 Wei Wang <weiwa@google.com> More API modification of BLE APIs (2/2)

Change-Id: I65085fa0fa5d02a9163f66555a1c7ba339b454af
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
cfda60b6b204f6e97bc961d1ac43ef7c43ac26a8 19-Jul-2014 Andre Eisenbach <eisenbach@google.com> Merge "Reduce GATT logging output" into lmp-dev
cae2bfe10d59a759596136a4ff07750fe6176351 18-Jul-2014 Andre Eisenbach <eisenbach@google.com> Reduce GATT logging output

Change-Id: I85e9191065083f11056de44202a8e5a0cba1d2c8
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceConfig.java
fbe63484114cf9b7a79043e0bc5bb74504cf5730 17-Jul-2014 Andre Eisenbach <eisenbach@google.com> LE: Add connection parameter update request API (3/4)

Change-Id: I1be7d530d4db27473086ee8734cdb6aa5e63667c
luetooth/gatt/GattService.java
87dfc410a3bc99ddf1dd30114500d2a7970075c0 18-Jul-2014 Wei Wang <weiwa@google.com> Merge "Add an AdvertiseManager for LE advertise operations." into lmp-dev
27bd5f277ccf471f2fa9cd9151a2a226b51bc825 16-Jul-2014 Wei Wang <weiwa@google.com> Add an AdvertiseManager for LE advertise operations.

Move all advertise logic out of GattServiceStateMachine.

Change-Id: I9bc9be29372e79e863fc6a0b16d4808918bfb404
luetooth/Utils.java
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/AdvertiseManager.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.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
luetooth/btservice/AdapterService.java
55a038663154f47fb899d4e8576ed0c440ad6335 15-Jul-2014 Wei Wang <weiwa@google.com> Add ALLOW_ALL filter logic to scan filters. Note filter index 1 is
reserved for ALLOW_ALL filter now.

Change-Id: Ie8b2f94a0112f95bc88323a8319f94fb780790a2
luetooth/gatt/GattServiceStateMachine.java
2626af8b78e7f42e5e0807d58ca14a4b8f6161b5 11-Jul-2014 Wei Wang <weiwa@google.com> Remove MR2 BLE Advertising hidden API from L codebase (2/2)

Change-Id: I1430cef859544fc97b7c39ead42dcb184707aa5f
luetooth/gatt/GattService.java
5b4e66228f799c1187c28be59843e70974243e16 12-Jul-2014 Matthew Xie <mattx@google.com> am 24b52ce7: Merge "Revert "Bluetooth: MAP: Do not set body header if maxlist count is 0"" into klp-wireless-dev

* commit '24b52ce786d8c5fa4bf1c4294ec9fbfd3738754f':
Revert "Bluetooth: MAP: Do not set body header if maxlist count is 0"
878cb162c0d823d6bb4e64f6d5da3770df3fb526 12-Jul-2014 Matthew Xie <mattx@google.com> am c73bd48e: Merge "Bluetooth: MAP: Do not set body header if maxlist count is 0" into klp-wireless-dev

* commit 'c73bd48e5351a12103cb58a15fa9fc33825c9b07':
Bluetooth: MAP: Do not set body header if maxlist count is 0
44499c6ba795ab59ad6387fa00e20537b3c5064e 12-Jul-2014 Matthew Xie <mattx@google.com> am 5693ce1f: Merge "Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero" into klp-wireless-dev

* commit '5693ce1fb60f7ebf858b4e35750a9335ebe47c72':
Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero
361e580eb6c07759cdd775ed57902839ff4bfe90 11-Jul-2014 Andre Eisenbach <eisenbach@google.com> Unhide Bluetooth batch APIs. Deprecate BluetoothAdpater scan APIs. (2/2)

Change-Id: If29034da523a4f2a0ce9807226363f038f0360cd
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanFilterQueue.java
c73bd48e5351a12103cb58a15fa9fc33825c9b07 12-Jul-2014 Matthew Xie <mattx@google.com> Merge "Bluetooth: MAP: Do not set body header if maxlist count is 0" into klp-wireless-dev
7f25f97c92b970ef5d58b36f963e7233efd5bf2a 18-Dec-2013 Pradeep Panigrahi <pradeepp@codeaurora.org> Bluetooth: MAP: Do not set body header if maxlist count is 0

As per MAP profile spec when message listing or folder
listing is done with 0 as max list count, then the response
should not contain the body header. Hence add change for the
same

Change-Id: I09b44a07bb9d15f248c0657563da4927ce4b4996
luetooth/map/BluetoothMapObexServer.java
24b52ce786d8c5fa4bf1c4294ec9fbfd3738754f 12-Jul-2014 Matthew Xie <mattx@google.com> Merge "Revert "Bluetooth: MAP: Do not set body header if maxlist count is 0"" into klp-wireless-dev
dca114675305d931596e07bcf962aaa3c7515656 12-Jul-2014 Matthew Xie <mattx@google.com> Revert "Bluetooth: MAP: Do not set body header if maxlist count is 0"

This reverts commit 7f25f97c92b970ef5d58b36f963e7233efd5bf2a.

Change-Id: Ib07fd8439f07de8e6028e88eb0a9798c1aec61a0
luetooth/map/BluetoothMapObexServer.java
183b33edc8af0344f7651823fa2e622955d15005 10-Jul-2014 Wei Wang <weiwa@google.com> Fix filter index stack initialization issue caused by GattServiceStateMachine created before adapter property is filled.

Change-Id: I4f487378b332d3b33c8646fd78d9ccec41431975
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
8e8d9314d67618e5604059d3758c2c8a92ae361f 09-Jul-2014 Prerepa Viswanadham <dham@google.com> OnFound and Onlost found integration

Change-Id: Ia7bdcd180a318844ab390e23a1f61168e79c324b
luetooth/gatt/GattService.java
750fd64e9e3724902190f74ebb2538a966a3e11e 04-Mar-2014 Juffin Alex Varghese <jalex@codeaurora.org> Bluetooth-OPP: Avoid IndexOutOfBoundsException if share is zero

This change will avoid IndexOutOfBoundsException if number of sharing
files are zero. Otherwise, Bluetooth application will force close itself
when exception encountered.

Change-Id: I42473c8ca2d9116c6d57707ab8f3c452d7027e67
luetooth/opp/BluetoothOppService.java
f56c48057e5a9b1eae12068ab01d1e6fbb4c9e5d 09-Jul-2014 Wei Wang <weiwa@google.com> Fix a bug that swapped LOW_POWER AND LOW_LATENCY for advertising.

Change-Id: I21c95ef69c6f54f9d60395a9427d30b875e8e261
luetooth/gatt/GattServiceStateMachine.java
bd061cd6801b84f4248f9cf32dbd294537495f7e 09-Jul-2014 Matthew Xie <mattx@google.com> Merge "resolved conflicts for merge of dc497463 to master"
9b05359927c9687bb601a2ac340be87c8a077342 09-Jul-2014 Matthew Xie <mattx@google.com> resolved conflicts for merge of dc497463 to master

Change-Id: I7bb1b91da3ae3b6e7e21b34a0cdfb5ed417135bc
e3ee0a6264913deb28c160f5c32cb3367e97ee45 09-Jul-2014 Ang Li <angli@google.com> Make ACTION_CONNECTION_ACCESS_REQUEST to be sent in ordered fashion.

The purpose of this change is to enable automated testing
to confirm incoming connection without involving human.
Remove .setClass so the intent is no longer only sent to Settings.
This is ok because the intent is still hidden and protected.
Remove unused imports.

Change-Id: I3be5df4ab440b299a75ec41d566f9eecb0ab3f31
luetooth/map/BluetoothMapService.java
dc497463ba2ab84a408faca6d7a9fd0013739d42 08-Jul-2014 Matthew Xie <mattx@google.com> am 7efa9db2: Merge "HFP: Fix missing OK for AT+CLCC in virtual call"

* commit '7efa9db2129c99475684a2e44c4fb89cce3134bc':
HFP: Fix missing OK for AT+CLCC in virtual call
7efa9db2129c99475684a2e44c4fb89cce3134bc 08-Jul-2014 Matthew Xie <mattx@google.com> Merge "HFP: Fix missing OK for AT+CLCC in virtual call"
544c8f08dfdef31604ec21318b08ebe8d5b98e92 08-Jul-2014 Nick Kralevich <nnk@google.com> Merge "Fix "Clone" call"
20e28abb314da5a052ee8cebd07308f1c3cab674 08-Jul-2014 Wei Wang <weiwa@google.com> Merge "Implementation of batch scan."
e84b9ab8ebca5e6d108d722fa84234fddf3685cd 02-Jul-2014 Wei Wang <weiwa@google.com> Implementation of batch scan.

Change-Id: I247a1676d20131ca05674da44a06d8c21785d71d
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
3a91ac3eefe23a22aa0abc1a89ac253a2b0dbae9 05-Jul-2014 Nick Kralevich <nnk@google.com> Fix "Clone" call

The function name is "clone", not "Clone".

Also, add @Override so errors like this can be detected at
compile time.

Change-Id: Iaf5ec35cdfcd49dec786f14a72c1ebe42aa6bf05
luetooth/btservice/AdapterProperties.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.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
luetooth/btservice/AdapterService.java
701d60eb4c53dafc4290ecaba13f719a945e38da 01-Jul-2014 Julia Reynolds <juliacr@google.com> Restrict bluetooth tethering with user restrictions.

Bug: 15852213
Change-Id: I641b03c3e5fa4018b382f5ed835218f4196ef7f7
luetooth/pan/PanService.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
luetooth/btservice/AdapterService.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
ee7ff974b660d954ca2f188e54072d410f2b9c2f 01-Jul-2014 Wei Wang <weiwa@google.com> am f66efab4: fix build error on kwd

* commit 'f66efab444805947fd67c5ce1f8f0a592260fcf5':
fix build error on kwd
f66efab444805947fd67c5ce1f8f0a592260fcf5 01-Jul-2014 Wei Wang <weiwa@google.com> fix build error on kwd

Change-Id: I29debb4ea6a1bb33e2a5e182b86c066179f8ac92
luetooth/gatt/GattServiceStateMachine.java
a61c69cd9e1fb148f56f16b1b768bed427b3b51d 28-Jun-2014 Wei Wang <weiwa@google.com> Phase 2 scan filter implementation. Also provides skeleton for batching and onFound/onLost integration.

DO NOT MERGE : Cherrypick from master to kwd.

Change-Id: I2e838296191ff6f55481fcde7d05d7cd6d4899dc
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanFilterQueue.java
ee8ad19e379e97582b58e3c9f87d587bae7e6ce3 01-Jul-2014 Todd Poynor <toddpoynor@google.com> Merge "Change some rule in Pbap to fix Test case issues"
dcec9008751b6c8865ad32dc338d5fee82d9db58 01-Jul-2014 Matthew Xie <mattx@google.com> am ecb463f9: Merge "[BT] Fix bug: MAP client can not get MessageListing for draft folder" into klp-wireless-dev

* commit 'ecb463f9e1974fa5980a69f1370275972107143f':
[BT] Fix bug: MAP client can not get MessageListing for draft folder
628b72197e389446ec59dc1219a0f2e11c202ae3 01-Jul-2014 Matthew Xie <mattx@google.com> am bf765c09: change bt_headset_wbs to bt_wbs

* commit 'bf765c090de4b973f4eede4f4248f5e422454c2d':
change bt_headset_wbs to bt_wbs
bf765c090de4b973f4eede4f4248f5e422454c2d 21-May-2014 Matthew Xie <mattx@google.com> change bt_headset_wbs to bt_wbs

Change-Id: I8942b29231e4df024bbf3b174abd83e8b5876c96
luetooth/hfp/HeadsetStateMachine.java
76dc9e2d09ea7f2655e557462c149a0c6b6dd771 20-Jun-2014 Mick Lin <Mick.Lin@mediatek.com> Change some rule in Pbap to fix Test case issues

Change-Id: Iec6db0c52cf05fd6fada40b7726b02768474181a
(cherry picked from commit e529b58896b2191eacbc6aa0f01f1f0341626d21)
luetooth/pbap/BluetoothPbapObexServer.java
76301c48d4f5edc78cc5c6b9d66f006052c97c6e 01-Jul-2014 Matthew Xie <mattx@google.com> am b6132733: Add WBS support on Bluedroid (5/6)

* commit 'b6132733b6e386cc8c93b5598c72ed8efe04bf3e':
Add WBS support on Bluedroid (5/6)
b6132733b6e386cc8c93b5598c72ed8efe04bf3e 28-Apr-2014 Matthew Xie <mattx@google.com> Add WBS support on Bluedroid (5/6)

Bug 13764086

Change-Id: Ib6c5d5f4321006ce1a35045907618abc417e6352
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
ecb463f9e1974fa5980a69f1370275972107143f 01-Jul-2014 Matthew Xie <mattx@google.com> Merge "[BT] Fix bug: MAP client can not get MessageListing for draft folder" into klp-wireless-dev
a308d4fcdb58a61afb18ad590800193a195db3ee 30-Jun-2014 Wei Wang <weiwa@google.com> Merge "Phase 2 scan filter implementation. Also provides skeleton for batching and onFound/onLost integration."
2b670d217c743a7a8082f1d72baf532ef66ba21c 28-Jun-2014 Wei Wang <weiwa@google.com> Phase 2 scan filter implementation. Also provides skeleton for batching and onFound/onLost integration.

Change-Id: I2e838296191ff6f55481fcde7d05d7cd6d4899dc
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanFilterQueue.java
74b2317d360f302c2cdd36e00b4b8e1a9d0674a4 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 43b941ed: MAP: Remove pending MAP authorization pop up

* commit '43b941ed67f10876a3d730cc095ddb6589e9c1b6':
MAP: Remove pending MAP authorization pop up
b45cd4213217329ee1efb4499cccf0f38a293775 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 5079ae05: MAP: Modify XML serializer to escape double quote

* commit '5079ae05a3fa7cf09d2d8e564b71382dfc70a1ae':
MAP: Modify XML serializer to escape double quote
75fdd3e0888d37e8f1b4997fd688e0da12b4bbbe 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 5c397073: MAP: Return OBEX_HTTP_NOT_IMPLEMENTED response code for msgUpdate

* commit '5c3970730dee1da5d1f37bc03a595dc1e9c47152':
MAP: Return OBEX_HTTP_NOT_IMPLEMENTED response code for msgUpdate
27a4001f202fd55c8864216db9b7afe113d13b0d 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am c1f597b3: MAP: Set messageList element to proper size based on offset/count

* commit 'c1f597b3ec02ccc112f3c917fd079588034c3eac':
MAP: Set messageList element to proper size based on offset/count
ff0887813a704d9b1cca118499b8ed0a68682ef1 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 0e7e1496: MAP: Fix MNS observer sync and sendevent exception issue.

* commit '0e7e149687b0b5e340991b20c9d8e5232e8d3e39':
MAP: Fix MNS observer sync and sendevent exception issue.
5dab95cba01eeea272f9e9e96faf3b11f84a4ad9 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 400eaf87: MAP: Fix fatal exception due to missing looper for current thread

* commit '400eaf8761223196a18b84247b066f0201226c3b':
MAP: Fix fatal exception due to missing looper for current thread
d600b53f526a6fcb54ca8f7e347aafa72f9d3f4e 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 6db8e703: PBAP: Add Filters support.

* commit '6db8e703719f301f75acdf4acacc3296cc1b5016':
PBAP: Add Filters support.
7de8acd090770cfd5d94b299b4f9c40f8970dcda 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 29ab94a0: PBAP: Strip unwanted braces and spaces from telephone number.

* commit '29ab94a024ffce08229f1c2c6776d1e72d2a3f75':
PBAP: Strip unwanted braces and spaces from telephone number.
c76fe0ddf8dc1c469e17b3ca12127295f0d42371 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 4216387d: PBAP: Remove the PBAP pop up in various scenarios

* commit '4216387d9887926cebd652f8d3807d780642fc87':
PBAP: Remove the PBAP pop up in various scenarios
43b941ed67f10876a3d730cc095ddb6589e9c1b6 26-Nov-2013 Hemant Gupta <hemantg@codeaurora.org> MAP: Remove pending MAP authorization pop up

- If USER turn off BT on DUT before accepting incoming
authorization request for MAP connection, then MAP
authorization pop up should be removed. Thsi was failing
as user time-out scenario was not handled currently,
where MAP OBEX session is stopped. So MAP OBEX session will
not get cleared till BT OFF. So MAP OBEX connection was failing
from next iteration onward. Queuing User time-out(30 seconds)
to disconnect MAP OBEX session to solve this issue.

-If ACL is disconnected by remote device before accepting
incoming authorization request for MAP connection, then MAP
authorization pop up should be removed.

Change-Id: Ib8068f793eb1b55a155d3ff657efefc40728233c
luetooth/map/BluetoothMapService.java
5079ae05a3fa7cf09d2d8e564b71382dfc70a1ae 30-Jan-2014 Hemant Gupta <hemantg@codeaurora.org> MAP: Modify XML serializer to escape double quote

Modify code to use FastXmlSerializer instead of XmlSerializer
to escape double quote character with &quot; and always enclose
XML attribute value within double quotes

Change-Id: I097e6d6de2e4cd44579a6d07842d0cffe26c0139
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
5c3970730dee1da5d1f37bc03a595dc1e9c47152 04-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> MAP: Return OBEX_HTTP_NOT_IMPLEMENTED response code for msgUpdate

In MAP profile message update is not implemented for sms/mms, but
we are returning OBEX_HTTP_OK response code for message update put
request, which is causing PTS test case to fail. Hence returning
proper response code to pass pts.

Change-Id: I40a45cea2d85750583bb7ae205d1ff57fe806a4d
luetooth/map/BluetoothMapObexServer.java
c1f597b3ec02ccc112f3c917fd079588034c3eac 02-Jan-2014 Hemant Gupta <hemantg@codeaurora.org> MAP: Set messageList element to proper size based on offset/count

Handle all the cases based on offset and count to create message list
element when message listing is performed from car kit for any folder

Change-Id: Ibcc6f8ed24c47464e05f26a79b38b99d233ca58b
luetooth/map/BluetoothMapMessageListing.java
0e7e149687b0b5e340991b20c9d8e5232e8d3e39 08-Nov-2013 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix MNS observer sync and sendevent exception issue.

Allow MNS Client sendEvent only when MNS Client is registered
and connected to fix NullPointer exceptions. Mark MNS disconnect
and observer registration as synchronized to handle synchronization
for operations from worker and main threads.

Change-Id: If34a6b67a1774f693ed42cfb6c871cd9563abe55
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMnsObexClient.java
400eaf8761223196a18b84247b066f0201226c3b 23-Oct-2013 Hemant Gupta <hemantg@codeaurora.org> MAP: Fix fatal exception due to missing looper for current thread

While creating handler for the thread, there was fatal exception getting
thrown because the present thread does not have a looper. So passing the
applications looper to be used , while creating the handler to avoid this
exception.

Change-Id: Id8c121439d7a93af7592a15df67523e96a1312ff
luetooth/map/BluetoothMapContentObserver.java
6db8e703719f301f75acdf4acacc3296cc1b5016 13-May-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Add Filters support.

This patch adds attribute filter support to PBAP. It will allow remote
devices to request the particular attributes.

Change-Id: Ia0a4f55f14925b0cf8d0553c64222d781edef2fd
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
29ab94a024ffce08229f1c2c6776d1e72d2a3f75 29-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Strip unwanted braces and spaces from telephone number.

This patch removes unwanted spaces and braces from the telephone
number on vcard entry formation. Handsfree call was failing because
of these characters due to handling of only digits in utl_isdialstr
API in BD stack (external/bluetooth/bluedroid/bta/ag/bta_ag_cmd.c)

Change-Id: I2d63967059a9cb97f214b370fac17234f6e58f55
luetooth/pbap/BluetoothPbapVcardManager.java
4216387d9887926cebd652f8d3807d780642fc87 07-May-2014 Hemant Gupta <hemantg@codeaurora.org> PBAP: Remove the PBAP pop up in various scenarios

-If ACL is disconnected by remote device OR DUT(unbond from
the DUT) before accepting incoming authorization request for
PBAP connection. PBAP authorization pop up should be removed.

- If authorization is cancelled due to USER_TIMEOUT(30 second),
then PBAP authorization pop up should be removed.

Change-Id: I0a69f23c7882a43de9fe207c84926de91713c79b
luetooth/pbap/BluetoothPbapService.java
faec4b404f63184cddffd557a2d38d6a85459d94 29-Jun-2014 Matthew Xie <mattx@google.com> am 8f5a4787: Merge "PBAP: Check for spurious entries of searched contacts" into klp-wireless-dev

* commit '8f5a4787761ebdaa852c0b5d7c7b89c339e140b8':
PBAP: Check for spurious entries of searched contacts
8f5a4787761ebdaa852c0b5d7c7b89c339e140b8 29-Jun-2014 Matthew Xie <mattx@google.com> Merge "PBAP: Check for spurious entries of searched contacts" into klp-wireless-dev
1ebce7fb88348be7b984b1a778bd1bbeea20d6d7 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
af471e1d5765aa9f1b15909ed488c6c9eb57090e 28-Mar-2014 Andre Eisenbach <eisenbach@google.com> LE: Add notification sent and congestion callbacks (4/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Change-Id: I5feb555b4843bd25b1d40338651695ac082e1386
luetooth/gatt/GattService.java
21492655012d6d3d521b8a49797366b434115bcf 28-Jun-2014 Matthew Xie <mattx@google.com> fix a merge error in PanService

Change-Id: I63734e44ca661166da9091fae622a9e54bd24431
luetooth/pan/PanService.java
3f9f111b47fb92c1453b564a45703bfe9638282e 28-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 0d132248: PBAP: Change string search comparison from NULL to empty

* commit '0d1322483285ccc9ca7bedf515821c5c105a44e6':
PBAP: Change string search comparison from NULL to empty
7a566bbe24c3618e3b21d6b7170d94bfd2f03089 28-Jun-2014 Zhihai Xu <zhihaixu@google.com> am e40925fc: Bluetooth: Added Shared Preferences to restore tethering preference

* commit 'e40925fc889d7f9dfc2a12c8165086cc7c312cc6':
Bluetooth: Added Shared Preferences to restore tethering preference
afc04fcffad9713d5385894b41a1fb29c1d6ee96 28-Mar-2014 Andre Eisenbach <andre@broadcom.com> LE: Add notification sent and congestion callbacks (4/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Change-Id: Ifa8de9c12d8d487e28fb5a1a5e05150a7fec90cb
luetooth/gatt/GattService.java
83faa1c29215f8fcf69e2444f54d24ddaf6e2da5 26-Jun-2014 Matthew Xie <mattx@google.com> am e5c2a9d1: Merge "Add null pointer check in A2DPService"

* commit 'e5c2a9d12a29baa007e17dfe62f13b28a3aea637':
Add null pointer check in A2DPService
e5c2a9d12a29baa007e17dfe62f13b28a3aea637 26-Jun-2014 Matthew Xie <mattx@google.com> Merge "Add null pointer check in A2DPService"
d1d30b0340aa30982c85ba0d69f918ed127679ef 25-Jun-2014 Matthew Xie <mattx@google.com> am 663fb577: Merge "Use round() instead of ceil() in calculation of a2dp vol slider position"

* commit '663fb5771e20f117be2c14fe794b2594aabdc703':
Use round() instead of ceil() in calculation of a2dp vol slider position
663fb5771e20f117be2c14fe794b2594aabdc703 25-Jun-2014 Matthew Xie <mattx@google.com> Merge "Use round() instead of ceil() in calculation of a2dp vol slider position"
fb23c060031422c34aa8233cb3868d187f36a9dc 26-Jun-2014 Paul Jensen <pauljensen@google.com> Merge "Convert BluetoothTetheringDataTracker into a NetworkFactory."
689fb16c3dcca9a8d09a8572586a654b1ad38d7d 26-Jun-2014 Matthew Xie <mattx@google.com> am 83faa1c2: am e5c2a9d1: Merge "Add null pointer check in A2DPService"

* commit '83faa1c29215f8fcf69e2444f54d24ddaf6e2da5':
Add null pointer check in A2DPService
f3997eb0ef29986e9e27fb81f0667c2f19fae07f 26-Jun-2014 Andres Morales <anmorales@google.com> Merge "Making Bluetooth OPP file transfer intent generic"
9cf6c591c43c4dba90b5c2e26a5f93368682c9cc 25-Jun-2014 RoboErik <epastern@google.com> Merge "Disable debug messages that were left on"
8e0d927632cce4ad53df85fb7627b915c5fbd64b 24-Jun-2014 RoboErik <epastern@google.com> Disable debug messages that were left on

Forgot to disable with my last change.

Change-Id: I502e77071745bd5f9d98aa9ce963b927effc2d46
luetooth/avrcp/Avrcp.java
7af55657d171df8336cbcce0687d1225fe0f5312 25-Jun-2014 Matthew Xie <mattx@google.com> am d1d30b03: am 663fb577: Merge "Use round() instead of ceil() in calculation of a2dp vol slider position"

* commit 'd1d30b0340aa30982c85ba0d69f918ed127679ef':
Use round() instead of ceil() in calculation of a2dp vol slider position
f08b93c4a2bdc3295163b11ddf8370071212feb1 23-Jun-2014 Matthew Xie <mattx@google.com> am ea10b480: am 7315070f: Merge "Fix signal strength indicator."

* commit 'ea10b480618028469d25bc6f4239ff74334a431a':
Fix signal strength indicator.
ea10b480618028469d25bc6f4239ff74334a431a 23-Jun-2014 Matthew Xie <mattx@google.com> am 7315070f: Merge "Fix signal strength indicator."

* commit '7315070f9513a498c915c06c9abed84cd14da11e':
Fix signal strength indicator.
04be19286d311ef51ca50841b6a15ea7994fd3a5 13-Dec-2013 Danny Baumann <dannybaumann@web.de> Fix signal strength indicator.

Some devices don't check the service indicator, but only the signal
indicator. Don't give the false impression that the network signal is ok
when we're actually out of service for those devices.

Change-Id: I2e24daf13593439cbc23254fb4539cd250dbae89
luetooth/hfp/HeadsetPhoneState.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
5a84c6974b024e28e15ae853bda2599ebe4d8e6e 21-Jun-2014 Andre Eisenbach <eisenbach@google.com> Merge "LE: Add is_connected() function (3/3)"
6e29e12add362546784126119f26f04fc760f021 19-Jun-2014 RoboErik <epastern@google.com> Update Avrcp to use RemoteController

Avrcp was using IRemoteControlDisplay directly. This converts it to
the public api instead.

Change-Id: I0740687ed20da69d3522e9e9e7dc55bb1f374ecc
luetooth/avrcp/Avrcp.java
3636f3319fc403e3bf995b6de71dc5e3f2864661 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add is_connected() function (3/3)

Change-Id: I71f64ff59e4602d2834f1c177310a36320e70ead
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
6fb74b225ec5efc8caef0fec82692e33392b8ecb 04-Jun-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Fix issue with converting byte array into unsigned integers

Bug 15411439

Change-Id: I921bb3bab6cbd6e09c22786dd90dd0cfbca59265
luetooth/btservice/AdapterProperties.java
58ff480f24ba9905edf86c98035f5e9ad76a453a 17-Jun-2014 Paul Jensen <pauljensen@google.com> Convert BluetoothTetheringDataTracker into a NetworkFactory.

bug:15407087

Change-Id: I0437ca52dedf73e8ec69ac82e46353f6fafc4a42
luetooth/pan/BluetoothTetheringNetworkFactory.java
luetooth/pan/PanService.java
1d203e2a24848d15dccb8ed1f7c0891c623125bd 18-Jun-2014 Andre Eisenbach <eisenbach@google.com> Merge "LE: Add ability to pass address type to GATT test command"
106b714a2e69fa9c0734d87a02ab7277c30f8960 04-Jun-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Fix issue with converting byte array into unsigned integers

Bug 15411439

Change-Id: I921bb3bab6cbd6e09c22786dd90dd0cfbca59265
luetooth/btservice/AdapterProperties.java
066ad9e16a548218b139424f758b92db7af34af2 06-Jun-2014 Mike Lockwood <lockwood@google.com> Move AVRCP Controller support to new BluetoothAvrcpController profile

Change-Id: I865f77c85d971bf06dbc0643722abad7f6b94ab9
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/btservice/Config.java
5c86abdc7875a8fae28c57e3e36a0a8eaae5cb04 07-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> [4/4] Add Support for AVRCP Controller Feature

- Provide support for AVRCP Controller CAT 1 and CAT 2
Passthrough commands.
- Fix bug in usage of percent volume change in absolute
volume case.

Change-Id: Ie753329a96c30343d92c421c5e0113ff3e624db6
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
c030f08f419d596c4aa216c9cca9867e7b5486f0 07-Jun-2014 Mike Lockwood <lockwood@google.com> A2DP Sink: Add support for BluetoothA2dpSink profile

Change-Id: If2c1b9b919c90e65a3808c9a55b554c0e899a9c2
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/Config.java
8d536f3db19e8ea7426e98e470dc15d10ecbae87 12-Jun-2014 Mike Lockwood <lockwood@google.com> Rename BluetoothHandsfreeClient to BluetoothHeadsetClient

This makes our terminology consistent with the existing BluetoothHeadset profile

Change-Id: I527977250cf9a34d55d01b357c5c438826e58156
luetooth/btservice/Config.java
luetooth/hfpclient/HandsfreeClientHalConstants.java
luetooth/hfpclient/HandsfreeClientService.java
luetooth/hfpclient/HandsfreeClientStateMachine.java
luetooth/hfpclient/HeadsetClientHalConstants.java
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
c07f105ac5db80ae48a768223d1533daa7afb534 15-May-2014 Mike Lockwood <lockwood@google.com> Set HFP client profile off by default, enable via resource override rather than system property.

Change-Id: Ief080b21026c7b150835e044f800ccaf786bbd2c
luetooth/btservice/Config.java
aebc726105204f8a7b977eb3556c14b5ba18a5ca 19-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Add support for HFP Client role.

Implementation changes in Bluetooth App to support
HFP Client role.

Change-Id: I795f475c6a1548fd7cc68d0a02b22f30cf5a182b
luetooth/btservice/Config.java
luetooth/hfpclient/HandsfreeClientHalConstants.java
luetooth/hfpclient/HandsfreeClientService.java
luetooth/hfpclient/HandsfreeClientStateMachine.java
b83d7c6016ccd2b95b5e3b08581f5e2b21d68905 12-Jun-2014 Mike Lockwood <lockwood@google.com> Rename BluetoothHandsfreeClient to BluetoothHeadsetClient

This makes our terminology consistent with the existing BluetoothHeadset profile

Change-Id: I527977250cf9a34d55d01b357c5c438826e58156
luetooth/btservice/Config.java
luetooth/hfpclient/HandsfreeClientHalConstants.java
luetooth/hfpclient/HandsfreeClientService.java
luetooth/hfpclient/HandsfreeClientStateMachine.java
luetooth/hfpclient/HeadsetClientHalConstants.java
luetooth/hfpclient/HeadsetClientService.java
luetooth/hfpclient/HeadsetClientStateMachine.java
1e9f8a14e120e8786711abdd4a965236191c87ad 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
luetooth/btservice/AdapterService.java
a2be7670787cc4576386bf4a8baea4b88d35e90b 06-Jun-2014 Prerepa Viswanadham <dham@google.com> Refactor ScanClient scan settings to one place
Scan_mode_low_power 500ms/5000ms (10%)
scan_mode_balanced 2000ms/5000ms (40%)
scan_mode_low_latency 5000ms/5000ms (100%)

Change-Id: I5f24dc24fc86eba35c645a968e1c80934e3dd2d5
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
c145fd074dac20e6c9836ee6e900538f2cc7dd54 05-Jun-2014 Prerepa Viswanadham <dham@google.com> Use controller provided information about it BLE L feature capabilities

Change-Id: Ia3099c1df2664b79392b2a4f7e3e47d1507a9efe
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
d0f1d36e653e1b91337743b92472ba4ea97c538b 22-May-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Add support for retrieving local LE features via get_adapter_properties

Change-Id: Iada59d0c7aa776f8b3aa25abec1a7612224a43bb
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterProperties.java
6f1d727834316ee78c9c897965b254fa0316a065 07-Jan-2014 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fix crash in com.android.bluetooth

This patch will add the changes to catch the
CursorWindowAllocationException at all the places where cursor
is used for quering operations. Without this patch, crash was
observed in com.android.bluetooth in stress test of BT On/off
multiple times.

FATAL EXCEPTION: main
android.database.CursorWindowAllocationException:
Cursor window could not be created from binder.
com.android.bluetooth.pbap.BluetoothPbapVcardManager.
getCallHistorySize(BluetoothPbapVcardManager.java)

Change-Id: I6a4fadb949969dca453cff0fe84a25d849063573
luetooth/pbap/BluetoothPbapUtils.java
luetooth/pbap/BluetoothPbapVcardManager.java
ddf1c3d66c38b6ad771608eda1c57656eee57332 11-Jun-2014 Andre Eisenbach <eisenbach@google.com> LE: Add ability to pass address type to GATT test command

Currently the GATT test command to connect a remote device assumes a
public Bluetooth device address. This patch adds the ability to pass in
the address type via the test command interface.

Change-Id: Ic892b7bf5f9b261152492778da0c78b184b5e9b2
luetooth/gatt/GattDebugUtils.java
55d81a3828bc9d227b77ea840fa3dffcbc4262d2 10-Jun-2014 Benson Huang <benson.huang@mediatek.com> [BT] Fix bug: MAP client can not get MessageListing for draft folder

Currently c.getColumnIndex(Mms.PRIORITY) in setPriority method is returning
-1 which is causing c.getInt(-1) to throw a java.lang.IllegalStateException.

The fix is to add the column Mms.PRIORITY in MMS_PROJECTION

Bug 15069197 and 15071221

Change-Id: I9f296415efd5e10970d9f24652cab1022dad5efd
Signed-off-by: Benson Huang <benson.huang@mediatek.com>
luetooth/map/BluetoothMapContent.java
b824e2624524d039b12ce3b7de2747ff558bfe94 06-Jun-2014 Mike Lockwood <lockwood@google.com> Move AVRCP Controller support to new BluetoothAvrcpController profile

Change-Id: I865f77c85d971bf06dbc0643722abad7f6b94ab9
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
luetooth/avrcp/Avrcp.java
luetooth/avrcp/AvrcpControllerService.java
luetooth/btservice/Config.java
9ebf7624eb97e76d34ceceebf4ab1558d73df246 07-Jun-2014 Mike Lockwood <lockwood@google.com> A2DP Sink: Add support for BluetoothA2dpSink profile

Change-Id: If2c1b9b919c90e65a3808c9a55b554c0e899a9c2
luetooth/a2dp/A2dpSinkService.java
luetooth/a2dp/A2dpSinkStateMachine.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/Config.java
67c06156691d30294547979559ffb49a9579463d 09-Jun-2014 Jay Civelli <jcivelli@google.com> Merge "Adding a method BluetoothDevice.isConnected()"
c453f0f533556d8ffbb7a87ca09d6b30e259978e 31-May-2014 Sharvil Nanavati <sharvil@google.com> Expose wake lock / wake alarm functionality to bluedroid.

Change-Id: I267ff1d19a0d1ef5ad9a290c7654d7e6ee3a9f15
luetooth/btservice/AdapterService.java
32088854fd6a8bb5e570a4a1df4eaf2eb19d7ae3 06-Jun-2014 Prerepa Viswanadham <dham@google.com> Refactor ScanClient scan settings to one place
Scan_mode_low_power 500ms/5000ms (10%)
scan_mode_balanced 2000ms/5000ms (40%)
scan_mode_low_latency 5000ms/5000ms (100%)

Change-Id: I5f24dc24fc86eba35c645a968e1c80934e3dd2d5
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
e65500db39422398f3b87c4f340e66fdfec7e328 05-Jun-2014 Wei Wang <weiwa@google.com> Add missing licenses.

Change-Id: Ie07e3b8940e8caec985aad4aee5aaf283b5af37e
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattServiceStateMachine.java
e74e332c8de3c5d2abd56868ba7662d68c797236 06-Jun-2014 Wei Wang <weiwa@google.com> am b5bdb625: Add device capability config for new BLE features(MA, scan filter).(2/3)

* commit 'b5bdb625226aca1650ba4c57fd94c8f9b4aa7750':
Add device capability config for new BLE features(MA, scan filter).(2/3)
0c80f016af7f313611b0bac77da6e3ee695c0c73 05-Jun-2014 Wei Wang <weiwa@google.com> Add missing licenses.

Change-Id: Ie07e3b8940e8caec985aad4aee5aaf283b5af37e
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattServiceStateMachine.java
cefee9c44890a0943a9fd7c2891324fd81d50b28 05-Jun-2014 Prerepa Viswanadham <dham@google.com> Use controller provided information about it BLE L feature capabilities

Change-Id: Ia3099c1df2664b79392b2a4f7e3e47d1507a9efe
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
cf7cb8478523185da2ff851bb0de96fe95b3e77c 31-May-2014 Wei Wang <weiwa@google.com> Fix build.

Change-Id: I92461859b65dac554650d7928bfddbfe9d80c2fe
luetooth/gatt/ScanClient.java
8333a1b99994e9d8986dbca44989c943c219e36f 31-May-2014 Prerepa Viswanadham <dham@google.com> Set scan parameters in ScanClient based on BluetoothLeScanSettings
configuration

scan_mode scan_window_ms scan_interval_ms
SCAN_MODE_LOW_POWER 500 5000
SCAN_MODE_BALANCED 1000 5000
SCAN_MODE_LOW_LATENCY 2500 5000

Change-Id: I2382c7b584b102555f175a94206c4379141af3fa
luetooth/gatt/ScanClient.java
ac4640647b4dfae61cc2a8c37d3d798bdc82a553 22-May-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Add support for retrieving local LE features via get_adapter_properties

Change-Id: Iada59d0c7aa776f8b3aa25abec1a7612224a43bb
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterProperties.java
b5bdb625226aca1650ba4c57fd94c8f9b4aa7750 02-Jun-2014 Wei Wang <weiwa@google.com> Add device capability config for new BLE features(MA, scan filter).(2/3)

Fixes b/15387925.

Change-Id: I7cbcdd340fca7965f2be2c0d2a938e7646dc6849
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
c92b13ad9671810e6f10bbfce3032d33765f0a15 02-Jun-2014 Wei Wang <weiwa@google.com> Add device capability config for new BLE features(MA, scan filter).(2/3)

Fixes b/15387925.

Change-Id: I7cbcdd340fca7965f2be2c0d2a938e7646dc6849
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
8426b4392456869935f90bf51be68ce198a86c01 31-May-2014 Wei Wang <weiwa@google.com> Fix build.

Change-Id: I92461859b65dac554650d7928bfddbfe9d80c2fe
luetooth/gatt/ScanClient.java
6e2fce02940bde40a2c8a48a725e9fa0157bde6c 31-May-2014 Prerepa Viswanadham <dham@google.com> Set scan parameters in ScanClient based on BluetoothLeScanSettings
configuration

scan_mode scan_window_ms scan_interval_ms
SCAN_MODE_LOW_POWER 500 5000
SCAN_MODE_BALANCED 1000 5000
SCAN_MODE_LOW_LATENCY 2500 5000

Change-Id: I2382c7b584b102555f175a94206c4379141af3fa
luetooth/gatt/ScanClient.java
6c984a7012ef5dee09b4e1f6d17a6ddc3ae0bb11 31-May-2014 Wei Wang <weiwa@google.com> am 80780da9: Add protection for controller timeout/failure, maximum number of advertisers, filters etc.

* commit '80780da923f52a6b5a80f8619cf3e735970eaad9':
Add protection for controller timeout/failure, maximum number of advertisers, filters etc.
fa13d4471d52a5780eb4c4efcedff6778060f7fa 31-May-2014 Wei Wang <weiwa@google.com> Merge diffs from API review comments(2/2).

Change-Id: I7316ec4fe134268927b27c14e421e6e3fc31b59f
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
80780da923f52a6b5a80f8619cf3e735970eaad9 26-May-2014 Wei Wang <weiwa@google.com> Add protection for controller timeout/failure, maximum number of
advertisers, filters etc.

fixes b/15348260.

Change-Id: Ie5a460a7f042cdeba4c1e63498fd6db9dadbb66f
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanFilterQueue.java
1927f586b9e99411dace890fe3860b39140b1f66 30-May-2014 Wei Wang <weiwa@google.com> am 80e7d011: Changes due to addressing BLE API review comments

* commit '80e7d011fdb511a6583258458e97821176866baa':
Changes due to addressing BLE API review comments
1a1d5f652d44b98d3b8ec73e1bc5dc19b923eb42 22-May-2014 Wei Wang <weiwa@google.com> only stop ble scan when it's already started.

Fixes b/15174583

Change-Id: I3068254c576e8735ffb47d89f4bb8d5a719891c9
luetooth/gatt/GattService.java
f3e3ade729080636d0a3e9224ee205183fe11fa0 26-May-2014 Wei Wang <weiwa@google.com> Add protection for controller timeout/failure, maximum number of
advertisers, filters etc.

Change-Id: I94b719ddc0d9943c1a3c304285969d4c80e50a69
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanFilterQueue.java
7a02049bb3835c66e4b26700b6606b0ca5db7c6e 29-May-2014 Mike Lockwood <lockwood@google.com> Fix arguments to AudioManager.setBluetoothA2dpDeviceConnectionState()

Change-Id: I2a9742bc2e1127f56fafed574794f81578872681
luetooth/a2dp/A2dpStateMachine.java
9537b0e4648a0c197392d3276b46681523d5f0bc 29-May-2014 Mike Lockwood <lockwood@google.com> Fix arguments to AudioManager.setBluetoothA2dpDeviceConnectionState()

Change-Id: I2a9742bc2e1127f56fafed574794f81578872681
luetooth/a2dp/A2dpStateMachine.java
80e7d011fdb511a6583258458e97821176866baa 21-May-2014 Wei Wang <weiwa@google.com> Changes due to addressing BLE API review comments

Change-Id: I27b94952a243bf4fdbebdc103e7d541ce23efa3f
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
233a9ce2117ae01d2ead214f0629b4aa1ff0ad85 21-May-2014 Wei Wang <weiwa@google.com> Changes due to addressing BLE API review comments

Change-Id: I27b94952a243bf4fdbebdc103e7d541ce23efa3f
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
bfb222069971808621cf0e1fd80584eca7372060 22-May-2014 Wei Wang <weiwa@google.com> only stop ble scan when it's already started.

Change-Id: I3068254c576e8735ffb47d89f4bb8d5a719891c9
luetooth/gatt/GattService.java
d379f2dd23cf0d237c2a251279a1ff0d355f1ed7 22-May-2014 Wei Wang <weiwa@google.com> only stop ble scan when it's already started.

Change-Id: I3068254c576e8735ffb47d89f4bb8d5a719891c9
luetooth/gatt/GattService.java
1321cd814a7406260ba6282d9c71e1a2d8925262 03-Oct-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Check for spurious entries of searched contacts

This patch adds the check to limit the search if we already
have got the contact name by number so that same contact
will not be getting searched more than one number of time.

Change-Id: If4a26433e28cad90394833b51cc3ff0d0bcf7e36
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
d74ba4930e66087ecfe7e307f1a27e895df31d97 21-May-2014 Mike Lockwood <lockwood@google.com> Merge "[4/4] Add Support for AVRCP Controller Feature" into klp-wireless-dev
ccd5f131d51ef8019c87628b992bc67cbbcc2ea6 21-May-2014 Wei Wang <weiwa@google.com> Add scan response as an advertising parameter(2/2).

Change-Id: Ib0c86b81b9a2e0dd4110275c804e814451231966
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
b16d4b64de7643ba9c28fc62f768463cde1f9420 21-May-2014 Wei Wang <weiwa@google.com> Add scan response as an advertising parameter(2/2).

Change-Id: Ib0c86b81b9a2e0dd4110275c804e814451231966
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
1a2f87a202a4d634f0b6b5b6e9a8545796207288 20-May-2014 Wei Wang <weiwa@google.com> Revert "Revert "Use state machine in gatt service to handle different state transitions. For this CL only normal BLE scans are moved to state machine.""

This reverts commit e68125be766dac23f9b346464e3d84e078132914.

Change-Id: I11bc9d84390043f189d268916bc681e68deea160
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
e68125be766dac23f9b346464e3d84e078132914 20-May-2014 Wei Wang <weiwa@google.com> Revert "Use state machine in gatt service to handle different state transitions. For this CL only normal BLE scans are moved to state machine."

This reverts commit 3c6c305ebdfcaf239108f775f8ee2db2a0459c0f.

Change-Id: Ib1601bba4fe9d38a338ecf86740b20fcaccfa48f
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
3c6c305ebdfcaf239108f775f8ee2db2a0459c0f 07-May-2014 Wei Wang <weiwa@google.com> Use state machine in gatt service to handle different state
transitions.
For this CL only normal BLE scans are moved to state machine.

Change-Id: I27376c7826544ca41aad156deefcd6a63d6cefbb
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
1d7aaff7194ee04a8f3c8ddb0a94c1d27776de8f 08-May-2014 Wei Wang <weiwa@google.com> Changes due to the rename of isShortUuid to is16BitUuid.

Change-Id: I6a822ebcbe55d1e3162c3f3374278bf7f0adea5f
luetooth/gatt/GattService.java
628441e02c280f8f48adba0ade3c7028cbcdeec2 07-May-2014 Wei Wang <weiwa@google.com> Use state machine in gatt service to handle different state
transitions.
For this CL only normal BLE scans are moved to state machine.

Change-Id: I27376c7826544ca41aad156deefcd6a63d6cefbb
luetooth/gatt/AdvertiseClient.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceStateMachine.java
luetooth/gatt/ScanClient.java
luetooth/gatt/ScanFilterQueue.java
468f938001cd5dc7912fc8779c00987c44aafab2 15-May-2014 Mike Lockwood <lockwood@google.com> Set HFP client profile off by default, enable via resource override rather than system property.

Change-Id: Ief080b21026c7b150835e044f800ccaf786bbd2c
luetooth/btservice/Config.java
a4b39a558accff559561d60dbdafe9cf457a430b 15-May-2014 Mike Lockwood <lockwood@google.com> Merge "[4/4] Bluetooth: Add support for HFP Client role." into klp-wireless-dev
790352c7ff44eec4bb2458bea79c71e5b86c3206 15-May-2014 Mike Lockwood <lockwood@google.com> Merge "Submitted on behalf of 3rd party copied from packages/apps/Bluetooth/" into klp-wireless-dev
88d774ebc08d875d54db6b13cec06c8ce3d0925a 13-May-2014 Prerepa Viswanadham <dham@google.com> Improve name of api.

Change-Id: Ib35203a46f74aed43e2ce32dba02755016d84998
luetooth/gatt/GattService.java
f745ace608784e226a78170bf5a24fe114f1026f 10-May-2014 Prerepa Viswanadham <dham@google.com> set scan parameters in BT stack. Apply the most demanding request
in terms of duty cycle for all outstanding requests.

Change-Id: Iee460003d210455ab180367f3518bfb10a6c2539
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
53f26c079f676b3a72a20de4e30f075057d3777d 09-May-2014 Prerepa Viswanadham <dham@google.com> LE: Add API to set scan interval and window (3/4)

Drop client_if from api
Change-Id: I5ad339573c5fec28b22d8c4c5949eaf0d4d118aa
luetooth/gatt/GattService.java
63ee04788c7384779eadb10f0c2cd10779ebfb43 13-May-2014 Prerepa Viswanadham <dham@google.com> Improve name of api.

Change-Id: Ib35203a46f74aed43e2ce32dba02755016d84998
luetooth/gatt/GattService.java
dd2d4b97992bfa4bb549fc5e61b0a7c02acc013a 10-May-2014 Prerepa Viswanadham <dham@google.com> set scan parameters in BT stack. Apply the most demanding request
in terms of duty cycle for all outstanding requests.

Change-Id: Iee460003d210455ab180367f3518bfb10a6c2539
luetooth/gatt/GattService.java
luetooth/gatt/ScanClient.java
c8e3bda018603f40aabf62e2fb59615b24039634 09-May-2014 Prerepa Viswanadham <dham@google.com> LE: Add API to set scan interval and window (3/4)

Drop client_if from api
Change-Id: I5ad339573c5fec28b22d8c4c5949eaf0d4d118aa
luetooth/gatt/GattService.java
709ec52d8053ccbdc00ccf463d35f1f6b91fa41a 19-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> [4/4] Bluetooth: Add support for HFP Client role.

Implementation changes in Bluetooth App to support
HFP Client role.

Change-Id: I795f475c6a1548fd7cc68d0a02b22f30cf5a182b
luetooth/btservice/Config.java
luetooth/hfpclient/HandsfreeClientHalConstants.java
luetooth/hfpclient/HandsfreeClientService.java
luetooth/hfpclient/HandsfreeClientStateMachine.java
7d84dc7f7165c69e7d84b50bd21f8a63fa7df275 29-Apr-2014 Hemant Gupta <hemantg@codeaurora.org> Submitted on behalf of 3rd party copied from
packages/apps/Bluetooth/

Initial commit for HFP Client

Change-Id: I0dabd9df1cafc48d5e30e29c36898b6d1af6e874
luetooth/hfpclient/HandsfreeClientHalConstants.java
luetooth/hfpclient/HandsfreeClientService.java
luetooth/hfpclient/HandsfreeClientStateMachine.java
39fadfcd92a969a750dafb8e37c468daff9c1054 08-May-2014 Wei Wang <weiwa@google.com> Changes due to the rename of isShortUuid to is16BitUuid.

Change-Id: I6a822ebcbe55d1e3162c3f3374278bf7f0adea5f
luetooth/gatt/GattService.java
0d1322483285ccc9ca7bedf515821c5c105a44e6 30-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Change string search comparison from NULL to empty

This change compares the searchValue atribute to empty
string value rather than comparing with the NULL object
since the searchValue object itself is never NULL and
only the value becomes an empty string. Without this
patch DUT was returning no list on Vcard-listing request
by PBAP Client.

Change-Id: I20cdfc0246af3057ba8ee268dee3de1893810638
luetooth/pbap/BluetoothPbapObexServer.java
c592e5a6de0011cd60f23ac18a7bd56d8eeb5dd1 07-Jan-2014 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fix crash in com.android.bluetooth

This patch will add the changes to catch the
CursorWindowAllocationException at all the places where cursor
is used for quering operations. Without this patch, crash was
observed in com.android.bluetooth in stress test of BT On/off
multiple times.

FATAL EXCEPTION: main
android.database.CursorWindowAllocationException:
Cursor window could not be created from binder.
com.android.bluetooth.pbap.BluetoothPbapVcardManager.
getCallHistorySize(BluetoothPbapVcardManager.java)

Change-Id: I6a4fadb949969dca453cff0fe84a25d849063573
luetooth/pbap/BluetoothPbapUtils.java
luetooth/pbap/BluetoothPbapVcardManager.java
b17782509bd34201cf0daa62dadc929d65eb98b0 19-Mar-2014 Zhihai Xu <zhihaixu@google.com> MHF: Disconnect audio for HS1 before disconnecting ACL.

When HS2 is connected while call is active on HS1,
disconnect audio first followed by disconnecting ACL
for HS1.
from QCOM
Change-Id: I53b6fedd47008cf0d6d65a72f744b2df4a198e34
luetooth/hfp/HeadsetStateMachine.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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/RemoteDevices.java
1a39ecdeaad346e86ca95f802519c8c58edfc4b9 07-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> Bluetooth-OPP: Handle HID mouse right click event

This change will handle mouse right click event to display only
context menu with options Open and Clear. Otherwise, during HID mouse
right click two popup will be displayed context menu and Open option
while selecting context menu, option app crash is observed.

Change-Id: I8328f87f9c4bc007cd46a5567268621499e35343
luetooth/opp/BluetoothOppTransferHistory.java
18591a7894c5e4516491438c2e758adf8d2ade90 18-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Add transport param to Connect APIs

Support for passing preferred transport for GATT connections as part of
Connect APIs

Change-Id: Ibeafb922aec954d1f2e693b422e264fbc87468f2
luetooth/gatt/GattService.java
84748eda69cbd96a761288090fb248f5fe861332 15-Mar-2014 Sunny Kapdi <sunnyk@codeaurora.org> MHF: Start DIALING_OUT_TIMEOUT for correct device

When processing Dial request, start DIALING_OUT_TIMEOUT
timer for correct matching device.
Also add null check for device retrieved from
getDeviceForMessage()

Change-Id: Id9946c6b91ca1b23a24dfe408a81db25b9dfb86a
CRs-Fixed: 612278
luetooth/hfp/HeadsetStateMachine.java
c1f19a57e4366b2f89a1fbb03f3626856b5da482 15-Mar-2014 Sunny Kapdi <sunnyk@codeaurora.org> MHF: Broadcast connected state for HS

- Since telephony doesn't store list of connected HS, BT needs
to broadcast connected state for an already connected HS,
when other HS disconnects. This will notify telephony that
even though one HS is disconnected, but still there is one
other connected HS. This fixes call routing issue to BT HS
from phone UI.

- Set mActiveScoDevice to null when HS disconnects while
it has SCO connected for ongoing call.

Change-Id: I91aba22844938b61afc0bac52b5b6de95354f491
CRs-Fixed: 619841
luetooth/hfp/HeadsetStateMachine.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
luetooth/btservice/AdapterService.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
f2fab45657d6097f08b95a83eca0bf8005807599 03-Feb-2014 Nitin Srivastava <nitinsr@codeaurora.org> BT: HDP: Add NULL check in cleanupApps

Add NULL check for profile Apps data before accessing
them during cleanup.

Change-Id: Iebc6dc0399ed3d77078962b50550d3080a82644f
luetooth/hdp/HealthService.java
cdd2da9489cdfcf35ffdc622eba6f2155f6d376e 25-Sep-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth: Added Shared Preferences to restore tethering preference

Added a Shared Preferences to have the tethering preference persist,
The value is stored while changing the tethering preference by user
and tethering preference will be restored based on the value(last
saved tethering preference) while starting the PAN service.
from QCOM
Change-Id: I468564a51ff17dfdf1b95a532fa429477db0da15
luetooth/pan/PanService.java
86449ac4bc7a8f4b2afeab4da420ae4f980c850a 13-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth-OPP: Enable support to send same file multiple times

Change will add support to send same file multiple times. Otherwise,
if same file is selected to send multiple times after first transfer
succeeds queued instances of the same file got removed and it fails
to be sent.

Change-Id: Ic5b3706644a417cae2491d1df9588a22344f1711
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
f30c02bcdcd22bbcc27c3481f371b162e49c33ef 06-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fix search by number issue for contacts.

Fix String outofbounds exception while searching
contacts by NUMBER Search attribute.

Change-Id: Ib82cc138c1fa17c68751eb124114e1f8c2c83324
luetooth/pbap/BluetoothPbapObexServer.java
07fcc0521a01be523dd625fa1ac29b4d8991c2d9 09-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Map: Trim folder name in pushMessage and setPath

Trim folder name string passed from remote, before processing the
pushMessage and setPath request to do proper handling when a blank
folder name is passed from some Carkits. Without this change there
will be some IOT issues with some carkit(s) which will append a space
instead of empty string for pushing message to current folder.

Change-Id: I8b0bdfc1f837c53f0773057db27b81ae9acb279a
luetooth/map/BluetoothMapObexServer.java
145880aa83b9e88d31daad5d47f250840573824e 09-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Compare Name and ID both for getting vcard by number

This change will add a ID comparison along with the
Name before writing the final vcard entry when we get
the list through getContactsNamesByNumber
to avoid providing the vcard having the same name but
different numbers.

Change-Id: Ie2e1567a784cd3d872495a029fce6b51a39de993
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
cf8f608b3da0f82c1a238023275836e3efd2481f 17-Feb-2014 Nitin Srivastava <nitinsr@codeaurora.org> BT: HFP: Set VR flags to false when HS disconnects

When a HS is disconnected while in VR session and then
reconnected again, VR attempt from HS fails as VR flags
mVoiceRecognitionStarted and mWaitingForVoiceRecognition
were not reset to false when HS disconnected.

Change-Id: I008f01393a5529f63cd8392401e1402a9afe70a8
luetooth/hfp/HeadsetStateMachine.java
255407d2c34234150b09e70584adaf72175b0eea 19-Mar-2014 Zhihai Xu <zhihaixu@google.com> MHF: Disconnect audio for HS1 before disconnecting ACL.

When HS2 is connected while call is active on HS1,
disconnect audio first followed by disconnecting ACL
for HS1.
from QCOM
Change-Id: I53b6fedd47008cf0d6d65a72f744b2df4a198e34
luetooth/hfp/HeadsetStateMachine.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
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/RemoteDevices.java
e013986fbc8796db569587afa5c6b34e53d7a31b 07-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> [4/4] Add Support for AVRCP Controller Feature

- Provide support for AVRCP Controller CAT 1 and CAT 2
Passthrough commands.
- Fix bug in usage of percent volume change in absolute
volume case.

Change-Id: Ie753329a96c30343d92c421c5e0113ff3e624db6
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
c968f020c251cdd07cc59be11e263161ff9be7d0 01-May-2014 Matthew Xie <mattx@google.com> am 97af6d96: am cc4730be: Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast

* commit '97af6d969c21b54c426264c21ed0d8e85e0bca3f':
Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast
97af6d969c21b54c426264c21ed0d8e85e0bca3f 01-May-2014 Matthew Xie <mattx@google.com> am cc4730be: Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast

* commit 'cc4730be1fcf272355368ca4a2c464d71d3f432d':
Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast
cc4730be1fcf272355368ca4a2c464d71d3f432d 01-May-2014 Matthew Xie <mattx@google.com> Add Intent.FLAG_RECEIVER_FOREGROUND for pairing intent broadcast

The pairing intents targeting apps for user interaction. The flag
should be used.
bug 13909361

Change-Id: I13f10df46549773bf416f72ca630ea8ee49fe548
luetooth/btservice/RemoteDevices.java
ebc7d6d8ff2512a1e8bc799f887716d88b671e85 07-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> Bluetooth-OPP: Handle HID mouse right click event

This change will handle mouse right click event to display only
context menu with options Open and Clear. Otherwise, during HID mouse
right click two popup will be displayed context menu and Open option
while selecting context menu, option app crash is observed.

Change-Id: I8328f87f9c4bc007cd46a5567268621499e35343
luetooth/opp/BluetoothOppTransferHistory.java
e19c9bbf0157891af875c9613591801e3ec04ad2 30-Apr-2014 Zhihai Xu <zhihaixu@google.com> am 1e5ccec7: am f0362f25: am b398dad1: Merge "Improve sending web link with Bluetooth"

* commit '1e5ccec7481ef41cb31b8d50cbd3e9dd624c91f1':
Improve sending web link with Bluetooth
1e5ccec7481ef41cb31b8d50cbd3e9dd624c91f1 30-Apr-2014 Zhihai Xu <zhihaixu@google.com> am f0362f25: am b398dad1: Merge "Improve sending web link with Bluetooth"

* commit 'f0362f2538cae32d5e24afed609a813d99e33143':
Improve sending web link with Bluetooth
f0362f2538cae32d5e24afed609a813d99e33143 30-Apr-2014 Zhihai Xu <zhihaixu@google.com> am b398dad1: Merge "Improve sending web link with Bluetooth"

* commit 'b398dad1e5dbd0e4724fedbcb694cd62cba02573':
Improve sending web link with Bluetooth
278ca5fcf7f9595521a4f722abd9b4785c70e265 08-Apr-2011 Mathias Jeppsson <mathias.jeppsson@sonyericsson.com> Improve sending web link with Bluetooth

When sending web link from Google maps app, link cannot be used by
receiver as maps app will send extra text in addition to web link.

Improve the creation of html so that only the web link is
interpreted as a link.

Code is partly copied from MessageView class in the email app.

Change-Id: Idb093cc3d5af5fa6b85649d194fa6dc0c6fdfd1e
luetooth/opp/BluetoothOppLauncherActivity.java
d93e1487863468898b752d54b07dcd4e0661c113 18-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Add transport param to Connect APIs

Support for passing preferred transport for GATT connections as part of
Connect APIs

Change-Id: Ibeafb922aec954d1f2e693b422e264fbc87468f2
luetooth/gatt/GattService.java
5d56b57b6fac07125f5462a6ed3dd3b1a546541b 15-Mar-2014 Sunny Kapdi <sunnyk@codeaurora.org> MHF: Start DIALING_OUT_TIMEOUT for correct device

When processing Dial request, start DIALING_OUT_TIMEOUT
timer for correct matching device.
Also add null check for device retrieved from
getDeviceForMessage()

Change-Id: Id9946c6b91ca1b23a24dfe408a81db25b9dfb86a
CRs-Fixed: 612278
luetooth/hfp/HeadsetStateMachine.java
1b1780bd64223ee4cc4103b75316ccc0745cbcc5 15-Mar-2014 Sunny Kapdi <sunnyk@codeaurora.org> MHF: Broadcast connected state for HS

- Since telephony doesn't store list of connected HS, BT needs
to broadcast connected state for an already connected HS,
when other HS disconnects. This will notify telephony that
even though one HS is disconnected, but still there is one
other connected HS. This fixes call routing issue to BT HS
from phone UI.

- Set mActiveScoDevice to null when HS disconnects while
it has SCO connected for ongoing call.

Change-Id: I91aba22844938b61afc0bac52b5b6de95354f491
CRs-Fixed: 619841
luetooth/hfp/HeadsetStateMachine.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
luetooth/btservice/AdapterService.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
5f1aaa0fc4fc7e94c4f67de35a35ec6ca5ad9ec9 03-Feb-2014 Nitin Srivastava <nitinsr@codeaurora.org> BT: HDP: Add NULL check in cleanupApps

Add NULL check for profile Apps data before accessing
them during cleanup.

Change-Id: Iebc6dc0399ed3d77078962b50550d3080a82644f
luetooth/hdp/HealthService.java
3f4dc8e00f57579f5b57726929f1d34260a77cd1 29-Apr-2014 Bill Yi <byi@google.com> Merge commit 'b8bd4924c6de7333a08294a7d20d065e7b7a6f31' into HEAD
e40925fc889d7f9dfc2a12c8165086cc7c312cc6 25-Sep-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth: Added Shared Preferences to restore tethering preference

Added a Shared Preferences to have the tethering preference persist,
The value is stored while changing the tethering preference by user
and tethering preference will be restored based on the value(last
saved tethering preference) while starting the PAN service.
from QCOM
Change-Id: I468564a51ff17dfdf1b95a532fa429477db0da15
luetooth/pan/PanService.java
ca2a13ee25488f913766081e42daa2dce85d75aa 13-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> Bluetooth-OPP: Enable support to send same file multiple times

Change will add support to send same file multiple times. Otherwise,
if same file is selected to send multiple times after first transfer
succeeds queued instances of the same file got removed and it fails
to be sent.

Change-Id: Ic5b3706644a417cae2491d1df9588a22344f1711
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
90d9ea96c0b0f3209dc03667e21d14a13ca1f614 06-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> PBAP: Fix search by number issue for contacts.

Fix String outofbounds exception while searching
contacts by NUMBER Search attribute.

Change-Id: Ib82cc138c1fa17c68751eb124114e1f8c2c83324
luetooth/pbap/BluetoothPbapObexServer.java
4ffed8e8fbde75ab5151cce325acf2a636e09c8f 09-Feb-2014 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Map: Trim folder name in pushMessage and setPath

Trim folder name string passed from remote, before processing the
pushMessage and setPath request to do proper handling when a blank
folder name is passed from some Carkits. Without this change there
will be some IOT issues with some carkit(s) which will append a space
instead of empty string for pushing message to current folder.

Change-Id: I8b0bdfc1f837c53f0773057db27b81ae9acb279a
luetooth/map/BluetoothMapObexServer.java
130969d18eadbd94361fe95bf16b8131cdea6168 09-Dec-2013 Hemant Gupta <hemantg@codeaurora.org> PBAP: Compare Name and ID both for getting vcard by number

This change will add a ID comparison along with the
Name before writing the final vcard entry when we get
the list through getContactsNamesByNumber
to avoid providing the vcard having the same name but
different numbers.

Change-Id: Ie2e1567a784cd3d872495a029fce6b51a39de993
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
849da7cd88ec65cb153e9d81d3e2ea78418ba181 17-Feb-2014 Nitin Srivastava <nitinsr@codeaurora.org> BT: HFP: Set VR flags to false when HS disconnects

When a HS is disconnected while in VR session and then
reconnected again, VR attempt from HS fails as VR flags
mVoiceRecognitionStarted and mWaitingForVoiceRecognition
were not reset to false when HS disconnected.

Change-Id: I008f01393a5529f63cd8392401e1402a9afe70a8
luetooth/hfp/HeadsetStateMachine.java
9063719ccd0a0b6fc6485393f88336124d399ef6 25-Mar-2014 Zhihai Xu <zhihaixu@google.com> LE: Add API to configure MTU for a given connection (4/4)
this patch is from broadcom(andre)
bug:13571470
Change-Id: I4faf13f3daa535337b721a8b48e92334ed0ecb7c
luetooth/gatt/GattService.java
307c977d7381ab2d6c6b8f2c1fdbfe756547ad1b 29-Jan-2014 Ariel Gertzenstein <agertzen@google.com> DO NOT MERGE Avoid race condition that gets PanService stuck in STATE_DISCONNECTED.

http://b/12788418

Change-Id: I7cc43db047457eb6a4ac501770a714eef0ed6422
luetooth/pan/PanService.java
0de40c51768ecb06d628b6ec1d731ffaaa4af662 10-Apr-2014 zzy <zhenye@broadcom.com> am 93bbeea2: DO NOT MERGE: Exit bt process after cleanup

* commit '93bbeea23b6e974554eba6337d758f70c3314d06':
DO NOT MERGE: Exit bt process after cleanup
93bbeea23b6e974554eba6337d758f70c3314d06 04-Mar-2014 zzy <zhenye@broadcom.com> DO NOT MERGE: 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.
Addresses b/13912278

Change-Id: I616345da70bb60f1aeaab151a6bf6f793168a829
luetooth/btservice/AdapterService.java
e296684eab2bf622ff27cb1b3cd3008e919dfe30 31-Mar-2014 Christian Hanner <christian3.hanner@sonymobile.com> Use round() instead of ceil() in calculation of a2dp vol slider position

The avrcp MESSAGE_VOLUME_CHANGED requests volumes in the range 0-127. In
convertToAudioStreamVolume() this value is scaled to a (typically much
smaller, e.g. 0-15) integer value representing the volume slider step to
be presented in the UI. Depending on the resolution in the volume
requests from the a2dp device and the resolution of the UI volume
slider, some of the requested volumes might be mapped onto the same
UI slider positions. If ceil() is exchanged for round() in
convertToAudioStreamVolume() the problem with double mapped volumes
vanishes in most realistic cases.

Change-Id: I89d9ac4b8c330fd4fd2a02984bd628961f2cb035
luetooth/a2dp/Avrcp.java
a785b23c7756a65d5836787251f04e521800157c 08-Apr-2014 Matthew Xie <mattx@google.com> am 7d599189: am b9c0706b: Merge "Bluetooth: Make Bonded device list operations are synchronous"

* commit '7d599189869be67ba2b74b6e0729be74ffbe0b74':
Bluetooth: Make Bonded device list operations are synchronous
e187e2798dc2551068c8a0dd38caaa5a7cbf862b 08-Apr-2014 Matthew Xie <mattx@google.com> am 010b179c: am 5aace9b6: Merge "MAP: Fix MMS pushMessage from OUTBOX to SENT folder"

* commit '010b179cdad1ecc9940b771698d0af90518596d1':
MAP: Fix MMS pushMessage from OUTBOX to SENT folder
7d599189869be67ba2b74b6e0729be74ffbe0b74 08-Apr-2014 Matthew Xie <mattx@google.com> am b9c0706b: Merge "Bluetooth: Make Bonded device list operations are synchronous"

* commit 'b9c0706b00f64a59911a5ac63e3f609dabebc284':
Bluetooth: Make Bonded device list operations are synchronous
010b179cdad1ecc9940b771698d0af90518596d1 08-Apr-2014 Matthew Xie <mattx@google.com> am 5aace9b6: Merge "MAP: Fix MMS pushMessage from OUTBOX to SENT folder"

* commit '5aace9b695c57beffb53c16f4426319baeb79900':
MAP: Fix MMS pushMessage from OUTBOX to SENT folder
b9c0706b00f64a59911a5ac63e3f609dabebc284 08-Apr-2014 Matthew Xie <mattx@google.com> Merge "Bluetooth: Make Bonded device list operations are synchronous"
5aace9b695c57beffb53c16f4426319baeb79900 08-Apr-2014 Matthew Xie <mattx@google.com> Merge "MAP: Fix MMS pushMessage from OUTBOX to SENT folder"
cfaffa85e4a5388f3591bb17f88fc7768676eae2 11-Mar-2014 Andres Morales <anmorales@google.com> Making Bluetooth OPP file transfer intent generic

In the process of adding Wifi as a transport for Beam,
the only consumer of this code as of yet. Need to decouple
the file transfer events from the bluetooth stack to be able
to cleanly reuse them in the wifi code.

Change-Id: I9dafe4f6756bf429b4770826c46d41330a334493
luetooth/opp/Constants.java
28eff1a17b1e60f985f841faadde6420bf0d001f 12-Mar-2014 Wei Wang <weiwa@google.com> DO NOT MERGE: Add status callback for start/stop advertising.
cherrypick from master.

Change-Id: I666969442b756ce461ff64eff0d09f5283431fb3
luetooth/gatt/GattService.java
1498ea75bf38641b6f1938e57d7e550b33eecb7a 31-Mar-2014 Andre Eisenbach <andre@broadcom.com> am a207e911: am 66275876: LE: Add API to configure MTU for a given connection (4/4)

* commit 'a207e911bf5bab8c1a6c3e3e059bca090b01aec2':
LE: Add API to configure MTU for a given connection (4/4)
a207e911bf5bab8c1a6c3e3e059bca090b01aec2 31-Mar-2014 Andre Eisenbach <andre@broadcom.com> am 66275876: LE: Add API to configure MTU for a given connection (4/4)

* commit '662758761424473da90573de5fed1b686ce9ba0e':
LE: Add API to configure MTU for a given connection (4/4)
8bde40eb58d7a6526a2e59dd375bf62bb9eb006b 31-Mar-2014 Matthew Xie <mattx@google.com> am eec38f41: am 2ce3e327: Merge "MAP: Handle MessageListing empty folder name if set to current path."

* commit 'eec38f41c44410c35e1c7b2f7de544bd85b55736':
MAP: Handle MessageListing empty folder name if set to current path.
eec38f41c44410c35e1c7b2f7de544bd85b55736 31-Mar-2014 Matthew Xie <mattx@google.com> am 2ce3e327: Merge "MAP: Handle MessageListing empty folder name if set to current path."

* commit '2ce3e327bcebb56be8a286da9c8a7c3974f36b64':
MAP: Handle MessageListing empty folder name if set to current path.
2ce3e327bcebb56be8a286da9c8a7c3974f36b64 31-Mar-2014 Matthew Xie <mattx@google.com> Merge "MAP: Handle MessageListing empty folder name if set to current path."
662758761424473da90573de5fed1b686ce9ba0e 25-Mar-2014 Andre Eisenbach <andre@broadcom.com> LE: Add API to configure MTU for a given connection (4/4)

bug:13571470
Change-Id: I4faf13f3daa535337b721a8b48e92334ed0ecb7c
luetooth/gatt/GattService.java
b8bd4924c6de7333a08294a7d20d065e7b7a6f31 20-Mar-2014 Wei Wang <weiwa@google.com> am e3c4ef80: am 24dce607: DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050

* commit 'e3c4ef80690ff1389367806fcbafaaf019d0f5ca':
DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050
9c628cea53773c6290b665b8f427575310a010dc 20-Mar-2014 Wei Wang <weiwa@google.com> am 93cb7b67: am e3c4ef80: am 24dce607: DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050

* commit '93cb7b670a886fb12150c683469ad48b0e55176d':
DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050
93cb7b670a886fb12150c683469ad48b0e55176d 20-Mar-2014 Wei Wang <weiwa@google.com> am e3c4ef80: am 24dce607: DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050

* commit 'e3c4ef80690ff1389367806fcbafaaf019d0f5ca':
DO NOT MERGE: Add status callback for start/stop advertising. cherrypick from master to fix b/13289050
24dce60783d85fbf49f550203a383b2f4a171a52 12-Mar-2014 Wei Wang <weiwa@google.com> DO NOT MERGE: Add status callback for start/stop advertising.
cherrypick from master to fix b/13289050

Change-Id: I666969442b756ce461ff64eff0d09f5283431fb3
luetooth/gatt/GattService.java
0312f2b5c02e472eca2a91c93d465f81a3c6fc3d 19-Mar-2014 Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> HFP: Fix missing OK for AT+CLCC in virtual call

When AT+CLCC is received from HF while we're in virtual call mode there
is only non-zero index call sent without final zero index call. This
makes AT command response incomplete since no OK is sent.

From HFP specification, section 4.31.1:
"The AG shall always send OK response to HF."

Change-Id: I2d759bd3d65f2adb9a364d40ffe23d6197c6375b
luetooth/hfp/HeadsetStateMachine.java
c3b5ffdc43d7370d5e18a25db901f7b9e2dc59d2 12-Mar-2014 Wei Wang <weiwa@google.com> Add status callback for start/stop advertising.
Fixes b/13418851, b/13289050.

Change-Id: I666969442b756ce461ff64eff0d09f5283431fb3
luetooth/gatt/GattService.java
14b5e0d58b96d48db7dd5decee1efd0a69084fcb 14-Mar-2014 Zhihai Xu <zhihaixu@google.com> am 5bae8a40: am 969f4932: Merge "DO NOT MERGE release wakelock if no activity in Bluetooth MAP profile to avoid waste power." into klp-dev

* commit '5bae8a40e40e00b84750186309b6f30036c20186':
DO NOT MERGE release wakelock if no activity in Bluetooth MAP profile to avoid waste power.
4a272ffb0148ba02d1f83ec103104a5e9043a99c 11-Mar-2014 Matthew Xie <mattx@google.com> am 422d5b01: Merge "Avoid race condition that gets PanService stuck in STATE_DISCONNECTED."

* commit '422d5b0126fb072a657bb9bd268251bc1cb6fb6e':
Avoid race condition that gets PanService stuck in STATE_DISCONNECTED.
f89cb15152c4d19db35462583d79eda669c0c87d 11-Mar-2014 Matthew Xie <mattx@google.com> am 27385b9b: Merge "PBAP: Remove initialisation of Missed calls number"

* commit '27385b9b93a06862fed92f7260416276dbbbfa66':
PBAP: Remove initialisation of Missed calls number
cf295c3744f4ec77bb0b1fad1c6558ee5ce7313f 11-Mar-2014 Matthew Xie <mattx@google.com> am 429460a8: Merge "OPP: Handle intent receiver leak for BT TURN OFF."

* commit '429460a8ec5a1e0a7dc011acb80d3826b01b1936':
OPP: Handle intent receiver leak for BT TURN OFF.
7718f33abcc44702f234ce5cdc87e8040812a0df 11-Mar-2014 Matthew Xie <mattx@google.com> am 4a57bce1: Merge "MAP: Set Empty name or address for unknown values in GetMessageListing."

* commit '4a57bce1779e7dcd502dcbb64e7e121a700ba258':
MAP: Set Empty name or address for unknown values in GetMessageListing.
1b5a93a868272990d0206875f54ba150e6e7c08b 11-Mar-2014 Matthew Xie <mattx@google.com> am 77b9e56b: Merge "Bluetooth: Update Signal strength"

* commit '77b9e56ba1dc3eadf39c46b470552031383e6786':
Bluetooth: Update Signal strength
6024e17f1e9cc9c03f40347b6677d5006f63c183 10-Mar-2014 kschulz <k.schulz@samsung.com> am b140b007: am 6d4c5c8b: DO NOT MERGE MAP: fixed missing filtering on Priority

* commit 'b140b007f98f38b1365c26af2472d1ed5b8a46ee':
DO NOT MERGE MAP: fixed missing filtering on Priority
bda98633f8453ba9e8f96a06c8b724f6d662679b 10-Mar-2014 Zhihai Xu <zhihaixu@google.com> am 8872c350: am d3195daf: DO NOT MERGE update play status based on A2dp audio state from stack.

* commit '8872c350993db08bf1c58ba39a94087fc2df16b1':
DO NOT MERGE update play status based on A2dp audio state from stack.
569452aa91d43eaabe120f6de5bf8d613c574e3a 10-Mar-2014 Matthew Xie <mattx@google.com> am e7668dda: am 422d5b01: Merge "Avoid race condition that gets PanService stuck in STATE_DISCONNECTED."

* commit 'e7668dda0cd1f16e4161e6f0a64c685efc1ed25d':
Avoid race condition that gets PanService stuck in STATE_DISCONNECTED.
e7668dda0cd1f16e4161e6f0a64c685efc1ed25d 10-Mar-2014 Matthew Xie <mattx@google.com> am 422d5b01: Merge "Avoid race condition that gets PanService stuck in STATE_DISCONNECTED."

* commit '422d5b0126fb072a657bb9bd268251bc1cb6fb6e':
Avoid race condition that gets PanService stuck in STATE_DISCONNECTED.
422d5b0126fb072a657bb9bd268251bc1cb6fb6e 10-Mar-2014 Matthew Xie <mattx@google.com> Merge "Avoid race condition that gets PanService stuck in STATE_DISCONNECTED."
98dde68aa7cf3b63683fa5cbd70b11623a29a90f 27-Nov-2013 Zhihai Xu <zhihaixu@google.com> DO NOT MERGE release wakelock if no activity in Bluetooth MAP profile to avoid waste power.

bug:11138488
Change-Id: Ie7d8903cc917aee51711fa47f275863e4046f3d8
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
6d4c5c8befa3e585271ed4db770dd6990827d1f0 11-Oct-2013 kschulz <k.schulz@samsung.com> DO NOT MERGE MAP: fixed missing filtering on Priority

FilterPriority was ignored in the code as SMS does not have priority.
This fixes the support for the priority filter for sms + mms.
NOTICE: sms messages does not have priority and hence will return
an empty messagelisting if the client requests a list with priority
filter set til high-pri only.

Bug: 11168636
Change-Id: If028e47850323d20d1e9a23bc947782ae8da1df0
luetooth/map/BluetoothMapContent.java
d3195daf68329036df6a01331b466844b5cb29de 08-Jan-2014 Zhihai Xu <zhihaixu@google.com> DO NOT MERGE update play status based on A2dp audio state from stack.

this is to work around the problem:some video/audio player didn't
update the play status by calling setPlaybackState.
The headset(HBS730) register the play status update on the phone.
It will depend the play status reported from the phone to send
play or pause command.

bug:11325212
Change-Id: I7fde5960edd4a5b3474fa17456aacd5b4b432d4d
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/a2dp/Avrcp.java
ca9674c0f223a5bab5c6750594fd7ee76811771f 08-Mar-2014 Wei Wang <weiwa@google.com> am b285350d: am b9703de9: Merge "DO NOT MERGE BLE peripheral mode (2/4): Gatt Service Change." into klp-dev

* commit 'b285350d6580a118940a0f7d62857a199e362283':
DO NOT MERGE BLE peripheral mode (2/4): Gatt Service Change.
b9703de9f4892341e2a1f5ea1908aed19018569f 08-Mar-2014 Wei Wang <weiwa@google.com> Merge "DO NOT MERGE BLE peripheral mode (2/4): Gatt Service Change." into klp-dev
b8183f71183a43c6917e91b10139c5a2daec4a04 07-Mar-2014 Mike J. Chen <mjchen@google.com> am a1d2ed87: am e3805c61: Merge "Add handshake callback support" into klp-modular-dev

* commit 'a1d2ed879c917f47d11c9462e4d9e35c9a0f68f2':
Add handshake callback support
a1d2ed879c917f47d11c9462e4d9e35c9a0f68f2 07-Mar-2014 Mike J. Chen <mjchen@google.com> am e3805c61: Merge "Add handshake callback support" into klp-modular-dev

* commit 'e3805c6144038207bc72654bd250054e5821c373':
Add handshake callback support
4a9c5ce6029d7fb06b8564a761f6bea5975d74f8 07-Mar-2014 Zhihai Xu <zhihaixu@google.com> am abce10c9: am e061a83b: Device cannot go to sleep while connected to HBM-570 BT headset

* commit 'abce10c9731e65ca11e6d5a80094bbd1bf1313fa':
Device cannot go to sleep while connected to HBM-570 BT headset
004550da492fb000ab08b6324558c1e4cbd383d4 29-Jan-2014 Srinu Jella <sjella@codeaurora.org> Bluetooth: Make Bonded device list operations are synchronous

Change the bonded device list to CopyOnWriteArrayList,to take
care of concurrent add/delete operations to the bonded device
list.

Change-Id: Ia4de2d35f2e30d6407716d0e60dc3bf4d05a2ac5
luetooth/btservice/AdapterProperties.java
873b8064cca4d0f32808842a39e54e305dd5b410 30-Oct-2013 Wei Wang <weiwa@google.com> DO NOT MERGE BLE peripheral mode (2/4): Gatt Service Change.

Add advertising data to Gatt Service/

Cherry picking ble advertising changes from master to KLP MR2.
b/13137996

Change-Id: I0ea7df8c159ad388d8e58768c49e785e9a4694bb
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
luetooth/gatt/GattService.java
luetooth/gatt/HandleMap.java
luetooth/gatt/ServiceDeclaration.java
e061a83b8cbd872cd9f0fea33717aa57112e6228 14-Oct-2013 Zhihai Xu <zhihaixu@google.com> Device cannot go to sleep while connected to HBM-570 BT headset

The headset never disconnect the Obex connection for PBAP,
so in this case, we never release the wakelock.
Our PBAP implementation won't release wakelock
until the Obex is disconnected by the remote device
To better control the wake lock, we should
only acquire the wakelock when we receive the reqeust from the remote device
will release the wakelock after we send the response packets.

bug:10957699
Change-Id: I85e0609e36788d9c36334dd804ec52c90b90615b
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
ed0c6ae1773ad1f4249fe3cf7447d7033195f222 29-Jan-2014 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Fix MMS pushMessage from OUTBOX to SENT folder

Fix content type value for MMS pushMessage
from MAP to OUTBOX to be successfully SENT over
network and listed in SENT folder.

Change-Id: I068619481355c19716627fef434f1f80bd2c2d23
luetooth/map/BluetoothMapContentObserver.java
448965010ed4fbaf546cc355d1766198f70c21fb 07-Jan-2014 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Handle MessageListing empty folder name if set to current path.

Check if destination folder is already setpath while processing
GetMessageListing Request for empty folderName.

Change-Id: I4ecd87264140fd347c71b428e3c4dffec3f91d48
luetooth/map/BluetoothMapObexServer.java
3a04c35ba5f723ee4a6e1f1c37514691ebd1447d 05-Mar-2014 Mike J. Chen <mjchen@google.com> Add handshake callback support

Change-Id: I7619e6e2ac3589ffa5e0b70e4b28e536c886ce02
Signed-off-by: Mike J. Chen <mjchen@google.com>
luetooth/hid/HidService.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
luetooth/btservice/AdapterService.java
9cda136cdea45d0e0d1cbdcd1bc073bc7d018fa0 25-Feb-2014 Matthew Xie <mattx@google.com> Merge "MAP: protected misspelled in message listing encoder"
22545e23dcec98dbc43e914c903c6a98ab08b1aa 05-Feb-2014 Kim Schulz <k.schulz@samsung.com> MAP: protected misspelled in message listing encoder

The keyword protected was misspelled in the message listing encoder.
Solution: change to protected.

The typo corrected.

Change-Id: I099a79a0076e297cfb89545910c750d4e074c3db
Bug: 12915358
luetooth/map/BluetoothMapMessageListingElement.java
0053efa4b58c3e5815a500bd719c5018e7e87852 04-Feb-2014 Kim Schulz <k.schulz@samsung.com> MAP: Empty parameter mask handled wrong

If an empty parameter mask is set in a get message listing request
we only returned the handles, where as the spec states that we
should return all parameters.

Solution: Set the parameter filter to 0xFFFF if it is omitted or 0.

Change-Id: I2cb99569c0920c706c0d3b3ed269852471cb1ee6
Bug: 12915453
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapContent.java
e1bc19b7d99f2a29c305a8e4bb75969a66783def 24-Feb-2014 Matthew Xie <mattx@google.com> am 27385b9b: Merge "PBAP: Remove initialisation of Missed calls number"

* commit '27385b9b93a06862fed92f7260416276dbbbfa66':
PBAP: Remove initialisation of Missed calls number
2e48689248aa50003ef648b12bf36f8c7e9dbd8c 24-Feb-2014 Matthew Xie <mattx@google.com> am 429460a8: Merge "OPP: Handle intent receiver leak for BT TURN OFF."

* commit '429460a8ec5a1e0a7dc011acb80d3826b01b1936':
OPP: Handle intent receiver leak for BT TURN OFF.
b3abf4e52a7045f914f88d07670c0d2fb231a75d 24-Feb-2014 Matthew Xie <mattx@google.com> am 4a57bce1: Merge "MAP: Set Empty name or address for unknown values in GetMessageListing."

* commit '4a57bce1779e7dcd502dcbb64e7e121a700ba258':
MAP: Set Empty name or address for unknown values in GetMessageListing.
d08f6a6e926d7c9057c67b39ffabcdac04819586 24-Feb-2014 Matthew Xie <mattx@google.com> am 77b9e56b: Merge "Bluetooth: Update Signal strength"

* commit '77b9e56ba1dc3eadf39c46b470552031383e6786':
Bluetooth: Update Signal strength
27385b9b93a06862fed92f7260416276dbbbfa66 24-Feb-2014 Matthew Xie <mattx@google.com> Merge "PBAP: Remove initialisation of Missed calls number"
429460a8ec5a1e0a7dc011acb80d3826b01b1936 24-Feb-2014 Matthew Xie <mattx@google.com> Merge "OPP: Handle intent receiver leak for BT TURN OFF."
4a57bce1779e7dcd502dcbb64e7e121a700ba258 24-Feb-2014 Matthew Xie <mattx@google.com> Merge "MAP: Set Empty name or address for unknown values in GetMessageListing."
28c90ba40b2bfd572860600d18e3dd3e2770e635 27-Nov-2013 Smriti Gupta <smritig@codeaurora.org> PBAP: Remove initialisation of Missed calls number

Thic change will remove initialisation of Missed calls number
at the time of connection as NewMissedCall number indicates the
number of missed calls that have been received on the PSE since
the last PullPhoneBook request on the mch folder, at the point
of the request.

Change-Id: I5f769011a34cfe8e7225fca646a58451639dcfa5
luetooth/pbap/BluetoothPbapObexServer.java
0487333556262f47feaa3f931d5a5c123386dd23 21-Nov-2013 Ashwini Munigala <AshwiniM@codeaurora.org> MAP: Set Empty name or address for unknown values in GetMessageListing.

Set Empty sender or recipient name and address values to indicate
info not available from MSE in GetMessageListing response.
Current implemenation to skip the entire feild in response doesnot
mark the uniformity for values being fetched from telephony or
phone book databases.

Change-Id: I44e2f61572607349ec20ec1efcc6c44abe084b83
luetooth/map/BluetoothMapContent.java
275aaa55584ba62ab176a30cdabc432a6ff875d2 03-Oct-2013 Ashwini Munigala <AshwiniM@codeaurora.org> OPP: Handle intent receiver leak for BT TURN OFF.

Mark INBOUND and OUTBOUND active transfer as cancelled
on BT TURN OFF.

Change-Id: I52e6d59ba56e004af2dc25b85975dfeb6c19320a
luetooth/opp/BluetoothOppService.java
ff44cbb06dcc8e1d0cbb346e0ea4af612ab2b33e 30-Nov-2013 Nitin Srivastava <nitinsr@codeaurora.org> Bluetooth: Update Signal strength

This change makes sure that signal
strength is updated properly when
there is no network service.

Change-Id: I8f2e9fedc4ac6f0d039c55d8211ed96fbe25317d
luetooth/hfp/HeadsetPhoneState.java
3ec105beaebd4d6abea80b52206b11032ab4f33c 29-Jan-2014 Sharvil Nanavati <sharvil@google.com> Avoid race condition that gets PanService stuck in STATE_DISCONNECTED.

http://b/12788418

Change-Id: I7cc43db047457eb6a4ac501770a714eef0ed6422
luetooth/pan/PanService.java
b8e4250de151551d5dacca895e62761355839d7d 28-Jan-2014 Mike J. Chen <mjchen@google.com> HID: Hookup get_report_callback and return to Java via broadcast

Change-Id: I5ee7ea72935834ba8a19f7933bb92b8a0a24ba62
Signed-off-by: Mike J. Chen <mjchen@google.com>
luetooth/hid/HidService.java
0f496823a3529298cc3c16013ecc596a39f1659a 10-Jan-2014 Zhihai Xu <zhihaixu@google.com> Merge "update play status based on A2dp audio state from stack."
1edaf3d30ddcecf2f77bbfd880b6e4a7acb7a2c1 10-Jan-2014 Zhihai Xu <zhihaixu@google.com> Merge "fix incorrect track position reported from BT AVRCP"
aa6c1cb7f08a5d1fe2c878b587c62cf4dbb6ee8f 08-Jan-2014 Zhihai Xu <zhihaixu@google.com> fix incorrect track position reported from BT AVRCP

when music player continuously update playing state
with invalid play postion -1 during playing,
The track postion are not changed correcly.

bug:11377223
Change-Id: Ie4cecfe7757cb92fc96ea49a7442a9d0bd9fc63a
luetooth/a2dp/Avrcp.java
188f205b5f093850d4cc627917a21204be36c56a 08-Jan-2014 Zhihai Xu <zhihaixu@google.com> update play status based on A2dp audio state from stack.

this is to work around the problem:some video/audio player didn't
update the play status by calling setPlaybackState.
The headset(HBS730) register the play status update on the phone.
It will depend the play status reported from the phone to send
play or pause command.

bug:11325212
Change-Id: I7fde5960edd4a5b3474fa17456aacd5b4b432d4d
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/a2dp/Avrcp.java
6824a77ac3c760bb713aca66220704949c0b0866 07-Jan-2014 Zhihai Xu <zhihaixu@google.com> Merge " isA2dpPlaying() reports wrong playing state when suspended"
fe32e48d4129a3950f3a33f0ab443649b29205fb 07-Jan-2014 Zhihai Xu <zhihaixu@google.com> isA2dpPlaying() reports wrong playing state when suspended

bug:12412483
Change-Id: I1cf209479581bf28fc1ebdc462f552b8ec270520
luetooth/a2dp/A2dpStateMachine.java
a08fff0ae81757bdab00ae8865a906c711d5572f 30-Oct-2013 Wei Wang <weiwa@google.com> BLE peripheral mode (2/4): Gatt Service Change.

Change-Id: I0ea7df8c159ad388d8e58768c49e785e9a4694bb
luetooth/btservice/AdapterService.java
luetooth/btservice/ProfileService.java
luetooth/gatt/GattService.java
luetooth/gatt/HandleMap.java
luetooth/gatt/ServiceDeclaration.java
daaec40bbe227e6ee735da947afc72777f66c65d 18-Dec-2013 Zhihai Xu <zhihaixu@google.com> Merge "Device cannot go to sleep while connected to HBM-570 BT headset"
68c3d0efab4ad40abd13ff015a6a92bd60a4bd85 18-Dec-2013 Zhihai Xu <zhihaixu@google.com> Merge "release wakelock if no activity in Bluetooth MAP profile to avoid waste power."
a871a846ce37339a05fdf64b26bda0dc5bb6d565 17-Dec-2013 Zhihai Xu <zhihaixu@google.com> MAP: make MMS parsing more robust

Some devices are not following the specs correctly and send plan-text as MMS without the right headers.
This patch makes the MMS parser more robust against faulty MMS messages.
Bug: 11161383

Change-Id: Ib891f3cdc810d32082b3afe93ca18df4fcbff1be
luetooth/map/BluetoothMapObexServer.java
8fa8d120e86c7488616cc7f7310843f15278b5d9 14-Oct-2013 Zhihai Xu <zhihaixu@google.com> Device cannot go to sleep while connected to HBM-570 BT headset

The headset never disconnect the Obex connection for PBAP,
so in this case, we never release the wakelock.
Our PBAP implementation won't release wakelock
until the Obex is disconnected by the remote device
To better control the wake lock, we should
only acquire the wakelock when we receive the reqeust from the remote device
will release the wakelock after we send the response packets.

bug:10957699
Change-Id: I85e0609e36788d9c36334dd804ec52c90b90615b
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
c09b531ba47eee740485b0c6022981fc38ef1587 27-Nov-2013 Zhihai Xu <zhihaixu@google.com> release wakelock if no activity in Bluetooth MAP profile to avoid waste power.

bug:11138488
Change-Id: Ie7d8903cc917aee51711fa47f275863e4046f3d8
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
2e7c4d9904b097efe6f07d31af3793b96b4d4e77 10-Oct-2013 Kim Schulz <k.schulz@samsung.com> MAP: make MMS parsing more robust

Some devices are not following the specs correctly and send plan-text as MMS without the right headers.
This patch makes the MMS parser more robust against faulty MMS messages.

Bug: 11161383
Change-Id: If5e59f9daaab4537cfe5d06e6203ae783e311fd3
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapbMessageMmsEmail.java
14f1f53e829b1d00f6c27618e878b1ebb18df8cc 11-Oct-2013 kschulz <k.schulz@samsung.com> MAP: fixed missing filtering on Priority

FilterPriority was ignored in the code as SMS does not have priority.
This fixes the support for the priority filter for sms + mms.
NOTICE: sms messages does not have priority and hence will return
an empty messagelisting if the client requests a list with priority
filter set til high-pri only.

Bug: 11168636
Change-Id: If028e47850323d20d1e9a23bc947782ae8da1df0
luetooth/map/BluetoothMapContent.java
72fb3e13a6090e10c68e91f89553ecc19f5bb3bd 22-Nov-2013 Matthew Xie <mattx@google.com> Merge "enable xml format to transfer/receive over bluetooth"
322480a097a098ac39dd148e8aecc1106d5a3a88 15-Nov-2013 Zhihai Xu <zhihaixu@google.com> am f43652de: am 025c8ec1: Merge "remove a read lock to work around a platform deadlock problem." into klp-dev

* commit 'f43652dec776a22a1306b4392867e2f0b8e855d0':
remove a read lock to work around a platform deadlock problem.
025c8ec1e42ccac17c896809c4e6d2cb90b3c71a 15-Nov-2013 Zhihai Xu <zhihaixu@google.com> Merge "remove a read lock to work around a platform deadlock problem." into klp-dev
50f6cb42218fd50ed2532884d1212e1c9a74c7b2 15-Nov-2013 Zhihai Xu <zhihaixu@google.com> remove a read lock to work around a platform deadlock problem.

remove the lock in getStatefunction to work around a platform
deadlock problem.and also for read access, it is safe to remove
the lock to save CPU power

bug:11655066
Change-Id: Iddc0ada04010d95ae7d5fbc93ab837ebfc025b7a
luetooth/btservice/AdapterProperties.java
ee6898a4b73d90ebe20bc0218a707d3dc7d6e641 07-Nov-2013 Matthew Xie <mattx@google.com> am e56c70f6: am cd68000c: Merge "cancel device discovery before start pairing process" into klp-dev

* commit 'e56c70f66fc8fd0cbcd97999f6efe187049c062c':
cancel device discovery before start pairing process
cd68000c2c9eb487a4bdb718d966a3246fef4d59 07-Nov-2013 Matthew Xie <mattx@google.com> Merge "cancel device discovery before start pairing process" into klp-dev
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
luetooth/btservice/AdapterService.java
2a963d9c3c34fa5af76b629160008838317bbb1a 06-Nov-2013 Zhihai Xu <zhihaixu@google.com> am 0b98b993: am 240e2c5c: Merge "FF/REW is not correctly for AVRCP." into klp-dev

* commit '0b98b9933f0a2523ad333136777ef42982afc53a':
FF/REW is not correctly for AVRCP.
240e2c5c8248747f0fac86d173a9161d09093d47 06-Nov-2013 Zhihai Xu <zhihaixu@google.com> Merge "FF/REW is not correctly for AVRCP." into klp-dev
7d4c28ea6a75cf71a6dbb3401bef6982258461c1 06-Nov-2013 Edward Jee <edjee@google.com> am 981c0006: am dedebbfb: Handles AT+BVRA=1 received during an open SCO session.

* commit '981c0006cd7a6a4a786afd73a7a80faf571b6733':
Handles AT+BVRA=1 received during an open SCO session.
dedebbfb6eb1af92f013dedd234c2162cc2ec4be 09-Oct-2013 Edward Jee <edjee@google.com> Handles AT+BVRA=1 received during an open SCO session.

Bug: 11072505
Change-Id: If665517cd9efa087154edd57b23163e7cc098f6f
luetooth/hfp/HeadsetStateMachine.java
4945ac8099eb35112307f94c7c5ea7513f657fd3 05-Nov-2013 Zhihai Xu <zhihaixu@google.com> am 2665ad11: am 9dc561f7: Merge "NPE in bluetooth MAP cause bluetooth process crash" into klp-dev

* commit '2665ad11e9e3794dab5f5591ec0fceafddb2d58d':
NPE in bluetooth MAP cause bluetooth process crash
9dc561f7f13569552a62f771b16fe35dc5b9cd16 02-Nov-2013 Zhihai Xu <zhihaixu@google.com> Merge "NPE in bluetooth MAP cause bluetooth process crash" into klp-dev
19e4c6abe87d6c213e802ecf7af6c1d00e1f4b65 02-Nov-2013 Zhihai Xu <zhihaixu@google.com> FF/REW is not correctly for AVRCP.

While a music is being played, if FF/REW is pressed on the connected device,
it remains in the FF/REW state constantly (on the Porsche / Audi A8 carkit)

bug:11377223
Change-Id: Iee5468308f2786839c3a047c95dfa0a49ef28efb
luetooth/a2dp/Avrcp.java
9679a425747e95082e169b3bd3673ed6b5a27590 31-Oct-2013 Zhihai Xu <zhihaixu@google.com> NPE in bluetooth MAP cause bluetooth process crash

bug:11448104
Change-Id: I30045162c89e2150a9ef476f33e1b322e7cc9a44
luetooth/map/BluetoothMnsObexClient.java
2918953346cad7a847f6f17f5934c72256c0bf49 24-Oct-2013 Zhihai Xu <zhihaixu@google.com> am d2e9f926: am 82492947: MAP: fix problem with MNS not disconnecting correctly

* commit 'd2e9f9266d5efe9400ba0bdeca2ea61b8510e3e3':
MAP: fix problem with MNS not disconnecting correctly
824929471ee80476e6d6774eedac9f30c5623eb2 23-Oct-2013 Zhihai Xu <zhihaixu@google.com> MAP: fix problem with MNS not disconnecting correctly

MNS is needed to disconnect with the MSE but did not.
This patch fixes that by re-adding a disconnect() that was wrongfully removed during review.
Patch set 2:
-----------
- Split disconnect and shutdown for MNS connection
bug: 11161674
Change-Id: Idd09fc774584dfdb171b0d00be0f7711ae57b853
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
50f08db8a9100b79d7284406eaf2daae3af6a371 22-Oct-2013 Matthew Xie <mattx@google.com> am 3755cde5: am dce8f102: Merge "Change pairing api/intent permission from PRIVILEGED to ADMIN" into klp-dev

* commit '3755cde5fd20306f3965e7b317e3763640b11b42':
Change pairing api/intent permission from PRIVILEGED to ADMIN
dce8f102f76aeea3356c5416b8ebb5e5c8b5cb22 22-Oct-2013 Matthew Xie <mattx@google.com> Merge "Change pairing api/intent permission from PRIVILEGED to ADMIN" into klp-dev
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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
1763de2c204a587dcfc04fa4324e415dd070139a 18-Oct-2013 Zhihai Xu <zhihaixu@google.com> am a58a4068: am 311fd8bf: Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345

* commit 'a58a4068a42d9b705a2501559c0e8600306ad573':
Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345
311fd8bf28c1c16c4da81485b26518c8df97f50b 17-Oct-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345

the handleRegistration will never run after we shutdown the handler thread first,
with this change, we can make sure the mObserver will never be null
when call handleRegistration.
bug:11148404

Change-Id: I93b351915b49cf59a7d2026b7d83a68a7e76dd38
luetooth/map/BluetoothMnsObexClient.java
ded8689b33b1f345aafeea82b972c8b8cfab09cf 12-Oct-2013 Casper Bonde <c.bonde@samsung.com> am 1d8e1090: am 98df3e8f: Fix for MAP/PBAP: Race-condition when requesting authorization from Settings app

* commit '1d8e1090e1e19520749d906701c1aa27dac41a61':
Fix for MAP/PBAP: Race-condition when requesting authorization from Settings app
98df3e8ff33a6137d4ea13845b583aaee2670613 11-Oct-2013 Casper Bonde <c.bonde@samsung.com> Fix for MAP/PBAP: Race-condition when requesting authorization from Settings app

When MAP and PBAP requests authorization from the Settings app via Intents,
it also sets a state isWaitingForAuthorization to indicate
that it should handle incoming replies.
This is however done in the code after the intent have been sent
and in some cases the reply for the intent is returned
before the state has been update = no handling of the reply.
This only happens on the second connect with a paired device and
only when the user have selected the "do not ask again" checkmark
in the popup requesting access.

FIX:
Move the update of isWaitingAuthorization to before sending the intent to settings

bug: 11179645
Change-Id: I25b019e32a01caa8509c8f97195712120823afa9
luetooth/map/BluetoothMapService.java
luetooth/pbap/BluetoothPbapService.java
9b2fbb84ec3d673e337d9bf2927056077739e2f0 10-Oct-2013 Edward Jee <edjee@google.com> am c5253c9d: am c3cbf72f: Allows another GMS core app to handle ACTION_PAIRING_REQUEST .

* commit 'c5253c9d5c66330ea3de51b7232eecb13738f151':
Allows another GMS core app to handle ACTION_PAIRING_REQUEST .
c3cbf72f596c2af659905e06e85a5ac1241610a8 05-Oct-2013 Edward Jee <edjee@google.com> Allows another GMS core app to handle ACTION_PAIRING_REQUEST .

Now we use sendOrderedBroadcast for ACTION_PAIRING_REQUEST , and to
receive this intent, BLUETOOTH_PRIVILEGED is required.

Bug: 11087521
Change-Id: I6aa2fbc6538df39b24f141e7d75adc3658a7e7ac
luetooth/btservice/RemoteDevices.java
fd0c296a9f6bf6a85acb8597ef480ce21154d40f 10-Oct-2013 Zhihai Xu <zhihaixu@google.com> am 2d4b7b73: am c14e9468: Merge "Remove MMS support from MAP profile" into klp-dev

* commit '2d4b7b7362036e7f864b1d9eeb39d671359e9f7b':
Remove MMS support from MAP profile
c3ec58fcc54cb33635f4dee746ee22cb8b0e3210 10-Oct-2013 Zhihai Xu <zhihaixu@google.com> Remove MMS support from MAP profile

reject to push MMS message, will support it in the future
bug 10296324

Change-Id: Idf2aa081b049e323422223d7b24f6404de2d7184
luetooth/map/BluetoothMapContentObserver.java
fbfd55a85870939523665dfd7c24844d3e3c4715 07-Oct-2013 Jean-Michel Trivi <jmtrivi@google.com> am d2b8377f: am ce827197: Merge "Update AVRCP implementation of IRemoteControlDisplay" into klp-dev

* commit 'd2b8377f82a65c76606acbd10802648a378bf673':
Update AVRCP implementation of IRemoteControlDisplay
5a0368956f3314a891766ea005b55329ab6db8fc 04-Oct-2013 Jean-Michel Trivi <jmtrivi@google.com> Update AVRCP implementation of IRemoteControlDisplay

Add implementation of new method in IRemoteControlDisplay.

Bug 8209392

Change-Id: Ic700be5476cb2f70b6a26098cbed3e8e130b3573
luetooth/a2dp/Avrcp.java
58eadb614abc047a20a1c2e3a0e043a19e4e2f14 01-Oct-2013 Matthew Xie <mattx@google.com> am cbfd9612: Merge "Change setPin, setPin, setPairingConfirmation permission level to BLUETOOTH_PRIVILEGED" into klp-dev

* commit 'cbfd961209f35c5183a9dc7ee5d34954e6e32d6e':
Change setPin, setPin, setPairingConfirmation permission level to BLUETOOTH_PRIVILEGED
6763446bce0c0185175dc2526820fb5d6ac5dad1 01-Oct-2013 Zhihai Xu <zhihaixu@google.com> am db72c920: Merge "Unable to receive Text Message to CAR Kit(nuvi3580LM)" into klp-dev

* commit 'db72c9202b6309104b231d166c51c1f7ceca3efa':
Unable to receive Text Message to CAR Kit(nuvi3580LM)
cbfd961209f35c5183a9dc7ee5d34954e6e32d6e 30-Sep-2013 Matthew Xie <mattx@google.com> Merge "Change setPin, setPin, setPairingConfirmation permission level to BLUETOOTH_PRIVILEGED" into klp-dev
8dbf324f8e96fe1623467a72f11412d93564df2b 24-Sep-2013 Matthew Xie <mattx@google.com> Change setPin, setPin, setPairingConfirmation permission level to BLUETOOTH_PRIVILEGED

bug 9987787

Change-Id: I2fe88f4c284d8403d79e08194bf7a720b305d029
luetooth/btservice/AdapterService.java
01ba103be055c3124d2dabc31d8e65dc7742be49 27-Sep-2013 Matthew Xie <mattx@android.com> am 8cce6da9: Merge "AtPhonebook handleCpbsCommand was incorrectly sending two responses to some requests (one inside the swtich statement, then repeating it after breaking out of the switch statement). This broke phonebook sync with Audi 2G MMI car kit. Signed-off-by:

* commit '8cce6da9099e72000182d1406e7238b8f697ef13':
AtPhonebook handleCpbsCommand was incorrectly sending two responses to some requests (one inside the swtich statement, then repeating it after breaking out of the switch statement). This broke phonebook sync with Audi 2G MMI car kit. Signed-off-by: Nigel Hannam <nigel@hannam.eu>
db72c9202b6309104b231d166c51c1f7ceca3efa 27-Sep-2013 Zhihai Xu <zhihaixu@google.com> Merge "Unable to receive Text Message to CAR Kit(nuvi3580LM)" into klp-dev
8cce6da9099e72000182d1406e7238b8f697ef13 27-Sep-2013 Matthew Xie <mattx@android.com> Merge "AtPhonebook handleCpbsCommand was incorrectly sending two responses to some requests (one inside the swtich statement, then repeating it after breaking out of the switch statement). This broke phonebook sync with Audi 2G MMI car kit. Signed-off-by: Nigel Hannam <nigel@hannam.eu>"
70bfe3280ce158c39dbb25fe18386f0d10b490d3 24-Sep-2013 Zhihai Xu <zhihaixu@google.com> Unable to receive Text Message to CAR Kit(nuvi3580LM)

The problem is when we receive the SetNotificationRegistration,
the MNS thread is not ready yet.so the notification is not enabled.
so we won't send new message notification to Carkit.

bug:10898884

Change-Id: Ibaa4a92694bcbb1ea2fb4e8a3de0ff30acdafeb1
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMnsObexClient.java
abf19e783556a93cfdd33468454a309ed347bfc4 25-Sep-2013 Zhihai Xu <zhihaixu@google.com> bluetooth crash caused by read phone book with invalid colummn number -1

bug:10919257
Change-Id: I584d5c5c65e26cacfab227742b98c49282710f68
luetooth/hfp/AtPhonebook.java
107aa9c1c7928ff499a7147699b86920262e1562 20-Sep-2013 Zhihai Xu <zhihaixu@google.com> Merge "resource leakage in bluetooth MAP when empty message in phone." into klp-dev
09b09c15dcd853d452b24d46a3c81ca63fa090ea 20-Sep-2013 Matthew Xie <mattx@google.com> Check null condition of number before contact query

bug 10571304

Change-Id: Idb23e7085dc1dc7119e0e2aa8901743707e72285
luetooth/hfp/AtPhonebook.java
fac695e2dc25510b12684217d066b86dbbbba176 20-Sep-2013 Zhihai Xu <zhihaixu@google.com> resource leakage in bluetooth MAP when empty message in phone.

bug:10844044
Change-Id: I60c1b0206d7ba4653d149bee2f9f0dd6da6a5afb
luetooth/map/BluetoothMapContentObserver.java
2e90040ffc6f1c4cd5187338c9f708df4d380aee 12-Sep-2013 Matthew Xie <mattx@google.com> Change Volume step scale. Use setStreamVolume instead of avrcpUpdateVolume

bug 10681804

Change-Id: I553dac18d48c86bdb8b11428f56956f04ea87f27
luetooth/a2dp/Avrcp.java
b42ddd9abf40e1f3e3c5a33fa67dea898adcb219 14-Sep-2013 Ying Wang <wangying@google.com> Fix build.

Change-Id: I02a9d4dfa84c5778a1136d39b7bb14a2e523a9ca
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapbMessageMmsEmail.java
70be005a18a35ec5fcb46152f0dfbe82156efa3a 22-Aug-2013 Kim Schulz <k.schulz@samsung.com> Fixes to the google review comments + spec 1.1

- updated code to comply with MAP spec 1.1
- removed activity + strings.xml
- removed unused notification code
- fixed TODOs
- added more string validation and case insensitivity
- fixed internal+google review comments
- Added dump of incoming bMessages to /sdcard/bluetooth/log when verbose debug in enabled. Only the latest received message will be stored
- Fix functions msgListingSize and msgListingHasUnread to also consider mms filter message type
- Fix wrong tag length define for notification status parameter
- Re-added shutdown code to interupt the MNS
- removed map activity
- Added initial bluetooth map unit tests
- Fix map event report xml start tag to uppercase 'MAP'
- added support for using ProfileService class
- changed the way the Broadcast Receiver was implemented
- Fixed minor bugs found during Automotive Test Event
- FilterPeriod application parameters can be present, but with zero length
- For MMS the end-boundary were added too early
- The FOLDER entry in bMessage can be empty for a message push
- Wrong error value returned for a set status operation with a wrong handle
- In getMessage() exclude all binary content and smil.xml if the appParam attachment is set to "no".
- Set correct content id and content location for mms. Fix mms mime parser bug.
- moved disconnect to Handler thread
- fixed multipart-message split bug.
- added a few Unit tests for multi-part messages
- MMS parser optimized
- fixed exception in MNS obex Client
- fixed problem with Native PDUs not getting correct timestamp
- corrected mixup in ordinator/recipient for MMS

Change-Id: I3875762822a7f8ce0132065e0da5d0257e3850a1
Bug:10692365
luetooth/btservice/Config.java
luetooth/hfp/HeadsetService.java
luetooth/map/BluetoothMapActivity.java
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapAuthenticator.java
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapReceiver.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMapSmsPdu.java
luetooth/map/BluetoothMapbMessage.java
luetooth/map/BluetoothMapbMessageMmsEmail.java
luetooth/map/BluetoothMapbMessageSms.java
luetooth/map/BluetoothMnsObexClient.java
luetooth/pbap/BluetoothPbapService.java
cd34ad74f093c4867e616ba247fe3853b06afebc 16-Aug-2013 John Du <johnldu@google.com> Stop scan when client binder dies

bug 10213756
Change-Id: I01b397070f729df7c6000c2dc2613efbe8801681
(cherry picked from commit 45ba247afa1cb3c61a871b0c13f6546411afe68b)
luetooth/gatt/GattService.java
ff833ce646e50c3593a313cd6a0be53577e41112 10-Apr-2013 Thomas Lehaux <thomasx.lehaux@intel.com> Add null pointer check in A2DPService

A call to the stop() function in A2DPService.java
could cause a NullPointerException in certain events.
This patch adds a null pointer check before a
function call to avoid this issue.

Change-Id: I39b521592d9cc5b910c5ce232d0d8d03389a0391
Orig-Change-Id: I77ee8129c3d81230afc5b59b4cc29e690cbe547a
Author: Thomas Lehaux <thomasx.lehaux@intel.com>
Reviewed-on: http://android.intel.com:8080/102211
Reviewed-by: Poignet, Cedric <cedric.poignet@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Bondier, CedricX <cedricx.bondier@intel.com>
Reviewed-by: Boniface, XavierX <xavierx.boniface@intel.com>
Tested-by: Zurmely, PierreX <pierrex.zurmely@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 85837
luetooth/a2dp/A2dpService.java
cdc8ec8d84c7f16b851238da0d80b51335c4ea07 16-Aug-2013 Edward Jee <edjee@google.com> Enables AT+ANDROID command in Bluetooth HFP.

Adds another vendor-specific command AT+ANDROID in Bluetooth Hands-Free
Profile. And creates an API function that sends an unsolicited result
code +ANDROID .

Bug: 8736189
Change-Id: I7e5bba8a568f596565a1531948061e4d2fe456e0
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
17675906064bb72fdcca75baa56cdf8bb8968d01 19-Jul-2013 John Du <johnldu@google.com> Adding support for Absolute Volume

Change-Id: Ie2ccaad7aaf56a89fe44b168026df3d84b373c06

Conflicts:
jni/com_android_bluetooth_avrcp.cpp
src/com/android/bluetooth/a2dp/Avrcp.java
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
ace834feb02adabd61f628c4471147aea02d939c 28-Jun-2013 John Du <johnldu@google.com> Add support for ff/rew

Change-Id: I7ec60d94313b9ba5e4e8e62c82f19ae332b6fdd3
(cherry picked from commit 55123eff985f4d15ec198569a5db895ea086447a)
luetooth/a2dp/Avrcp.java
8c85057a003441674807e2991092735011c72b26 14-Aug-2013 Matthew Xie <mattx@google.com> Merge "LE: Add peripheral role support (4/4)" into klp-dev
97d5a00d3d588f89b36be801461455a2ab625907 07-Aug-2013 Andre Eisenbach <andre@broadcom.com> LE: Add peripheral role support (4/4)

Initial stack support for the LE peripheral role.

Change-Id: I3600558fd777999bcd610fa3aaed259414702ea4
luetooth/gatt/GattService.java
59f7aee85186fa07fc29ea941cfdab99e7c87d91 14-Aug-2013 Matthew Xie <mattx@google.com> Merge "LE: Add instance ID to descriptors (4/4)" into klp-dev
7f9efa4413d64569cd8a25ef2262778505059d80 09-Jul-2013 Andre Eisenbach <andre@broadcom.com> LE: Add instance ID to descriptors (4/4)

If a remote devices offers multiple descriptors with the same UUID, the
instance ID is used to differentiate between them.

Change-Id: I176dcfe1dc582120173cf3bd2d4329d7d764e39a
luetooth/gatt/GattService.java
fd6603b8bf9ed72dcc8bd59aaef3209251b6e17c 19-Jul-2013 Matthew Xie <mattx@google.com> Bluetooth MAP profile - sms and mms support initial check-in

bug:10116530

Change-Id: If9ce878d71c1e1b12416014c433da03b3033e158
luetooth/map/BluetoothMapActivity.java
luetooth/map/BluetoothMapAppParams.java
luetooth/map/BluetoothMapAuthenticator.java
luetooth/map/BluetoothMapContent.java
luetooth/map/BluetoothMapContentObserver.java
luetooth/map/BluetoothMapFolderElement.java
luetooth/map/BluetoothMapMessageListing.java
luetooth/map/BluetoothMapMessageListingElement.java
luetooth/map/BluetoothMapObexServer.java
luetooth/map/BluetoothMapReceiver.java
luetooth/map/BluetoothMapRfcommTransport.java
luetooth/map/BluetoothMapService.java
luetooth/map/BluetoothMapSmsPdu.java
luetooth/map/BluetoothMapUtils.java
luetooth/map/BluetoothMapbMessage.java
luetooth/map/BluetoothMapbMessageMmsEmail.java
luetooth/map/BluetoothMapbMessageSms.java
luetooth/map/BluetoothMnsObexClient.java
luetooth/map/BluetoothMnsRfcommTransport.java
bb1ac417208c8e283f9b5b49f4413856500ed0f9 05-Aug-2013 Dianne Hackborn <hackbod@google.com> Use explicit Intent for binding to service.

Change-Id: I51971a02532ad0ad8fafb0529e7adf83ed846cf4
luetooth/hfp/HeadsetStateMachine.java
c0b728adc379712af2a4e2357d82b492745f5e58 31-Jul-2013 Matthew Xie <mattx@google.com> enable xml format to transfer/receive over bluetooth

Add proper MIME types for xml as text/xml.
bug 9170384

Change-Id: Idd23c4fe26e1d82b2ea1deb51acfeeb61c1634aa
luetooth/opp/Constants.java
138a7c288f5828f5d06ccd971262327a82967228 26-Jul-2013 Zhihai Xu <zhihaixu@google.com> Merge "Add debug menu to enable btsnoop"
9674eb043aeb1474aa23ddd0739e3b8f05432630 10-Jun-2013 Jay Shrauner <shrauner@google.com> Use new CallLog number presentation column

Switch to using new number presentation column in the CallLog table.

Bug:6948882
Change-Id: I5df2969465c19f2357dbbc3266315e020e30476e
luetooth/hfp/AtPhonebook.java
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
4efee167e0a1daf750f4a466db716213c1189bb2 12-Jun-2013 Zhihai Xu <zhihaixu@google.com> am 7dc55aab: Merge "ignore invlaid play position update from remote control client." into jb-mr2-dev

* commit '7dc55aab7b1e53f784ffc75d1e7e28c0ee42bb0c':
ignore invlaid play position update from remote control client.
9d80b509f715a3c3f2ebd0de373d427fc31a6e6c 11-Jun-2013 Zhihai Xu <zhihaixu@google.com> Add debug menu to enable btsnoop

bug: 8059358
Change-Id: I2947b2b77955238410e2620489c2e0407ad8ae7b
luetooth/btservice/AdapterService.java
7dc55aab7b1e53f784ffc75d1e7e28c0ee42bb0c 11-Jun-2013 Zhihai Xu <zhihaixu@google.com> Merge "ignore invlaid play position update from remote control client." into jb-mr2-dev
f56b7b37a156d9207074af80c156db5884bb8c08 08-Jun-2013 Zhihai Xu <zhihaixu@google.com> ignore invlaid play position update from remote control client.

differentiate between applications that use
the new RemoteControlClient APIs to pass a playback position but
don't have one yet, and applications that use the legacy API and
will never pass a position.

bug:9294855
Change-Id: I015b9ded72497464352a9fbb6a605cedfffad373
luetooth/a2dp/Avrcp.java
37d0dc03a85a8b4364b35c01561e4be9d21c3f54 31-May-2013 Matthew Xie <mattx@google.com> am 865b323b: Notify adapter state change from off to on when disable fails

* commit '865b323bb1d0aa9581a9b6a2f5ed96fc0ee70b23':
Notify adapter state change from off to on when disable fails
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
luetooth/btservice/AdapterState.java
51954fe06c39291fcf67412a2ed81f017e4925d8 25-May-2013 Matthew Xie <mattx@google.com> am 3cedf3d5: Fix rssi handling as one of property change event

* commit '3cedf3d57aff20e1876a5b450f41b05e975cb8e0':
Fix rssi handling as one of property change event
3cedf3d57aff20e1876a5b450f41b05e975cb8e0 24-May-2013 Matthew Xie <mattx@google.com> Fix rssi handling as one of property change event

The rssi is encoded in one byte as int8_t in the stack.
JNI code copied in high byte without proper masking.
The converting is not needed. I am removing the uncessary converting.
bug 9110215

Change-Id: I50628b3a3c0bcf4a33775c6b62e9febd35bdc78d
luetooth/btservice/RemoteDevices.java
de221fc5989b5793bd83a67c28fa82a58d9d1825 22-May-2013 Zhihai Xu <zhihaixu@google.com> am 0eea1282: Bluetooth Share has stopped / Secondary user setup / NullPointerException

* commit '0eea1282dcb425c1ea9dc6aa08d323884a9a1655':
Bluetooth Share has stopped / Secondary user setup / NullPointerException
0eea1282dcb425c1ea9dc6aa08d323884a9a1655 22-May-2013 Zhihai Xu <zhihaixu@google.com> Bluetooth Share has stopped / Secondary user setup / NullPointerException

issue 9066070

Change-Id: Ie206eab374c6a8c255f1a6302249f81ac16fc333
luetooth/btservice/AdapterState.java
c6671c58220cabf78ece05112da9b33a36621c65 15-May-2013 YK Jeffrey Chao <jechao@broadcom.com> am ad9fff21: Preload timeout and retry mechanism (2/3)

* commit 'ad9fff218081d2f49471487d37387c764d69ed29':
Preload timeout and retry mechanism (2/3)
fd0cb64aeb1f806a041a5881dd2ba846b0aa6a93 02-May-2013 Ravi Nagarajan <nravi@broadcom.com> Fix for roam indicator not updating correctly

Use telephony manager PhoneStateListener to update the roam indicator
bug 8781689

Change-Id: I7c06f162918a10d06d77fb302e99bd2db8b02874
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.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
luetooth/btservice/AdapterState.java
bad4995703f97fab3c7c84b297a8ca6df65191fa 04-May-2013 Zhihai Xu <zhihaixu@google.com> avoid null pointer in handlePanDeviceStateChange of PanService

see the following null pointer exception
04-30 15:15:21.689 10890 10890 E AndroidRuntime: Caused by: java.lang.NullPointerException
04-30 15:15:21.689 10890 10890 E AndroidRuntime: at com.android.bluetooth.pan.PanService.handlePanDeviceStateChange(PanService.java:457)
which cause crash when disable BT
If the stop is called before the cleanup in PanService, Nullpointer may happen.

issue 8769031

Change-Id: Ia3fb1625c945c508771a697234e6ee18a120d72b
luetooth/pan/PanService.java
009989730a294575c32295976c57af169523abe4 26-Apr-2013 Zhihai Xu <zhihaixu@google.com> Merge "Null pointer exception in SocketAcceptThread of BluetoothPbapService." into jb-mr2-dev
7b91a410d595b879548e540889f8b30a0d6476c4 23-Apr-2013 Zhihai Xu <zhihaixu@google.com> Null pointer exception in SocketAcceptThread of BluetoothPbapService.

issue 7650255

Change-Id: Ied5c4ba2b34ffef9edaaa1ad7d8b4a9a0e73ef90
luetooth/pbap/BluetoothPbapService.java
0592109a75ca9e4e65489c04d6c5994cd7db45b2 25-Apr-2013 Matthew Xie <mattx@google.com> Merge "Enforcing bluetooth permissions for GATT api calls" into jb-mr2-dev
9e4a62e487bda885848771e4fa87717465bf75d2 25-Apr-2013 Matthew Xie <mattx@google.com> Enforcing bluetooth permissions for GATT api calls

bug 8667898

Change-Id: I2100d402f6496271bf97fed03684bedd8d231da4
luetooth/gatt/GattService.java
8629665794ef845e945595040e4cf1ea2fa508d3 05-Apr-2013 Priti Aghera <paghera@broadcom.com> HDP Single SDP fix

Modified the stack logic to create single
SDP record for all register call.
bug 8656462
Change-Id: If06193aecbe7555e6b1402275ee243fcd672c812
luetooth/hdp/HealthService.java
db367aa803836ca5b80da6b07ea2ef8a4b0ca1d2 23-Apr-2013 Zhihai Xu <zhihaixu@google.com> enable playback position sync for AVRCP remoteControlDisplay in audio manager

issue 8698103

Change-Id: I3572b519c4181b21629c812ba91e46d977ec33fe
luetooth/a2dp/Avrcp.java
f60d96d6bf4c3dce367ce48436f383897c7f9719 15-Apr-2013 Priti Aghera <paghera@broadcom.com> Fixed a NPE

Bluetooth share was crashing due to NPE. Included a check for
Inputstream in BluetoothOppSendFileInfo.

bug #7924487
Change-Id: Iccceb607a46962f84538e912d62f407ad5ee2f21
luetooth/opp/BluetoothOppUtility.java
dbaf9cd41555de7e6101f368ac348bbeb2094809 10-Apr-2013 Andre Eisenbach <andre@broadcom.com> LE (3/3): Add application ID to connection callback

Bug: 8589393
Change-Id: Iff14aa568bac4d62920bc35ec1545384e200b53a
luetooth/gatt/GattService.java
79d176b0f3d6cb33c7e52be6641fd4808ba87e93 12-Apr-2013 Zhihai Xu <zhihaixu@google.com> Resolve AVRCP IOP issues

This patch has the following fixes
1. Track number should be 0xFFFFFFFF when no track is currently selected
2. When no track is currently selected set play state as stopped
3. Track number sent in the correct byte order

issue 8586495

Change-Id: I2be583d1e87a39015dff605c7442ca658a10b2e2
luetooth/a2dp/Avrcp.java
aa1ffd5c6bd4f016c6ed452b3551e65872eaea8e 04-Apr-2013 Zhihai Xu <zhihaixu@google.com> support playback position changed notification

issue 8494369

Change-Id: Id468d34badac4c963d4e6df0e7e32bbd0c508938
luetooth/a2dp/Avrcp.java
6af1f25031e4378efb1a4fc286974c1038a357ba 05-Apr-2013 Andre Eisenbach <andre@broadcom.com> Add binder DeathRecipient to GATT service

Bluetooth stack connections are now released if a GATT client or server
application closes unexpectedly.

Bug: 8362526
Change-Id: I13b0711f65dcc752f4ed5c5a6e469b6fea41de75
luetooth/gatt/ContextMap.java
luetooth/gatt/GattService.java
4bcc3acd9b6024ac53c5de7af08ce56079f20e86 04-Apr-2013 Matthew Xie <mattx@google.com> Merge "Implement getRemoteType of IBluetooth.aidl" into jb-mr2-dev
0c61ad1d60fdf9738f9171acaa43f63a9a70d147 03-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "Update IRemoteControlDisplay implementation to latest interface" into jb-mr2-dev
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
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
bc10e7d58aa55da25c18d8056a0254a2b736146a 02-Apr-2013 Zhihai Xu <zhihaixu@google.com> keep one setPlaybackState function

Change-Id: I4b6f4f17dadd542e890876a8b2fbf3c31badc003
luetooth/a2dp/Avrcp.java
93627064c68acfaef2da5deb2c9c9e73c7aa13af 01-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Update IRemoteControlDisplay implementation to latest interface

Changed method setTransportControlFlags(int, int)
to method setTransportControlInfo(int, int, int)

Bug 8120740

Change-Id: I35833384102949eb2a20b0f61e13d9d8573adf3e
luetooth/a2dp/Avrcp.java
6d5b7febd705a33ab41459743d12623afcbf96bd 30-Mar-2013 Zhihai Xu <zhihaixu@google.com> fix compilation error for broadcom branch

Change-Id: I0ed2f039babccf59099c0c7cf0e3ad12392ecff4
luetooth/a2dp/Avrcp.java
c6a2fb9e324208a48173877c70b13f2f1b01286e 30-Mar-2013 Zhihai Xu <zhihaixu@google.com> Revert "Revert "fix the compilation error in broadcom partner branch""

This reverts commit 0e8131db9994d36b7cf9b61bfccb5fb374e09a19

Change-Id: Id91d545d2884022ba8f021cb22d710f4ed421464
luetooth/a2dp/Avrcp.java
0e8131db9994d36b7cf9b61bfccb5fb374e09a19 30-Mar-2013 Zhihai Xu <zhihaixu@google.com> Revert "fix the compilation error in broadcom partner branch"

This reverts commit 9c55356d9405187302a50aa2f9de8b29976645e5

Change-Id: Ife672e4b012a7745abf9d8ba9701fc46a0008539
luetooth/a2dp/Avrcp.java
9c55356d9405187302a50aa2f9de8b29976645e5 30-Mar-2013 Zhihai Xu <zhihaixu@google.com> fix the compilation error in broadcom partner branch

Change-Id: I563742d29570095060c874b1b992cd1c3859dc58
luetooth/a2dp/Avrcp.java
252c3fd10c9da267c6c2c7772025b92bf1ec74e9 29-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "Update RemoteControlDisplay interface for playback position" into jb-mr2-dev
b57062726d787db9c40636a9b506870007676d7f 11-Mar-2013 Robert Greenwalt <rgreenwalt@google.com> Don't try using netd anymore.

Instead, form a connection with the NetworkStateTracker so
ConnectivityService can treat this like the other networks.

bug:8445208
Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
luetooth/pan/PanService.java
eb8907e19ad3fa8208d7a65c8aae1bf758838705 22-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Update RemoteControlDisplay interface for playback position

Update Avrcp class to latest IRemoteControlDisplay interface
that receives playback progress and playback speed.

bug 8120740

Change-Id: I7b30c5a312ab90ee8b1f45ad900efc7c941e133a
luetooth/a2dp/Avrcp.java
de06cdccc4629cdfb12c16de226b3297377912e4 21-Mar-2013 Zhihai Xu <zhihaixu@google.com> Merge "framework support for new Bluetooth profiles AVRCP 1.3:Metadata and play status" into jb-mr2-dev
c1c259c0ace7195240f1443c805995bfe8692a72 14-Mar-2013 Zhihai Xu <zhihaixu@google.com> framework support for new Bluetooth profiles AVRCP 1.3:Metadata and play status

send track changed response if the metadata is changed.

issue 8383522

Change-Id: Ie55ed368d355484a6b83f4aa24c70aa33b72f799
luetooth/a2dp/A2dpService.java
luetooth/a2dp/Avrcp.java
5d5746124a5fd14a13ca7fd085aae6ec600d0ca7 30-Nov-2012 Sungmin Choi <sungmin.choi@lge.com> enable xlsx, docx, pptx format to transfer/receive over bluetooth

Add proper MIME types for xlsx, docx, pptx.

Bug: 7479989
Change-Id: I77b065f7856fa399c5084ffa96deace0e3f15487
luetooth/opp/Constants.java
d1e5ee9cd1c68ad8eeca61700fe56638d7f3edd4 07-Mar-2013 Nigel Hannam <nigel@hannam.eu> AtPhonebook handleCpbsCommand was incorrectly sending two responses
to some requests (one inside the swtich statement, then repeating it
after breaking out of the switch statement).
This broke phonebook sync with Audi 2G MMI car kit.
Signed-off-by: Nigel Hannam <nigel@hannam.eu>

Change-Id: I65e54400aad2413725469951899d041870691369
luetooth/hfp/AtPhonebook.java
03b8386de26ba6500af2d66687bff9b01f2cbbd7 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9579b3074bc4bc59dd45f71c0937e8879196555e
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/Config.java
luetooth/gatt/ContextMap.java
luetooth/gatt/GattDebugUtils.java
luetooth/gatt/GattService.java
luetooth/gatt/GattServiceConfig.java
luetooth/gatt/HandleMap.java
luetooth/gatt/ScanClient.java
luetooth/gatt/SearchQueue.java
luetooth/gatt/ServiceDeclaration.java
8eb70f8bdf4e8c970810b3400aba8d08d14ce222 21-Feb-2013 Martijn Coenen <maco@google.com> Add OBEX object count support to Bluetooth.

To support Android Beam receiving information about
the number of files in a OPP transfer, add the Count
OBEX header. Also add a new intent to tell the handover
requested that a transfer has started, including the
count (if any).

Change-Id: Ib5e0e8dbc6c2e3259e0f732a507557c3688e168c
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppObexSession.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/Constants.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterState.java
f206526c98d3c1038dbb5c575d47711e433f5fdf 14-Feb-2013 Matthew Xie <mattx@google.com> Merge "turn off getState debug message, not so useful now"
6efae4264e5b216b37e8da5ced41a7898e18ca3a 14-Feb-2013 Matthew Xie <mattx@google.com> turn off getState debug message, not so useful now

Change-Id: I258cb35f3166ac8a6a4c4ee7965db527cf17c2e2
luetooth/btservice/AdapterService.java
522d3b2b0a69c0157ca87995d92bb712f6102c1a 28-Jan-2013 Wink Saville <wink@google.com> Add protected log methods to StateMachine

This allow child classes to Override the logging and
have consistent behavior across StateMachines.

Change-Id: I7e23a44d08ca304ade2d7830fd0e307f63f1879e
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
61fa4903058a68538948d624271be96810defab4 15-Jan-2013 Matthew Xie <mattx@google.com> Use getRadioTechnology call instead of getRilVoiceRadioTechnology

getRilVoiceRadioTechnology had obsoleted getRadioTechnology
We are using the obsolete method to get bluetooth master compile
with aosp build for Broadcom branch.

Change-Id: Ica4258f99be82a2b0e04f74eac0bc5ee95f0a914
luetooth/hfp/HeadsetPhoneState.java
3cba4c44cb1f249d78c43d6e40e508cd0505b95b 11-Jan-2013 Adam Powell <adamp@android.com> am 43f8ccf6: am 6eb3b8d3: Merge "Upgrade the app to better follow holo guidelines"

* commit '43f8ccf63a02b28be395fd223461f1421ea2aa99':
Upgrade the app to better follow holo guidelines
43f8ccf63a02b28be395fd223461f1421ea2aa99 09-Jan-2013 Adam Powell <adamp@android.com> am 6eb3b8d3: Merge "Upgrade the app to better follow holo guidelines"

* commit '6eb3b8d3b7ffc1d80ae7734042e2c4d36a77a19f':
Upgrade the app to better follow holo guidelines
d9bd906c02fd27e51e637ee661e424951ff27f39 20-Dec-2012 Zhihai Xu <zhihaixu@google.com> Merge "Bluetooth OPP should sanitize Uri data and MIME types before calling startActivity"
04ebe44a6a6e2da1dfd7a9cacf326667fbb32cd7 03-Dec-2012 Matthew Xie <mattx@google.com> am 67b17615: am fa5a6aff: Merge "Clean up debug messages" into jb-mr1.1-dev

* commit '67b1761534d7e2518830cfb3d2c28271ffe56a26':
Clean up debug messages
67b1761534d7e2518830cfb3d2c28271ffe56a26 03-Dec-2012 Matthew Xie <mattx@google.com> am fa5a6aff: Merge "Clean up debug messages" into jb-mr1.1-dev

* commit 'fa5a6affffb0efe6c41ea44499b0e9b619bee161':
Clean up debug messages
fa5a6affffb0efe6c41ea44499b0e9b619bee161 03-Dec-2012 Matthew Xie <mattx@google.com> Merge "Clean up debug messages" into jb-mr1.1-dev
a64467b1203269cb620e4ea9b3cb7ba0b1aaa3de 01-Dec-2012 Zhihai Xu <zhihaixu@google.com> am 3d34fdb1: am 28cc9881: need send status code back(OK) after broadcast the intent(VENDOR_SPECIFIC_HEADSET_EVENT)

* commit '3d34fdb17090e476a5ccd6d7bb57d61d9f528eff':
need send status code back(OK) after broadcast the intent(VENDOR_SPECIFIC_HEADSET_EVENT)
3d34fdb17090e476a5ccd6d7bb57d61d9f528eff 01-Dec-2012 Zhihai Xu <zhihaixu@google.com> am 28cc9881: need send status code back(OK) after broadcast the intent(VENDOR_SPECIFIC_HEADSET_EVENT)

* commit '28cc9881bb7fb2e5e410006f4f303c494b97665e':
need send status code back(OK) after broadcast the intent(VENDOR_SPECIFIC_HEADSET_EVENT)
28cc9881bb7fb2e5e410006f4f303c494b97665e 01-Dec-2012 Zhihai Xu <zhihaixu@google.com> need send status code back(OK) after broadcast the intent(VENDOR_SPECIFIC_HEADSET_EVENT)

bug 7564004

Change-Id: I5fc1eed1c0db194c3fdd63799b2340eea994988d
luetooth/hfp/HeadsetStateMachine.java
0f4ef70f0bc246b224f7b6da524128db89fcc8a7 30-Nov-2012 Matthew Xie <mattx@google.com> Clean up debug messages

bug 7626174

Change-Id: I0161d54dd325a7a1afcf8926ef54cd483e7503fb
luetooth/btservice/AdapterProperties.java
luetooth/btservice/ProfileService.java
luetooth/hid/HidService.java
luetooth/opp/BluetoothOppService.java
616ea6f6dee795f76b331b05ea8f20ecbd0518c4 28-Nov-2012 Zhihai Xu <zhihaixu@google.com> am 78622268: am e2039454: Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev

* commit '786222689749046824ba206ab32f8ac9794c998b':
Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing
786222689749046824ba206ab32f8ac9794c998b 27-Nov-2012 Zhihai Xu <zhihaixu@google.com> am e2039454: Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev

* commit 'e203945454e23b2fd31ad278f7d374e1e1ccf2db':
Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing
e203945454e23b2fd31ad278f7d374e1e1ccf2db 27-Nov-2012 Zhihai Xu <zhihaixu@google.com> Merge "Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing" into jb-mr1.1-dev
dd66c701616d77e5bf7f5fd795999f59e5fe28bd 18-Nov-2012 Zhihai Xu <zhihaixu@google.com> Code to broadcast VENDOR_SPECIFIC_HEADSET_EVENT missing

add +XEVENT vendor specific command handler in processUnknownAt

bug 7564004

Change-Id: I78847553700b2da28dbf9ca8f9d0509f5f3fa924
luetooth/hfp/HeadsetStateMachine.java
cae4f76797a8d32657eaa0fdc4294cc0ba944c9c 16-Nov-2012 Wink Saville <wink@google.com> Rename get radio technology

Change-Id: I83f2b0eda8c6ccdff1b7253164e2531ca1357e72
luetooth/hfp/HeadsetPhoneState.java
ad4d840680e407633f4492633885a8149139fdd2 16-Nov-2012 Wink Saville <wink@google.com> Merge "Revert "Rename get radio technology""
c63208de4e1ce7cf4866bd85ad2a327b9da3a340 16-Nov-2012 Wink Saville <wink@google.com> Revert "Rename get radio technology"

This reverts commit d38211fe71e9e738290c6b84ef70188b8ac55071

Change-Id: I8e8cda5ce923ccec6827e9b5609d82c765b15ae2
luetooth/hfp/HeadsetPhoneState.java
a614049ef4be9ba05228ae7c6bc4953299b7892f 15-Nov-2012 Wink Saville <wink@google.com> Merge "Rename get radio technology"
d9d397854afd6511e2987ea7ae3ec8528183aefa 19-Sep-2012 blunden <blunden2@gmail.com> Upgrade the app to better follow holo guidelines

- Fix the icon scaling in the transfer list
The icon is centered and upscaled instead of just centered.

- Remove dialog info icon according to UI team recommendation

- Replace icons with holo versions and add xhdpi

Change-Id: Id3b06e8e06244ec8859d65404d779b66c1354e3d
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/pbap/BluetoothPbapActivity.java
a6853edb4504e95dcd07e0ffc306ef07dc759b56 13-Nov-2012 Zhihai Xu <zhihaixu@google.com> am 4daa2db1: Merge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users" into jb-mr1.1-dev

* commit '4daa2db107f17fa8e8dfe35003924c69566bccb6':
need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users
4daa2db107f17fa8e8dfe35003924c69566bccb6 13-Nov-2012 Zhihai Xu <zhihaixu@google.com> Merge "need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users" into jb-mr1.1-dev
31be0d2814d1d3c640160aeafba17feafbaa8bb6 13-Nov-2012 Zhihai Xu <zhihaixu@google.com> need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users

We need to send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED intent to all users
because bluetooth manager service use this intent to change name.
Bluetooth manager service is always running as User 0. but it is always binding
to bluetooth service running at foreground user, So the bluetooth service
need send BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED broadcast intent
to all users to let bluetooth manager service to receive it at any cases.

bug 7476965

Change-Id: I816786d0828d4a7d414077b1ccbe12d2e273fc75
luetooth/btservice/AdapterProperties.java
e3e1e8d1fe2a75b38ee1dfe5a102685877a22f84 29-Sep-2012 Fred <fredc@broadcom.com> Fixed potention ANR issue with Bluetooth OPP share.

Updated BluetoothOppLauncherActivity so the call to
BluetoothOppManager.saveSendingFileInfo() runs on a child thread.
saveSendingFileInfo() opens/constructs the content stream, which
can take a long time, depending on the type of content.
It should not run inside the main UI thread of the
BluetoothOppLauncherActivity.

Bug 6802063

Change-Id: Id34b33fe37eb029d6a7592a811bbc9bbcde14ba8
luetooth/opp/BluetoothOppLauncherActivity.java
cb7b1a54ae3ce309210824099253a916a04d350b 29-Sep-2012 Fred <fredc@broadcom.com> Fixed potention ANR issue with Bluetooth OPP share.

Updated BluetoothOppLauncherActivity so the call to
BluetoothOppManager.saveSendingFileInfo() runs on a child thread.
saveSendingFileInfo() opens/constructs the content stream, which
can take a long time, depending on the type of content.
It should not run inside the main UI thread of the
BluetoothOppLauncherActivity.

Bug 6802063

Change-Id: Id34b33fe37eb029d6a7592a811bbc9bbcde14ba8
luetooth/opp/BluetoothOppLauncherActivity.java
d38211fe71e9e738290c6b84ef70188b8ac55071 02-Nov-2012 Wink Saville <wink@google.com> Rename get radio technology

Change-Id: I267f54c5533f815d14c8f7a2f81545c8e08b773c
luetooth/hfp/HeadsetPhoneState.java
8b709b4caac6e0cdb35a117fa3a523d0200a203f 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> am ede67c26: License of files Bluetooth package is not updated to ASL2

* commit 'ede67c26e7b2564ea35db6d9b3027a269c150e13':
License of files Bluetooth package is not updated to ASL2
ede67c26e7b2564ea35db6d9b3027a269c150e13 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I338fd87083387706f3b5f410c9592219bb8a1acb
luetooth/Utils.java
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/Config.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/pan/PanService.java
b1f690e19d77b67630004517c5342f89b578f204 17-Oct-2012 Zhihai Xu <zhihaixu@google.com> am bd704c74: 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

* commit 'bd704c741b8c523ad747214f6f0520ac3e2caf8f':
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
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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/BondStateMachine.java
f128aa0298dcaf07cf0bec0717943dd1f97b1eb6 16-Oct-2012 Jake Hamby <jhamby@google.com> am a595fcc5: Fix crash in Bluetooth when sharing MMS video.

* commit 'a595fcc57e7f0be9cf57913cd665dc99e4001b16':
Fix crash in Bluetooth when sharing MMS video.
a595fcc57e7f0be9cf57913cd665dc99e4001b16 16-Oct-2012 Jake Hamby <jhamby@google.com> Fix crash in Bluetooth when sharing MMS video.

Some content providers, such as MMS, don't support the DISPLAY_NAME
or SIZE columns for content URIs. Fall back to using the last segment
of the URI as the filename for Bluetooth file transfers if the query
for DISPLAY_NAME fails.

Bug: 7343310
Change-Id: Ie048c5eea3ba9994259c9e07beabd72622d6b669
luetooth/opp/BluetoothOppSendFileInfo.java
83f334c0f748a5ee8b68d85fd0133c73e5d6bf28 12-Oct-2012 Adam Powell <adamp@android.com> am d329befd: Merge "Bluetooth: Use proper holo alert drawable"

* commit 'd329befdd38a5c441e1a2b7e4595b7de86ac100b':
Bluetooth: Use proper holo alert drawable
3911cfeb7c5e2242dcce91e3b66d9449dec0bd05 11-Oct-2012 Zhihai Xu <zhihaixu@google.com> Bluetooth OPP should sanitize Uri data and MIME types before calling startActivity

bug 5842045

Change-Id: I00a80fc7dc6c6031ab35113539ff6cdf4cf230a6
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppLiveFolder.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransferHistory.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/Constants.java
fb8b279141dac5255926d2dd4317f803cd1bbcf0 11-Oct-2012 Matthew Xie <mattx@google.com> Fix NREC command format error

Add = sign before off
bug 7326510

Change-Id: Ief269f608646acaa2872679a5c649da3cf22de37
luetooth/hfp/HeadsetStateMachine.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
luetooth/Utils.java
luetooth/a2dp/A2dpService.java
luetooth/btservice/AdapterService.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hid/HidService.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
fd1da115cbf09b7dd9bca3c7d3a4fb816a835dc5 08-Oct-2012 Matthew Xie <mattx@google.com> Turn off dbg messages, be prepared for production build

bug 7174712

Change-Id: I58747ec6507da8ea8ae27a182b601aaf626ede42
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/opp/Constants.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
be38be94c0a2faf3802b596be5b3ab568d6d85a4 04-Oct-2012 zzy <zhenye@broadcom.com> remove the AT command separator from the CPBR range parameters

Root cause: Integer.parseInt(indices[0]) throw exception if char ';' at the end.

Bug 7274805
luetooth/hfp/AtPhonebook.java
6458cffaca286611e898c75ad86e2d98c89008b6 02-Oct-2012 Matthew Xie <mattx@google.com> Move socket initialization code out of pbap service's main thread

Socket initialization need the preparation from stack and a domain socket
connection. All this takes time and not proper to be run in the main thread.
bug 7258324

Change-Id: Ic46601602556c2949f18d446016188d874099874
luetooth/btservice/RemoteDevices.java
luetooth/pbap/BluetoothPbapService.java
c7ead6d5827f3832b9210e92fab7597142059852 01-Oct-2012 Jeff Sharkey <jsharkey@android.com> Move bluetooth priorities from Secure to Global.

Bug: 7231171
Change-Id: I39e3611dcec1104558704ed72855fef85f33c084
luetooth/a2dp/A2dpService.java
luetooth/hfp/HeadsetService.java
luetooth/hid/HidService.java
0e46362107a23fcfe829b270f3ff987d911cd102 26-Sep-2012 Matthew Xie <mattx@google.com> Add MODIFY_PHONE_STATE permission to access Bluetooth service in Phone app

Enforce MODIFY_PHONE_STATE permission for some HeadsetService APIs that
only provided for Phone app for phone stat change notifications
bug 7115021

Change-Id: I62e3f429f4205feb50e123ee94b4c468999804a6
luetooth/hfp/HeadsetService.java
ebdb4d92c0ea0b5e40afe0feec71105695d27a4c 12-Sep-2012 zzy <zhenye@broadcom.com> When pbap cleanup, stopSelfResult called twice with same service id

This seemed like to be the root casue of bug 7136940. The thread 3564 stuck after following log:
09-10 11:24:08.882 3564 V BluetoothPbapService: Pbap Service closeService

bug 7136940
luetooth/pbap/BluetoothPbapService.java
826318bb9de042f10df8639da2965bf4d9d38e85 19-Sep-2012 John Huang <jsh@google.com> Merge "Enable Bluetooth sharing of downloaded files." into jb-mr1-dev
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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
ee52ddf33a0ce2cf89cc028136f60ae600c45de5 27-Jul-2012 Jake Hamby <jhamby@google.com> Enable Bluetooth sharing of downloaded files.

Change BT OPP to open the InputStreams of files to share in the
BluetoothOppLauncherActivity (or BluetoothOppHandoverReceiver
for NFC shares), while the process has grantUriPermission() on
the URI's to share.

InputStreams are saved inside the existing BluetoothOppSendFileInfo
objects, which no longer include the mDestination field because
this isn't known at the time the SendFileInfo object is now created
(before the user has chosen the destination BT device). These
objects are stored in a static ConcurrentHashMap in BluetoothOppUtility
and are removed when the file is closed (on success or failure).

If the user tries to share thousands of files in one batch, we may
not be able to open InputStreams for all of the files in the batch.
In this case, the open should fail gracefully.

Bug: 6808783
Change-Id: I3f3f86d2dc1a78a837aeb6a888f90b26434ba499
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppUtility.java
f46f032adaec19a0d0c11b921fb356cbcd7aedbd 14-Sep-2012 Matthew Xie <mattx@google.com> Donot include photo in vard in pbap

Certain carkit abort pbap transfer if vcard includes photo
bug 7070862

Change-Id: Iacd7e20901a7450599e844d1fb34923108e81bdc
luetooth/pbap/BluetoothPbapConfig.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
luetooth/btservice/AdapterService.java
09f5dca9925c75166688e1ab7aa5ce377277e395 16-Jun-2012 Björn Lundén <blunden2@gmail.com> Bluetooth: Use proper holo alert drawable

Make it use the holo drawables instead of the GB
compability drawable.

Change-Id: Ib85d89f0f3a6248d357a612afa8c0158a0876b86
luetooth/opp/BluetoothOppBtEnableActivity.java
luetooth/opp/BluetoothOppBtErrorActivity.java
luetooth/opp/BluetoothOppTransferActivity.java
37e1e995fdfd6aecd53f1fd1f8f0928021472db1 10-Sep-2012 Kausik Sinnaswamy <kausik@broadcom.com> Terminate PBAP service cleanly during BT off

PBAP service runs in a loop of 10 trials to create the RFCOMM listener
thread; this loop is not getting interrupted during BT off, due to which
we end up delaying PBAP stop by 3 seconds (10 * 300ms). The fix is to
check for BT state after RFCOMM listener failure and break out of the
loop if BT is being turned off.
bug 7134544

Change-Id: I81d2a559857eef9138ebca662ea28f1d3e358bb8
luetooth/pbap/BluetoothPbapService.java
8ca777c3299ebf8c5869d46ba80d3fa474814751 10-Sep-2012 Matthew Xie <mattx@google.com> Revert "Terminate PBAP service cleanly during BT off"

This reverts commit f5d88a7b8659bb9ce49edc4faea6bf56f2158572

Change-Id: I67a4950831dce7392d63edad6f693abcc69d2ffe
luetooth/pbap/BluetoothPbapService.java
f5d88a7b8659bb9ce49edc4faea6bf56f2158572 10-Sep-2012 Kausik Sinnaswamy <kausik@broadcom.com> Terminate PBAP service cleanly during BT off

PBAP service runs in a loop of 10 trials to create the RFCOMM listener
thread; this loop is not getting interrupted during BT off, due to which
we end up delaying PBAP stop by 3 seconds (10 * 300ms). The fix is to
check for BT state after RFCOMM listener failure and break out of the
loop if BT is being turned off.
bug 7134544

Change-Id: I35db2221be30980bec973253cdd888e0ce8cc36b
luetooth/pbap/BluetoothPbapService.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
luetooth/btservice/AdapterService.java
ce0b8381a621aa5dbac9d44932c5293d980df4c8 20-Aug-2012 Martijn Coenen <maco@google.com> Merge "Don't trust length specified by ContentProvider for file transfers." into jb-mr1-dev
a8e40f542287f047a8a2fda7f5ea2aea9607edfe 14-Aug-2012 Ravi Nagarajan <nravi@broadcom.com> Notify headset of signal strength change

Battery and service state changes were relayed to the stack, but not
signal strength. This has been resolved.
bug 6983415

Change-Id: Ie6fbb108805348e39c9119d028afb834556ae6b0
luetooth/hfp/HeadsetPhoneState.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
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
44d87716fccf8ff6f114db72711388fa57068078 13-Aug-2012 Ravi Nagarajan <nravi@broadcom.com> listenForPhoneState only after SLC

Start phone state listener after SLC setup, instead of on
Disconnected SM exit(). On BT OFF, quitNow() forces a SM exit()
which incorrectly started the phone state listener. Additionally
no indicator updates should be sent prior to SLC setup
bug 6976119

Change-Id: Icff2bc52602230b098651225bec92d532f3a3ff9
luetooth/hfp/HeadsetStateMachine.java
fdc7bd89b00e40b459c706784fa003509a229096 03-Aug-2012 Martijn Coenen <maco@google.com> Don't trust length specified by ContentProvider for file transfers.

It seems that the length specified by content providers for images
is often not correct. This happens because applications modify the
images later on with meta-data, etc., but don't update the length
field.

This causes Bluetooth OPP transfers to fail, usually with an
IndexOutOfBoundException. The root cause (wrong size in content
provider) of course needs to be fixed, but we can also make
Bluetooth more resilient to these situations.

Since OBEX needs to know the transfer length
up front, the only other way we have of determining the size
of the content is by opening a file descriptor and getting
its length.

Bug: 6857704
Change-Id: Iaf2304b44e9e81ef6e6ac7e0fe3be84ad31a312f
luetooth/opp/BluetoothOppSendFileInfo.java
ef39cada04683dd7ef7b68c89a8722f2ce635c28 06-Aug-2012 Ravi Nagarajan <nravi@broadcom.com> Add unbond reason to bond state change intent

HAL sends the status to indicate the reason for bonding failure, if any.
Add this to bond state change intent, so that the Settings app can
display the error dialong, if necessary.
bug 6936335

Change-Id: Ide7c9e497bbfc6428b60c7a6de6e01ca538edfb8
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/BondStateMachine.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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/RemoteDevices.java
luetooth/hdp/HealthService.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
0322ae1f5e8ea55c391145e7925cb5962a97c11f 02-Aug-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Proper update of friendly name for a paired device.

Update friendly name for a paired device by properly initializing mAlias
member of DeviceProperties in Property Changed Callback() for remote device.
bug 6884149

Change-Id: I01d0679af4facfe6e92527f7618f4ff791928d0e
luetooth/btservice/RemoteDevices.java
b45486075acf191f99da6a5d4f69a6f7aeff65da 27-Jul-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Fix typo in PBAP Server name SDP record

Change-Id: Iff48e815987178597d93069ae3874ca903882e37
luetooth/pbap/BluetoothPbapService.java
7ac24de2819e5e4140ab7ab264e7cfffed4d7398 18-Jul-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Do not accept connection from remote PANU if the local role is also PANU

Fix for BLTH01537991
Change-Id: Ieea143a5929217c7dc52c541e55ddf57077b244f
luetooth/pan/PanService.java
15d72a0c3338645bcc409023150aec40b08aadc1 29-Jun-2012 Ravi Nagarajan <nravi@broadcom.com> Resolve incoming pairing and connection issue

When the remote side initiates pairing & connection, occassionally
connection is made before the phone has had a chance to do SDP.
In this case, the profile priorities are not initialized, which caused
us to incorrectly reject the incoming connection. Allow connection
if priority is undefined, but device is not unpaired

Change-Id: Icd8257adea19fc9a4d3853cd85da9bd791cfe505

Conflicts:

src/com/android/bluetooth/a2dp/A2dpStateMachine.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
74a598e0a8d50343227e3f96bbe56c6be1c240f9 28-Jun-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Ensure mAddr member of DeviceProperties is properly set with device BD Addr

Change-Id: I5dafb48fc63dadfc5ad60e5a4e9735cf72d56534
luetooth/btservice/RemoteDevices.java
10bab53713ca13b3ccdaac5286c9b576e577be5e 25-Jun-2012 Swaminatha Balaji <swbalaji@broadcom.com> Fix for When Hf is rejected the device should initiate A2dp if a2dp is enabled

Change-Id: I15d3d6c8456e94553f479009c600dca1cd2361ac
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
caa3723eaa20e57aac086d54a41106108503debc 27-Jun-2012 zzy <zhenye@broadcom.com> Added code to ignore the empty value of remote device property change
Change-Id: I0d6b293c0bf35d9b4a2df00e9b3cd810c4a9b251
luetooth/btservice/RemoteDevices.java
6b19b0e94877ae8f0803133f8cfb4885acff2763 14-Jun-2012 Syed Ibrahim M <syedibra@broadcom.com> Virtual call implementation

Change-Id: I72a96eedd1cac10a0da7223ebc9b70fd4a21974d
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
81491a292e9f01007c0f291e7f6acd054f6dcb4c 18-Jun-2012 Priti Aghera <paghera@broadcom.com> HDP-App crash fix
Set the channel fd to null in channel state callback if new state is not CONNECTED

Change-Id: Id540d9ca2e20ef3e03b11a61634b8a2cb4e05df1
luetooth/hdp/HealthService.java
fe0ac5b0476b628be11c93a818f342db90332ea8 20-Jun-2012 Matthew Xie <mattx@google.com> Notify Connection state chnage to AudioManager via an API call

bug 6834913
Change-Id: I58af46710320f3debee1780aeaea7f5548233604
luetooth/a2dp/A2dpStateMachine.java
5705f3a6c994b32ed9c50c21e9689108d2ec00fe 14-Jul-2012 Matthew Xie <mattx@google.com> Remove unused import com.android.internal.telephony.Call

Change-Id: I491dc175b29f98900b79e801ff3fb4f116752668
luetooth/hfp/HeadsetPhoneState.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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
c55a9837c004044051b71bb47182ace156691283 07-Apr-2012 Matthew Xie <mattx@google.com> replace logx with alogx

Change-Id: Iec82cb4545bb26a8aa55dc7d473247396b9fd6e1

Conflicts:

jni/com_android_bluetooth_hid.cpp
luetooth/hfp/HeadsetPhoneState.java
4603dc081506452854023a1c6eacdfca468e0dc4 12-Jun-2012 Matthew Xie <mattx@google.com> comment out state machine quit call

Change-Id: I0d4f72d50cd981a3c334583948dc0563f0662662
luetooth/a2dp/A2dpService.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/hfp/HeadsetService.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
luetooth/btservice/AdapterService.java
luetooth/pan/PanService.java
179fd2512d1a93bbd2a1a3803f5764cb417fe4c9 11-Jun-2012 Kausik Sinnaswamy <kausik@broadcom.com> Add remote device while pairing without inquiry

Change-Id: Ia7d99075b196414b3ded117b323ca5295c2c0b73
luetooth/btservice/AdapterProperties.java
luetooth/btservice/BondStateMachine.java
2f9a79b2d545e1a8b50a0018456892a9934db99a 06-Jun-2012 Ravi Nagarajan <nravi@broadcom.com> Resolved incoming pairing/connection issue

Sending bond_state_changed and adapter_properties_cb concurrently was
causing a race condition, which resulted in the BOND_STATE_CHANGED intent not
being sent. This caused the Settings to not show the newly bonded
device. This has been resolved by letting BondStateMachine manage
the mBondedDevices

Change-Id: Ieba39602436370fd9a87c3aa938ff3bd724c68cf
luetooth/btservice/AdapterProperties.java
luetooth/btservice/BondStateMachine.java
579f67ec87646f840c1235eb62d99ab9fa11f23c 05-Jun-2012 Sreenidhi T <nidhit@broadcom.com> Additional check included for the case when PhoneApp queries Bluetooth Audio state before the stack responds for the sco disconnect issued previously in AudioOn state.

Change-Id: I8b85fc9d3b4463205f01dfaa3bb309a3dbeb8231
luetooth/hfp/HeadsetStateMachine.java
99a6ee18f09cf8e7ddff91d68267db21867b3cdf 31-May-2012 Syed Ibrahim M <syedibra@broadcom.com> Fix the issue where HID connection was failing on first connection randomly.
Made changes in HidService to send a STATE_CONNECTING broadcast when HIDService.connect() is invoked;
Also before rejecting the incoming connection, check if the connection is transitioning from STATE_DISCONNECTED to STATE_CONNECTED and then only do a disconnectHidNative(). The normal flow of HID connect would transition from STATE_CONNECTING to STATE_CONNECTED

Change-Id: Ia416e3a70fc6c3561c3530091691367c5da2674c
luetooth/hid/HidService.java
e479e18951a375a548e617e86e3b1b7d121351a1 25-May-2012 Fred <fredc@broadcom.com> Fixed PBAP to use simple pairing instead of numeric comparison (same as before).
Also, escape special characters in vCard-Listing XML object

Change-Id: I32eb126f3dba4b35af39e6e0636f2f7f7e8d94a8
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
8120c75b7a8b5a9c0e00df500c1ed072a952bda1 26-May-2012 zzy <zhenye@broadcom.com> Added code to cleanup connection state when bt off
luetooth/pan/PanService.java
a25e9c65c2a0192b7b3d819e2b87704f1942aa2f 21-May-2012 Sreenidhi T <nidhit@broadcom.com> Changing the order of notification of connection state change, as it was causing a race condition, with the UI not being updated with the correct connection state.

Change-Id: I6f4c75e4eac4ae798cb7918a4f1b7458e1eaa4b0
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/pan/PanService.java
4a53a55dc10d3a26c94e5844f7d4a2565a67142c 19-May-2012 fredc <fredc@broadcom.com> Fixed displaying images in pbap browse and pull when configured

Change-Id: I8315d4db76d7cbfeaefe4187100984d12bd952ed
luetooth/pbap/BluetoothPbapVcardManager.java
942da5b41b0c9e45e83e9801f80b982f1e4cd011 18-May-2012 Kausik Sinnaswamy <kausik@broadcom.com> Ensure that A2DP stream is suspended during Voice Dial when SCO
connection is established. This is needed to be compliant with the SIG's
AV+HF whitepaper

Change-Id: Ie072782ea70de0f1b13c6cf8bfcb88c072a1d093
luetooth/hfp/HeadsetStateMachine.java
755aa8f5359a933205552c40b6446b001ae42378 15-May-2012 Priti Aghera <paghera@broadcom.com> Fix for force closing HDP app: Included review comments
Included a callback to linkToDeath and notify the HealthService when BluetoothHealth is dead

Change-Id: Ie34a391f78c4fba0a74bcefd3dedccaa63f7bba3
luetooth/hdp/HealthService.java
75e9fd59f4d4011ba7155732a41b06f0df40bada 15-May-2012 Swaminatha Balaji <swbalaji@broadcom.com> Fix for A2dp/hf connection happening even when profile is disabled in Settings

Change-Id: I32145db12e0107b858e2e25ad1ae6cba6eadb55d
luetooth/a2dp/A2dpStateMachine.java
luetooth/hfp/HeadsetStateMachine.java
a7e8ef3f77ac74449f817f36f570a3545285be85 11-May-2012 fredc <fredc@broadcom.com> Added support for enabling/disabling profiles

Change-Id: I819ca7920d9d866bd3aca88d4365a18e2369ee81
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterService.java
luetooth/btservice/Config.java
luetooth/pan/PanService.java
c181b8b49f5ad5b49b33334a9ba8f342ddb3545c 14-May-2012 Kausik Sinnaswamy <kausik@broadcom.com> Fix to ensure that we are able to pair with a device that was just unpaired. The fix was to clear a boolean variable which was causing some stale data to be maintained

Change-Id: Iaad0e21794b0b6e47d12c837ef36e026b6ece655
luetooth/btservice/BondStateMachine.java
d807ba48ed4418c1a60549abe1c3a98ced8c428d 14-May-2012 Sreenidhi T <nidhit@broadcom.com> Change done to clear mUuid - local copy of Uuid. If not cleared, the cachedBluetoothDevice issued a connect using the local cached copy of uuids, without waiting for the ACTION_UUID intent. This was resulting in multiple calls to connect().

Change-Id: Ida6fd2e805dee8c19b4d7d656b4102891f51fd00
luetooth/btservice/RemoteDevices.java
970baea8e58a7b537e76e8bcbba34f428cede061 12-May-2012 Priti Aghera <paghera@broadcom.com> Fixed HDP Disconnection issue. Included channel to list of channels when channel state callback is received

Change-Id: Icd361a3f19b883b3cca27fe9eb0cafc3b969290b
luetooth/hdp/HealthService.java
c7a57f31515107366589bd6875c3cc4af1fc806e 07-May-2012 fredc <fredc@broadcom.com> Added PBAP support for fetching owner vcard info from phone's profile. Added PBAP image support

Change-Id: Ieb2993c9505185d4f85cbbf6b5c554936618cff0
luetooth/Utils.java
luetooth/pbap/BluetoothPbapConfig.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapUtils.java
luetooth/pbap/BluetoothPbapVcardManager.java
4852c5686229f1014e9851f4e9a3a19547581b45 10-May-2012 fredc <fredc@broadcom.com> Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService

Change-Id: Ic9911359c1d9e04a5d803807ea7cf4ad39616960
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
74ae04c73312403e89db0f8e9bd9601d403b4783 07-May-2012 fredc <fredc@broadcom.com> Fixed memory leak in Binder objects from repeatedly turning on/off Bluetooth

Change-Id: Ibee5382816d47b1e9b846461942a9daccc4210a7
luetooth/Utils.java
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/hdp/HealthService.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
ce4edb8ed132976651b32b337f3d90e1a170afa9 08-May-2012 Sreenidhi T <nidhit@broadcom.com> Changes done for disconnecting sco connection based on disconnectAudioNative() return status, instead of waiting till BTA_AG_AUDIO_CLOSE_EVT is received. The delay in disconnecting sco was causing audio to be routed to earpiece instead of speaker, when selected from incall screen.

Change-Id: I307c3e9c114676649750cb64f1043fc7fe79d71b
luetooth/hfp/HeadsetStateMachine.java
405b6148a168c05f9c9eac6a80db68b9a58392e2 27-Apr-2012 Sreenidhi T <nidhit@broadcom.com> Added AT+CPBR support

Change-Id: Ice860d8f97350d805a5478e94a27ae19cf42dafd
luetooth/hfp/AtPhonebook.java
luetooth/hfp/BluetoothCmeError.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
ac7e62c64b4cd8d864f125d3225474a04b867606 27-Apr-2012 zzy <zhenye@broadcom.com> Added code to turn off pan connection when tethering state changed
luetooth/pan/PanService.java
d288c0dac06748780916bf438b7c84482545672f 26-Apr-2012 fredc <fredc@broadcom.com> Backed out workaround for RFCOMM socket close issue when BT is turning off

Change-Id: I793fa2a0fa0127b6ff70aeb448c97c3cc9154d6f
luetooth/opp/BluetoothOppRfcommListener.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
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/ProfileService.java
luetooth/btservice/RemoteDevices.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapService.java
7aab11364743cbca6eeefecbbde19f0434aff362 24-Apr-2012 fredc <fredc@broadcom.com> Fixed exception in BondStateMachine when quit message occurs. Fixed exception in OPP when remote does not accept incoming request.

Change-Id: Ibb43a26ee0ac62967518468d243880a0af987ba0
luetooth/btservice/BondStateMachine.java
luetooth/opp/BluetoothOppTransfer.java
68e7fc4f2c62ebc76e86109a919592ad25ec11d7 24-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> Handle NREC. On connect, enable echo cancellation locally, headset will then override it

Change-Id: I8fca1e82d1457b47122c17393ffbff362e1f3134
luetooth/hfp/HeadsetStateMachine.java
01a8cf98f070a6996b2e8974edc229ac402f3f0c 03-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Added ACL connect/disconnect state callbacks

Change-Id: Ibd44de8601521a11b106711ccad9261fb40beca8
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.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
luetooth/btservice/AdapterState.java
6de8229571ce56dcb0010c63cbef65e01ecd5c2a 22-Apr-2012 Priti Aghera <paghera@broadcom.com> Fixed random pin generation for pairing with HID keyboard

Change-Id: I7e6fd39289c6c5ebefd94f45e24de86e6aeaa625
luetooth/btservice/RemoteDevices.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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/ProfileService.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hid/HidService.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/Constants.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
1404ab28fd296373a98b766b0b01193985446eab 21-Apr-2012 Harish Paryani <hparyani@broadcom.com> Added a comment

Change-Id: Ia52a0f58ee2085f3452877e23a591dcd842bafac
luetooth/hid/HidService.java
522003462124b08ef9345a6778df4089d202d6fa 20-Apr-2012 Harish Paryani <hparyani@broadcom.com> Corrected a comment

Change-Id: I365bf2dd835385629b7e7bbff649e9fdd6646db8
luetooth/hid/HidService.java
42a6e53f2ec04cbd78fea952fc926fdf3e5b8cd9 19-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> Connection state change has to be handled in AudioOn state. Some headsets send RFCOMM disconnect prior to disconnecting the SCO. In this case the state machine has to handle the connection state change

Change-Id: Ib80a49cbd959055624baae6e5a35022c628f4bba
luetooth/hfp/HeadsetStateMachine.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
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterState.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapService.java
ac234ef0ddd67471d82f77c41535a5ea1b68b443 19-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Added support to handle A2DP audio state changed events and broadcast
A2dp API intents

Change-Id: I1938e5e0acbbaf602239e14e1dfd3c890712930a
luetooth/a2dp/A2dpStateMachine.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
luetooth/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
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/pan/PanService.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
luetooth/Utils.java
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterApp.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
luetooth/hdp/HealthService.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
luetooth/hid/HidService.java
luetooth/pan/PanService.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
990b2cd65392bc6db58eda732ad41de22b713202 12-Apr-2012 Priti Aghera <paghera@broadcom.com> Patch for inconsistent pair-unpair state

Change-Id: I356cd978c6b30b415a94267c9e535dc0297d6540
luetooth/btservice/AdapterProperties.java
206363c7e1d2a7eb116aa6559c83431cd3f55def 11-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> AT Response needs to be send for CNUM

Change-Id: Ia6aa0e91bc42b9a77143087f65b95c81117b9e3c
luetooth/hfp/HeadsetStateMachine.java
aa90f0cbb860434c5310ae6bfa16987834f582f0 11-Apr-2012 Priti Aghera <paghera@broadcom.com> Patch to fix getBondedDevices and inconsistent pair state

Change-Id: Idaf2a18dcaaaca422d3d5ee9245dbfa75cbbb96c
luetooth/btservice/AdapterProperties.java
luetooth/btservice/BondStateMachine.java
57addccaa75691f8eb6f35204d608a63695a9705 09-Apr-2012 Priti Aghera <paghera@broadcom.com> HID-PTS:Included API and calbabkcs for hid pts tests

Change-Id: I7f3b19dbcda24dbb0cd4700a54f7cd05e84d3745
luetooth/hid/HidService.java
d570893c5ec3bc9fd1860aa0355c550d3a51f8dd 09-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Improve BT enable/disable stability under stress tests

Change-Id: Ie6323a225b5e1ccd1ad9f65e90b144c93b957a8b
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterState.java
25ec7de5ff422f50f3dbfd0822423c85b47f4794 09-Apr-2012 Ravi Nagarajan <nravi@broadcom.com> Implement the getDevicesMatchingConnectionStates for A2DP

Change-Id: Icf5b14d13c4ee6564876aac529e992a22747ac41
luetooth/a2dp/A2dpStateMachine.java
c55ac7d42cf2d78c7edc67abf6c66813245b2c93 06-Apr-2012 fredc <fredc@broadcom.com> Added support for BluetoothDevice.fetchUuidsWithSdp()

Change-Id: Icd260b0cafd7fee72a7ad0275b62052257c6fc13
luetooth/btservice/AdapterService.java
luetooth/btservice/RemoteDevices.java
19da573973557408b1b7398a2c3a167d8da9527d 04-Apr-2012 Srikanth Uppala <suppala@broadcom.com> Fix discoverability timeout issues. (a) implement timeout logic (b) persist 'never timeout' after reboot (c) code cleanup

Change-Id: I9313277c39c69f90d0b0556cf24d9c30a774a0a6
luetooth/btservice/AdapterProperties.java
luetooth/btservice/RemoteDevices.java
8826b161f865350f306e8f287aaca615e2f1e4a3 04-Apr-2012 Matthew Xie <mattx@google.com> check device.mAlias null case before copying to it

Change-Id: I705126ce11272d9c3a5577c0266982a6478e8a87
luetooth/btservice/RemoteDevices.java
9f0d856f41d443ec23d5aa2eecfc561d7a3c01d1 31-Mar-2012 fredc <fredc@broadcom.com> Initial checkin of OPP and PBAP

Change-Id: Ie43a26874bd5f0c00d69c2ce02430f4a16da327a
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/pbap/BluetoothPbapService.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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.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
luetooth/Utils.java
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterService.java
676cb1bdd1c14c7af56562bab51f168e7f8f6d62 23-Mar-2012 Matthew Xie <mattx@google.com> Initial implementation of hdp service and jni

Change-Id: Ieca906080835098383cabbc13fa914363459f555
luetooth/btservice/AdapterService.java
luetooth/hdp/HealthService.java
f8d98da947bbb9e2380a60df89acbcbd4ca680af 03-Apr-2012 Kausik Sinnaswamy <kausik@broadcom.com> Fixed incorrect handling of the RSSI during inquiry which causes the devices to not get sorted properly.

Change-Id: Ib4eca5405a3393aef79f43943853adf76da23e76
luetooth/btservice/AbstractionLayer.java
8f8e1bdc4dfc5d9d974b0e0b01dbe981707c9c6f 30-Mar-2012 Ravi Nagarajan <nravi@broadcom.com> ATD commands have a trailing ';'. Remove the trailing ';' prior to dialing a call. Else a send tone popup is received.

Change-Id: Icbd53166001d3be102bac6a8d2f782cb22c4dc56
luetooth/hfp/HeadsetStateMachine.java
b01cf4299897d227c7dbcbe4981b63a1ffe4ffca 30-Mar-2012 Sreenidhi T <nidhit@broadcom.com> Fixed the pairing variant check typo.

Change-Id: I1a835531bc35cc6b1a178a0d131a86715df6f3f0
luetooth/btservice/RemoteDevices.java
5f1bee8200197a49d8ffc49fe3e91d19c927ff52 28-Mar-2012 Ravi Nagarajan <nravi@broadcom.com> Resolved HSP PTS issues. When call is active, and CKPD is received: 1. If audio is not ON, audio will be enabled 2. If audio is ON, call with be disconnected (fixed a typo here, which answered the call, instead of hangup)

Change-Id: Ib60f7109f9fe982523c3db68ea6014c25bad8262
luetooth/hfp/HeadsetStateMachine.java
b18d6a7da48a6847df88abadd42fbb51316cb76d 27-Mar-2012 Ravi Nagarajan <nravi@broadcom.com> Integrate HFP with VR app. Handle both cases where VR is started by peer as well as launched from the phone

Change-Id: Icf2922f4caf20190fdb3f0afa2ddd19d1852c4fb
luetooth/hfp/HeadsetStateMachine.java
35207a5638f61caca5b9abb31e5c6850a9478a52 22-Mar-2012 Matthew Xie <mattx@google.com> initial implementation of hid service and jni

Change-Id: I527651bd85ad3adddbf4b89802f4a6128c9fa047
luetooth/btservice/AdapterService.java
luetooth/hid/HidService.java
345d21b0575a4b866bfc9ccfde9c654e7b859ac6 20-Mar-2012 Matthew Xie <mattx@google.com> Fix persistent audio on, Donot connect_audio when enter CONNECTED state. Process DISCONNECT message in AudioOn state.

Change-Id: Id89842ff2179234c320752ae69dcf3c99b125bce
luetooth/hfp/HeadsetStateMachine.java
bcbeaf69468424800a939b3e8678eaef21efa3d6 09-Mar-2012 Matthew Xie <mattx@google.com> process slc_connect state change event, query and send stack the phone state

Change-Id: I4472384290d87f13f7be5647327c789c01582a7b
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetStateMachine.java
ab1a751670c1bceb23f3cf880f6ad9421c0487c2 19-Mar-2012 Matthew Xie <mattx@google.com> Revert "fix persistent audio on, Donot connect_audio when enter CONNECTED state"

This reverts commit 3ce52a01d734e73a21074ab8397cf67b16d6595f

Hi Matt,
I reviewed your changes (2), and they look good. However, your changes in (1), seem to be causing a side-effect while testing the headset connection setup while call is active/outgoing/incoming. Since this change was merged, I am sending my comments thru email.
Here is the scenario
1. No headset connection

2. Place an outgoing call, and answer it at the remote side

3. Initiate connection from headset

4. SCO seems to be setup by Java side even before SLC setup completes

ISSUE#1: Once Java receives connection event, it automatically calls connect_audio, even though SLC has not been setup
ð Can you make a change to call connect_audio, only after SLC is complete? If this difficult to do, can this code just be removed, as the stack will do automatically after SLC setup when phone_state_change is called

ISSUE#2: If we redo this for an outgoing call (call answered prior to headset connection), then the Java side does not initiate SCO audio
ð To have a consistent behavior, if Java side is setting up SCO for active call, shouldn’t we be doing the same for outgoing call too?

Thanks
Ravi
luetooth/hfp/HeadsetStateMachine.java
53b834a8a7f9f077ff751ade222d2f81d9d6fdad 09-Mar-2012 Matthew Xie <mattx@google.com> fix persistent audio on, Donot connect_audio when enter CONNECTED state

Change-Id: Ieb2c327ab562c02f293fa616e555ed5a8dc55570
luetooth/hfp/HeadsetStateMachine.java
47ead0fdf1786e6f0c5bde1c6b1b40b08168edb9 10-Mar-2012 Matthew Xie <mattx@google.com> output call back event information

Change-Id: I6a84a19f91fbb102668745623327f7e234c2ad5d
luetooth/hfp/HeadsetStateMachine.java
f0b6639617ce2245ffb88968e8a864d0fa99dd8c 09-Mar-2012 Matthew Xie <mattx@google.com> Save volumes and notify stack only when they change

Change-Id: Ibcf6a55111ee3d6ecab6ecd75ab957258b35e49c
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetStateMachine.java
986b5b03a378385bfea6c5cc6b6c1d7f0424e0a5 09-Mar-2012 Ravi Nagarajan <nravi@broadcom.com> Added new state BT_BOND_STATE_BONDING. Stack will send a callback for all three states, app does not have to rely on the api return code to switch to bonding. This addresses the incoming pairing as well as the remote unpaired test cases

Change-Id: I37208e5bae7264a0ff78195322ba0a6bd1d82f0f
luetooth/btservice/BondStateMachine.java
9b300c1a33952a22c3bba1521da2d01cbf607b7b 08-Mar-2012 Matthew Xie <mattx@google.com> update call state to match hf hal header, memory dial fix null pointer

Change-Id: I62f26d0259a910ac80d7a18c6bef49abb6eab820
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetStateMachine.java
6c91bc0a163cc7600c40d7fb979777fd911d1ef1 17-Feb-2012 Matthew Xie <mattx@google.com> Initial implementation of HFP and A2DP profile/service/statemachine.

Change-Id: Ic6e6d358b94313f237b7be61b70dcc6f4f7902e7
luetooth/a2dp/A2dpService.java
luetooth/a2dp/A2dpStateMachine.java
luetooth/btservice/AdapterService.java
luetooth/hfp/AtPhonebook.java
luetooth/hfp/HeadsetHalConstants.java
luetooth/hfp/HeadsetPhoneState.java
luetooth/hfp/HeadsetService.java
luetooth/hfp/HeadsetStateMachine.java
1444b5b09d07b1ad5ec2ce89b4267484be25e8bf 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Incoming pairing issue.

Change-Id: Idd77d49a9d6df94e6dc9dfe4f179e93641d48261
luetooth/btservice/RemoteDevices.java
b9122437dc3562f8306b1c8bc97124dc8c33ae45 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Fix Bond State Machine device list.

The device list was adding the device twice.
Note: This whole class should be removed and moved to
the stack.

Change-Id: I6086ee98bd1b4088a90b76f67a9fff21987f4b04
luetooth/btservice/BondStateMachine.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
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/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
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
b7e70fcf8923b9452074b2b4ee685da424cc7d93 07-Mar-2012 Kausik Sinnaswamy <kausik@broadcom.com> Merged the Passkey request callback and the passkey reply APIs into the SSP API and callback respectively

Change-Id: I2b8fb1665586d32b0ada1b882cbde1d232233803
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/RemoteDevices.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
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterService.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
fe90735bb6280ccaceb8a0a990781a810a2dd33e 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Fix scan mode bug.

The incorrect paramter was being passed.

Change-Id: Icc119811d61ffa537b837a6712a85ea9dcefaa87
luetooth/btservice/AdapterService.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
luetooth/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
luetooth/Utils.java
luetooth/btservice/AbstractionLayer.java
luetooth/btservice/AdapterProperties.java
luetooth/btservice/AdapterService.java
luetooth/btservice/AdapterState.java
luetooth/btservice/BondStateMachine.java
luetooth/btservice/JniCallbacks.java
luetooth/btservice/RemoteDevices.java
2a6bf35f603d12e6533a69c773ac258b0e84941f 02-Feb-2012 Jaikumar Ganesh <jaikumar@google.com> Comments opp and PBAP init code when BT gets enabled.

Change-Id: Id1b9329cb4dba7f4d4e5f478a775bcfd18a68a66
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/pbap/BluetoothPbapService.java
1eb1a249ee36c3e037355cce6d50511864dc0e7f 17-Jul-2012 Matthew Xie <mattx@google.com> Revert "first patch of test submit"

This reverts commit 1429606cdb0c5b4410a224697e0ac2459ebe4cb7
luetooth/opp/BluetoothOppBatch.java
1429606cdb0c5b4410a224697e0ac2459ebe4cb7 16-Jul-2012 Matthew Xie <mattx@google.com> first patch of test submit

Change-Id: Ief4f86f471ac62b11b9dcd4cae937d7fb261ba69
luetooth/opp/BluetoothOppBatch.java
5cb59523d7d7e25c58bd99c100c50e49c78481ce 15-Jun-2012 Matthew Xie <mattx@google.com> Change timestamp type from int to long, timestamp(now) overflows int

BluetoothOppNotification NotificationItem.timeStamp is int, too
small to be a timestamp
bug 6670668

Change-Id: Ieec5377bac3b8c7fbaa24d059ad5957ba9a0544f
luetooth/opp/BluetoothOppNotification.java
03f25a2055e51bcc5e8870642763b502956b6830 18-May-2012 Martijn Coenen <maco@google.com> Bluetooth OPP: Allow sending all mime-types for handover.

This change allows sending of all mime-types through
ACTION_HANDOVER_SEND and ACTION_HANDOVER_SEND_MULTIPLE.
These intent actions are only used by NFC when doing
handover transfers, and require the whitelisting
permission that is only granted to system applications.

Similarly, for receiving, we will still reject certain
mimetypes, except if the transfer was whitelisted because
it was a handover transfer.

At this moment, only the NFC service has the signature
permission required for whitelisting.

This change also allows to send files without extension,
as long as OPP has a valid mimeType. This is useful when
using OPP in combination with a content provider, which
may specify filenames without any extension but with a
valid mime-type.

Bug: 6561169
Change-Id: Ia39418de6bcb2f8af678c7b8637b63b1697eb493
luetooth/opp/BluetoothOppHandoverReceiver.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/Constants.java
acc04ecbd174b07d580248aaf6640c3d2b42ca49 24-May-2012 Martijn Coenen <maco@google.com> Merge "Fix variable initialization." into jb-dev
a1f935d1a2a21d82a4069d1832e2d7239d7a256f 24-May-2012 Martijn Coenen <maco@google.com> Fix variable initialization.

This could cause Bluetooth file transfers to fail.

Change-Id: I69b91e84cb7df1f147581e37f056eeacd54687d8
luetooth/opp/BluetoothOppLauncherActivity.java
4bfe5662b7169484d32186a2042cb88cdbc446ba 17-May-2012 Martijn Coenen <maco@google.com> Merge "Allow bluetooth OPP transfers to be stopped." into jb-dev
584dfb2c53b45080347e412b3f7ed7fd1c9b53e7 16-May-2012 Martijn Coenen <maco@google.com> Allow bluetooth OPP transfers to be stopped.

If handover requesters such as NFC want to cancel an
ongoing transfer, they can use this intent. It requires
the same permission that is used for whitelisting,
which at this point is only granted to the NFC service.

Change-Id: I89e27550d700c4a29a892dba99fda740d8845642
luetooth/opp/BluetoothOppHandoverReceiver.java
luetooth/opp/Constants.java
d5e1472188b7e21123a02339ed8766256aa8f630 15-May-2012 Martijn Coenen <maco@google.com> Don't MediaScan files received through handover.

Handover providers such as NFC may move the file in the filesystem
(out of /bluetooth), hence it's better not to scan them here.

Change-Id: Ic374c5ae880cb65e2d8a9ce615115b51fdc29353
luetooth/opp/BluetoothOppService.java
7a4cc5c2f6ec06e8dc6f930680ce9aceff6df359 14-May-2012 Martijn Coenen <maco@google.com> Add BT address and mimeType to handover intents.

Also, allow refreshing whitelisted entries by sending
another whitelist intent.

Change-Id: If85db397e31364939c67b3018413b625a1888ae6
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/Constants.java
8099f5e7bfa7227ba674b5f0076f331e737bafd7 06-Apr-2012 Martijn Coenen <maco@google.com> Additional changes to support Bluetooth Beam.

- Added a whitelist permission, to ensure only system
services (such as NFC) can whitelist MAC addresses.
- Added HANDOVER_STATUS permission, to ensure handover
transfer status can only be received by eligible services
(such as NFC).
- Added new confirmation type HANDOVER_CONFIRMED; this indicates
the transfer was initiated by a handover, and doesn't need to be
confirmed. This type is also reused to send broadcasts
to the NFC service, so the NFC service can show notifications
and deal with the received data.
- Added 15 second timeout to whitelist.
- Modify notication code to not show any notifications for handover
transfers; instead, send broadcasts to indicate handover status.
- Modify "transfer complete" code to sendbroasts to indicate handover
status.
Change-Id: I00c08e09eaf44f0bd4bd837cb6b0c37b802742bc
luetooth/opp/BluetoothOppHandoverReceiver.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferInfo.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/BluetoothShare.java
luetooth/opp/Constants.java
d6eaf19f39e163e16d22e29907edec402b30622e 04-Apr-2012 Nick Pelly <npelly@google.com> First cut at Bluetooth Beam.

Add Bluetooth address white-listing to avoid receive confirmation from
Beam interactions.

Change-Id: I25720c6e902c494cbb9845a30a175edad4225b89
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiver.java
0ac98162ff293fdaa23f93f9839aaad5428af537 18-Nov-2011 Chih-Chung Chang <chihchung@google.com> Read the requested file size completely.

This was causing failures while sharing pictures
from Picassa over Bluetooth.

Bug:5632161.

Change-Id: Ieb2697513299270b2982ebc6c9f0b367adf36d3a
luetooth/opp/BluetoothOppObexClientSession.java
93ee510229f845a26f57630f32af0093869c1baf 21-Sep-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Only format PAUSE/WAIT character."
d956b40b2f59599447ae0fa0762e055c0c0ce1a3 19-Sep-2011 Daisuke Miyakawa <dmiyakawa@google.com> Only format PAUSE/WAIT character.

Must be after Iff9461d8c71c5800b0731c3708867003d75bb395

Bug: 5348938
Bug: 4177894
Change-Id: I0c5b5b759d11c9d494f9550b9a7bfe948a0690b6
luetooth/pbap/BluetoothPbapVcardManager.java
eb1192b4208d4bf77c92011822e6d171b9f09980 20-Sep-2011 Jaikumar Ganesh <jaikumar@google.com> Reject OBEX connection request for OPP with Target.

According to OPP OBEX specification Sec 5.4, the Push
client should not use target header.

Patch contributed by: inshik.shin@samsung.com

Change-Id: Iaeaa2d488da6592f8bb76a9957ca4b784d032803
luetooth/opp/BluetoothOppObexServerSession.java
dca6152362544ce9d430ca8f2ece7d5dc0f278d1 08-Sep-2011 Jaikumar Ganesh <jaikumar@google.com> Enforce permissions for Connection dialog intents.

Change-Id: I240985998b0d245aacb051e64b5fdaa335c9c06a
luetooth/pbap/BluetoothPbapService.java
dec631a77ab9cc89c4d3867b80cfe300e7cf83e9 02-Sep-2011 Jake Hamby <jhamby@google.com> Use Notification.Builder.setProgress() for progress notifications.

- Convert OPP service to use the new API to create notifications
with a ProgressBar, replacing the previous custom layout.

Bug: 5143664
Change-Id: Iae5e2d417e735588e11c4d17e4172ca40b9dfe73
luetooth/opp/BluetoothOppNotification.java
ce8d51a3a43d113a4a6bad30d595c2a81d0f623c 21-Mar-2011 Yoshiharu Kurita <yoshiharu.x.kurita@sonyericsson.com> Handle PBAP response packet as raw bytes

Adjust PBAP response packet to be always handled as bytes.
Currently, it is handled as string when is read from internal data.
This causes the lack of PullvCardListing packet and the abort of
PullPhonebook transaction when multi-byte characters are contained
into corresponding contacts.
This fix will avoid the lack and the abort by writing whole packet
into the target stream as byte.

Change-Id: I17ee3ada25718cc263c9e0942f75605bd971b638
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
cab07635ea60924a4e9dc13f87a4408988ad4c57 23-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Fix SendConnection state params.

Reported by: sj222.choi@samsung.com

Change-Id: I67da4f8a19be72092aa6cd139e561f4e9dfc5f8f
luetooth/pbap/BluetoothPbapService.java
72d2952fcde46d8c2adc68718957c2fe9f5fa3b0 22-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Update sendConnectionState change function paramter.

Change-Id: Iaf7e43d35ab4a5da325ebae77cbb72617705c772
luetooth/pbap/BluetoothPbapService.java
1f18480dfa9ea5557bcd5928a4c152ab40b85c7e 15-Jun-2011 HÃ¥kan3 Johansson <hakan3.johansson@sonyericsson.com> Send local time, not GMT, in timestamp.

The missed, incoming and outgoing call list shall always have its
time specified in local time according to PBAP V10r00 chapter
"3.1.4.1 Call History extension".

Change-Id: If0c4733552db3813d636a2f4658e64df1c6a4efe
luetooth/pbap/BluetoothPbapCallLogComposer.java
ef697b0b9a74e15b5003e134307e72b20b48de12 02-Aug-2011 jhtop.kim <jhtop.kim@samsung.com> Bluetooth : fix for the OPP service bug while BT on/off

Update patch set for removing BOOT_COMPLETED.

BluetoothOppService.java : use sendMSG instead of sendMSGdelayed
BluetoothOppReceiver.java : delete boot-complete line
AndroidManifest : delete boot-complete line

Change-Id: Icf9a2f48a70ba519cb3caf93a0b33e13472d1f54
Author: jhtop.kim <jhtop.kim@samsung.com>
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppService.java
66cbd62c4837f1e9a261fb1bde1d470c904f2346 04-Aug-2011 jhtop.kim <jhtop.kim@samsung.com> Bluetooth :fix opp for socket error retry

When the pin or link key missing case occurs,
we need to retry the socket connection. Use a timeout
of 1.5 secs instead of 2.5 secs because the ACL inactivity
timer is 2 secs.

Change-Id: I3d4c096bd823e3204e91040bea608e44471dd4ce
luetooth/opp/BluetoothOppTransfer.java
6861c09108700815891920147247f2cf48261ee4 02-Aug-2011 Jaikumar Ganesh <jaikumar@google.com> Check if BT is already enabled before starting activity.

If BT is off, and if the user sends a file, BT will be turned on
and the "Enabling dialog" wil be shown. But with the hot feature,
BT turns on very fast which leads to the intent being missed and the
enabling dialog not being dismissed.

Change-Id: I4f4a6f08e04922a61eb7138b76383a77f8d37da4
luetooth/opp/BluetoothOppBtEnablingActivity.java
77e6229d558b52c316fdba8dd29a6b26fb13fd28 30-Jul-2011 jhtop.kim <jhtop.kim@samsung.com> Bluetooth : fix for pbap ANR while BT on/off

Don't wait to start the listener.

Change-Id: I257332bc38a25b3ca772267a974b4280a8074c40
luetooth/pbap/BluetoothPbapService.java
b0b662a98d8b7c099ee706d0e08bd239adcdffc7 27-Jul-2011 Jaikumar Ganesh <jaikumar@google.com> Fix notification issues with OPP.

Since its a notification event for an ongoing event, add the flag.
That prevents it from being scrollable.

Change-Id: Iaea2e7005cb4f8ab5d0b594c4ef9b30343b730fc
luetooth/opp/BluetoothOppNotification.java
7eab97d6be9228b1c210bbb171c3e5e88e02f3d8 28-Jun-2011 Matthew Xie <mattx@google.com> Move Pbap permission dialog to Settings app.

Strings and diglog are removed and will reappear and modified in Settings
app. We want phone AT commander to use the dialog too.
bug 4489572

Change-Id: I0283b5deff974e53384dc5a92bd01c02e12bbcd6
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapService.java
bf287751bfa6795493b80b0f22854f747f6f974a 22-Jun-2011 Jaikumar Ganesh <jaikumar@google.com> Merge "pullVcard of unknown phone number"
d54a9ac9fd18e2f1df30774a0b6902b91752ea66 22-Jun-2011 Jaikumar Ganesh <jaikumar@google.com> Merge "Revert "pullVcard of unknown phone number""
77ba5f6684f4dd7e4b7fc37982271da5654aec07 21-Dec-2010 Staffan Lindvall <staffan.lindvall.x@sonyericsson.com> pullVcard of unknown phone number

When performing a pullVcardListing, pullVcardEntry or pullPhonebook
on a phone with a call list which contains an unknown phone number,
the phone returns "-1" as number/name. Corresponding errors exist
for private and payphone numbers, where the phone returns the name
"-2" and "-3", respectively. During pullVcardListing the Name
attribute may contain the phone number, in case the name is not
known. The latter is already implemented today, however, instead of
using e.g. "-1" as name when the phone number is not known the
phone should use Name = "Unknown". Currently there are no other
matching corresponding strings defined for private and payphone
number, which means that for now "Unknown" may be returned as name
also for these numbers.
During pullVcardEntry and during pullPhonebook when the phone number
is unknown then the Number attribute should contain the string
"Unknown". During the same scenario the FN and N attributes both
should contain the string "" when the name is not known. When it
comes to private and payphone numbers the same as for
pullVcardListing apply here, i.e. "Unknown" may be used in the
Number attribute also for these numbers

Change-Id: Icf06e527032588f075ff848bea1ba90bf71e874f
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
2f429e31a13f81c9248173b144efca32c0070045 22-Jun-2011 Jaikumar Ganesh <jaikumar@google.com> Revert "pullVcard of unknown phone number"

This reverts commit 86d30be8aa68d0a2b561c36b53f4e5ebe586fe72.
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
44c347ad717ca51b00819736227f7a9c81905396 15-Jun-2011 Liejun Tao <L.J.Tao@motorola.com> Modify the Rfcomm retry logic

In BluetoothOppTransfer where we check mRetry and e.getMessage()
if mRetry is false and e is not "Invalid exchange", the transfer is stuck

Change-Id: Ie7a4da215c9e74e167db9fa29c6e113a7a7a2c77
luetooth/opp/BluetoothOppTransfer.java
d318d6a134efc5bd43653c463699802381f2e0cb 08-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am 9d67ffda: am c50dbb00: Merge "OPP: Notification position is changing"

* commit '9d67ffdac68b49cfc72491f7e2c340df922dbcca':
OPP: Notification position is changing
81512ba08c038366688fbe918373f7a9d3e31c9a 08-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am 6874774a: am e7df5087: Merge "Handle OBEX Abort packets sent from remote device"

* commit '6874774ab6b2fe5d90896be756d26a9887e4124b':
Handle OBEX Abort packets sent from remote device
9d67ffdac68b49cfc72491f7e2c340df922dbcca 07-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am c50dbb00: Merge "OPP: Notification position is changing"

* commit 'c50dbb0067de1772ced124f5982a59468ad81426':
OPP: Notification position is changing
6874774ab6b2fe5d90896be756d26a9887e4124b 07-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am e7df5087: Merge "Handle OBEX Abort packets sent from remote device"

* commit 'e7df508750728dc2bbd7729d54673bf16f7688c3':
Handle OBEX Abort packets sent from remote device
c96189602abe4cb3ca2ee97fa6fdc383a05930ba 06-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am 29cedf41: am a2407587: Merge "Require bonding and encryption for PBAP server"

* commit '29cedf4183144e450c226dec6668ff0d633cee93':
Require bonding and encryption for PBAP server
29cedf4183144e450c226dec6668ff0d633cee93 06-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> am a2407587: Merge "Require bonding and encryption for PBAP server"

* commit 'a2407587440d487aa0171638eef29526515fde59':
Require bonding and encryption for PBAP server
c50dbb0067de1772ced124f5982a59468ad81426 01-Jun-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "OPP: Notification position is changing"
9abe9c9e1ccad600b1069490293d78dfd984017b 22-Feb-2011 Andreas Areskoug <andreas.areskoug@stericsson.com> Handle OBEX Abort packets sent from remote device

This patch adds support for handling OBEX Abort packets
sent from remote device, where the remote device is acting
as a client, sending files to the server.

Depends-On: I0fc2255c463c5ce1e8fa1d7febf144b60965a1be

Change-Id: I4bce05a9007ba02e9d9987ec3cbbf1db380247f0
Signed-off-by: christian bejram <christian.bejram@stericsson.com>
luetooth/opp/BluetoothOppObexServerSession.java
86d30be8aa68d0a2b561c36b53f4e5ebe586fe72 21-Dec-2010 Staffan Lindvall <staffan.lindvall.x@sonyericsson.com> pullVcard of unknown phone number

When performing a pullVcardListing, pullVcardEntry or pullPhonebook
on a phone with a call list which contains an unknown phone number,
the phone returns "-1" as number/name. Corresponding errors exist
for private and payphone numbers, where the phone returns the name
"-2" and "-3", respectively. During pullVcardListing the Name
attribute may contain the phone number, in case the name is not
known. The latter is already implemented today, however, instead of
using e.g. "-1" as name when the phone number is not known the
phone should use Name = "Unknown". Currently there are no other
matching corresponding strings defined for private and payphone
number, which means that for now "Unknown" may be returned as name
also for these numbers.
During pullVcardEntry and during pullPhonebook when the phone number
is unknown then the Number attribute should contain the string
"Unknown". During the same scenario the FN and N attributes both
should contain the string "" when the name is not known. When it
comes to private and payphone numbers the same as for
pullVcardListing apply here, i.e. "Unknown" may be used in the
Number attribute also for these numbers

Change-Id: I33cf6ceecf5c8fba426eacbb3a507228f8e4de4d
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
74e5eba4a45ecca87eec3ac1762ca527cc614d78 12-Apr-2011 erik.ljungberg <erik.ljungberg@sonyericsson.com> OPP: Notification position is changing

If several transfers is ongoing the Bluetooth transfer notification
is changing position. The reason for this is that the when field is
not set in the notification. Solved by setting when.

Change-Id: If999fae6dd2d6b5de38c3bfeba786ad2df9da48f
luetooth/opp/BluetoothOppNotification.java
a2407587440d487aa0171638eef29526515fde59 26-May-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "Require bonding and encryption for PBAP server"
4672c98499234667141ddd7ffcdd7db6acc45fd3 22-May-2011 Jaikumar Ganesh <jaikumarg@android.com> am b5f6bb1a: am d8a9af40: Merge "BT: Fix for vCard Listing error"

* commit 'b5f6bb1afba8d322d7453cb6a24751599897234a':
BT: Fix for vCard Listing error
b5f6bb1afba8d322d7453cb6a24751599897234a 21-May-2011 Jaikumar Ganesh <jaikumarg@android.com> am d8a9af40: Merge "BT: Fix for vCard Listing error"

* commit 'd8a9af404413ad060eb4aa29a32370b44e61327e':
BT: Fix for vCard Listing error
d8a9af404413ad060eb4aa29a32370b44e61327e 20-May-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "BT: Fix for vCard Listing error"
73adcc0f5b6051ef514a3f16a2e28eabee2b367e 02-May-2011 Conley Owens <cco3@android.com> Merge commit 'a2f16c01' into m

Conflicts:
src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposer.java
src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java

Change-Id: Ib3533b9713373c84636940dbe3e41203898aef46
a2f16c010b59d3bc9ff978b178ded62c1e2b9d8f 30-Apr-2011 Conley Owens <cco3@android.com> am 4da2545c: am f6dace4a: Merge "Bluetooth: Add vCard version support for call history."

* commit '4da2545c8543c7ba4729f63c86a38008309ec870':
Bluetooth: Add vCard version support for call history.
f6dace4a1ed909d9a5f87781a7c4e02cc06fc021 29-Apr-2011 Conley Owens <cco3@android.com> Merge "Bluetooth: Add vCard version support for call history."
174a747944b553c654d149140d034612924d3ece 05-Apr-2011 Par-Gunnar Hjalmdahl <par-gunnar.p.hjalmdahl@stericsson.com> BT: Fix for vCard Listing error

This patch fixes listing of the incomplete vCard xml file, which
contains special characters which are larger than one byte.

Change-Id: Ice5a056004aa30255a06f8742428d4bcfa5813c8
Signed-off-by: christian bejram <christian.bejram@stericsson.com>
luetooth/pbap/BluetoothPbapObexServer.java
91fec75311a589cb56260c1c724217e2987055b2 26-Apr-2011 Jaikumar Ganesh <jaikumarg@android.com> am 2db76af8: am a96efa27: am 16fc087d: Merge "Fixing crash in BluetoothPbapService."

* commit '2db76af8fa625692430dfc1a21910be2eaa92581':
Fixing crash in BluetoothPbapService.
2db76af8fa625692430dfc1a21910be2eaa92581 26-Apr-2011 Jaikumar Ganesh <jaikumarg@android.com> am a96efa27: am 16fc087d: Merge "Fixing crash in BluetoothPbapService."

* commit 'a96efa270cf215602b0ab1f3603c24aadff808da':
Fixing crash in BluetoothPbapService.
7d6a3299b58c5b53de4016a2e199974b94ae90df 26-Apr-2011 Mathias Jeppsson <mathias.jeppsson@sonyericsson.com> Fixing crash in BluetoothPbapService.

If Bluetooth is turned off while there is an PBAP connect request
pending, the status bar notification or yes/no activity will not
disappear. If user selects yes, an intent will start PbapService
again. PbapService will try to make the device trusted. As this
instance of PbapService don't have any connected device, crash will
occur.

Make sure status bar notification or yes/no activity disappears, by
sending timeout intent when Bluetooth is turned off.
Also, PbapReceiver should not forward any intents except STATE_ON
if Bluetooth is off as this will start the PbapService.

Change-Id: Iee4f95ab2de34db6e00ff9b1fd7f8677947b8f4f
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
013de33607d3bcde51074d12ffe4e2c2d734fdcd 14-Apr-2011 Jaikumar Ganesh <jaikumarg@android.com> am 929d38f9: am 3c68bca8: am 138654ff: Merge "The phone did not reject unsupported vCalendar item"

* commit '929d38f9226a00941571804a490e76eb4c6eef10':
The phone did not reject unsupported vCalendar item
929d38f9226a00941571804a490e76eb4c6eef10 14-Apr-2011 Jaikumar Ganesh <jaikumarg@android.com> am 3c68bca8: am 138654ff: Merge "The phone did not reject unsupported vCalendar item"

* commit '3c68bca80f40710b70e3f9173cea167b30a8dcb4':
The phone did not reject unsupported vCalendar item
76d17f9aff4a4aaad0f5af91eee1028473c10b16 06-Dec-2010 Olsson <ola1.olsson@sonyericsson.com> The phone did not reject unsupported vCalendar item

vCalendar is not supported in the phone but it was not
rejected. A blacklist was present in the code but not
used. Hence, this fix enables the blacklist functionality.

Change-Id: I4fefe0e819eb025d37c972cf7e74eabd4f6e6585
luetooth/opp/BluetoothOppObexServerSession.java
fdd53743b3498251e567e5bd842d945247bc22c4 31-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Reflect vCard API change"
4b6529651194554bffbeb36baf9b14b09d610e61 31-Mar-2011 Jaikumar Ganesh <jaikumarg@android.com> am 59199b74: am a4f55f77: am c298d29b: Merge "Add check for null pointer to avoid crash."

* commit '59199b744c6f107afaac8ec9347d1c04ca6b2ab8':
Add check for null pointer to avoid crash.
3c4d2c77c2fffe675fbe89ba58856686b6873d2f 17-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Reflect vCard API change

Remove dependency toward OneEntryHandler in vCard code.

This change doesn't take care of oom for simplicity.

See also Id623814e8f5961aaf9cf9b4dcc92f75ace401148

Bug: 4066223
Change-Id: I3c5a58fef5a404b992a3c17578eeb63518294231
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
59199b744c6f107afaac8ec9347d1c04ca6b2ab8 30-Mar-2011 Jaikumar Ganesh <jaikumarg@android.com> am a4f55f77: am c298d29b: Merge "Add check for null pointer to avoid crash."

* commit 'a4f55f7702bca57c0dbb543ee3e2cb1686e616fc':
Add check for null pointer to avoid crash.
c298d29b081e4240c80750e9431b7189d0b38513 30-Mar-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "Add check for null pointer to avoid crash."
b3c06ce9377661a63bc2fbd182c219fd69453b1d 21-Mar-2011 Mathias Jeppsson <mathias.jeppsson@sonyericsson.com> Require bonding and encryption for PBAP server

The Phonebook Access Profile specification requires bonding and
encryption. For devices not supporting SSP (Secure Simple Pairing),
InsecureRfcomm will require neither. Adding EncryptedRfcomm to force
bonding and encryption but not requiring authenticated link key.

Change-Id: I987ca50ff7f60813b5311cead8d6a30a9123d54b
luetooth/pbap/BluetoothPbapService.java
6b923ee6bf0c80dc4edeabb3694132f3fd40ce03 10-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use old version of vCard composition method

Must be after I91b65f881e1712ecf82c2e119a92bc70c43c623c

Bug: 4066223
Change-Id: Icca2019b10fc84e437efbc2606cd5703b3ea0a5f
luetooth/pbap/BluetoothPbapVcardManager.java
98a53e5bdb2500109c304f2b5364c1715ab745d8 06-Dec-2010 martin ma <martin.ma@sonyericsson.com> Add check for null pointer to avoid crash.

This is added in order to prevent a crash. Also, updating the name
of a device to null, making it appear as 'Unknown', is probably not
intended.

Change-Id: Ibd3c93741489aae9118ba7b45223d58d5de6812f
luetooth/opp/BluetoothOppPreference.java
c5813a6dcf079202d8dce16a37cbadd427804d9c 01-Mar-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "Check if BT is allowed in airplane mode"
72d2f1d8b81087c0a00310ff43e5d060dc8b7867 01-Mar-2011 Jaikumar Ganesh <jaikumarg@android.com> Merge "Handle pullVcardListing req without search value for Number attr."
d6a1c1c4bf3da920582e17c8c6e32c7ef74a555f 08-Jan-2011 Jaikumar Ganesh <jaikumar@google.com> Retry rfcomm socket connections after link key exchange error.

If the devices were paired before, but unpaired on the
remote end, it will return an error (when sending a file)for the auth
request for the socket connection. Link keys will get exchanged
but we need to retry the socket connection. There is no good way to
inform this socket asking it to retry apart from
a delayed retry. The socket is opened at the kernel level
but the link key retrys happen at the Bluez userspace level.

Note: This is a temporary change, once the new mgmt interface comes
up in Bluez, we wouldn't need this.

Change-Id: Ifbd93d7f69b93515dda6c6f4ad2796853f9d5841
luetooth/opp/BluetoothOppTransfer.java
a85ff0a96f7d5f64bf1e9ca99789cb8dc69f6d97 05-Jan-2011 Kevin LeBlanc <kevin.leblanc@sonyericsson.com> Check if BT is allowed in airplane mode

Currenty, the bluetooth sharing activity always quits with an error
message if airplane mode is on. Instead, the activity should check
if bluetooth may be enabled in airplane mode, given the current
system settings.

Change-Id: If9272a941504054d7819e0248f93a8b5bca8d41e
luetooth/opp/BluetoothOppLauncherActivity.java
4bba23a751f042596561eab0e677135d5267bcdf 07-Jan-2011 Staffan Lindvall <staffan.lindvall.x@sonyericsson.com> Handle pullVcardListing req without search value for Number attr.

When sending pullVcardListing request to the phone while using
the search attribute "Number" without any search value, the
phone responds with error code "internal error".

Instead the phone should return all numbers in the phonebook.

Change-Id: I7c11b76bbd61882c62be3533b1c45c2c72f497b2
luetooth/pbap/BluetoothPbapVcardManager.java
1ed96d522298e8f48690a4f4cbf2e0c6b402e3a0 26-Jan-2011 Jake Hamby <jhamby@google.com> Implement "show received files" intent for Settings.

Add a handler for a new intent (sent from the Settings app) to
show all files received via Bluetooth. This is equivalent to the
now deprecated live folder view of received files.

Bug: 3167219
Change-Id: Ibb8d3738d62301af5b012489a69ac078e554b66d
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransferHistory.java
luetooth/opp/Constants.java
afdc7cbd31e835ce4610338b54e0de1337957cc8 07-Jan-2011 Yoshiharu Kurita <yoshiharu.x.kurita@sonyericsson.com> Fix 'New Missed Calls' count in PullvCardListing

When the phone receives a PullvCardListing request about mch
(Missed Call History), PBAP application sends a corresponding
response which contains the number of 'New Missed Calls' in
the header. Currently, the number of 'New Missed Calls' is
included into a response against the other type of
PullvCardListing request after the phone receives mch
PullvCardListing request which contains MaxListCount = 0 and
ListStartOffset = 0 (these parameters mean PCE only wants the
number of index), because any of PullvCardListing requests
are miss-detected as mch in this case. And then the internal
value for 'New Missed Calls' is also updated, so the number
of 'New Missed Calls' becomes incorrect when answering the
next PullvCardListing about mch.

The solution is to fix the miss detection.

Change-Id: Ic09257fc554d8b7af9498d2ff79e017f6e56510c
luetooth/pbap/BluetoothPbapObexServer.java
9522370104410f24602ac98172bfbda27f89780d 07-Jan-2011 Yoshiharu Kurita <yoshiharu.x.kurita@sonyericsson.com> Fix 'New Missed Calls' count in PullvCardListing

When the phone receives a PullvCardListing request about mch
(Missed Call History), PBAP application sends a corresponding
response which contains the number of 'New Missed Calls' in
the header. Currently, the number of 'New Missed Calls' is
included into a response against the other type of
PullvCardListing request after the phone receives mch
PullvCardListing request which contains MaxListCount = 0 and
ListStartOffset = 0 (these parameters mean PCE only wants the
number of index), because any of PullvCardListing requests
are miss-detected as mch in this case. And then the internal
value for 'New Missed Calls' is also updated, so the number
of 'New Missed Calls' becomes incorrect when answering the
next PullvCardListing about mch.

The solution is to fix the miss detection.

Change-Id: Ic09257fc554d8b7af9498d2ff79e017f6e56510c
luetooth/pbap/BluetoothPbapObexServer.java
0995f126a9835d63a87d4c2c985a43004978c94d 07-Jan-2011 Staffan Lindvall <staffan.lindvall.x@sonyericsson.com> Handle pullVcardListing req without search value for Number attr.

When sending pullVcardListing request to the phone while using
the search attribute "Number" without any search value, the
phone responds with error code "internal error".

Instead the phone should return all numbers in the phonebook.

Change-Id: I7c11b76bbd61882c62be3533b1c45c2c72f497b2
luetooth/pbap/BluetoothPbapVcardManager.java
c83ffa5289995a4071b5d84055da07e2c72de2d9 05-Jan-2011 Kevin LeBlanc <kevin.leblanc@sonyericsson.com> Check if BT is allowed in airplane mode

Currenty, the bluetooth sharing activity always quits with an error
message if airplane mode is on. Instead, the activity should check
if bluetooth may be enabled in airplane mode, given the current
system settings.

Change-Id: If9272a941504054d7819e0248f93a8b5bca8d41e
luetooth/opp/BluetoothOppLauncherActivity.java
091ff0151b6b3094ba712e63529d3caaf0f42090 28-Dec-2010 Jean-Baptiste Queru <jbq@google.com> am 3500d1cc: Merge "BT - Not possible to accept incoming obex transfers using key-presses."

* commit '3500d1cc714807945b1427e43eb3bde367849e43':
BT - Not possible to accept incoming obex transfers using key-presses.
3500d1cc714807945b1427e43eb3bde367849e43 28-Dec-2010 Jean-Baptiste Queru <jbq@google.com> Merge "BT - Not possible to accept incoming obex transfers using key-presses."
227e60370e1c070315a43044bfdb77e1efb1393b 28-Dec-2010 Jean-Baptiste Queru <jbq@google.com> am cbb50b68: Merge "Incorrect response code after pull of invalid vCard handle."

* commit 'cbb50b684e181f78d3ca5b304e97f9c5a67809b6':
Incorrect response code after pull of invalid vCard handle.
f0e1bc31822d23c1c8bccf1ab17907a1d803a62d 28-Dec-2010 Jean-Baptiste Queru <jbq@google.com> am 89186622: Merge "Sanitise Bluetooth file name hint when receiving a contact"

* commit '89186622fa240083a46336a9e5e4ade52c5698d9':
Sanitise Bluetooth file name hint when receiving a contact
cbb50b684e181f78d3ca5b304e97f9c5a67809b6 28-Dec-2010 Jean-Baptiste Queru <jbq@google.com> Merge "Incorrect response code after pull of invalid vCard handle."
6f02f510e5dc3fb994516128f2de1d78bc7f9b1e 07-Dec-2010 Staffan Lindvall <staffan.lindvall.x@sonyericsson.com> Incorrect response code after pull of invalid vCard handle.

When calling pullVcardEntry with an invalid / non-existing
vCard handle the response code is always "OK".

Instead the phone should respond "NOT FOUND" according
to Bluetooth PBAP specification.

The problem exists both for phonebook and call logs.

Change-Id: I339b1fe0cdb7fa9b6c6b425f1b1686c24cab9626
luetooth/pbap/BluetoothPbapObexServer.java
5e9a02df66c6044bd4a06b9d53e6cdbd8ad22606 28-Sep-2010 Edward Savage-Jones <edward.savage-jones@sonyericsson.com> Sanitise Bluetooth file name hint when receiving a contact

If a contact name is entered with any of the following characters

:"<>*?|\n\t

the transfer of that contact fails. This is due to the underlying
filesystem (FAT) not being able to handle these characters in a
file name. This fix corrects that situation by replacing any
whitespace characters with a space and illegal FAT filesystem
characters with underscore.

Change-Id: I5021bd26a16c31810a61bac3f70439c1153451c2
luetooth/opp/BluetoothOppReceiveFileInfo.java
9935a310a4f36c9f835c5c3aa2f604ddc36cabb1 21-Dec-2010 Xiaodong Xu <xiaodong.xu@sonyericsson.com> Bluetooth: Add vCard version support for call history.

Under current implementation, PSE only deliver call history
under format VCard2.1 to PCE, this is not correct according to
PBAP specification, which says "The PSE shall support both
vCard2.1 and vCard3.0 versions and deliver the Entries to the
PCE under the format version that is requested by the PCE."
This fix is to make implementation following such PBAP
specificaiton.

Change-Id: Id0146d0887bad3bd066109ecd3be674b3106bced
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
0b13debc0aaca69bbef781da47a2ca5c0e6d9af7 08-Dec-2010 Jean-Baptiste Queru <jbq@google.com> am e7f887da: resolved conflicts for merge of 55936599 to stage-korg-master

* commit 'e7f887dab2591a46ecf80616e00f33bb5d847935':
code cleanup. unused imports, local variabls and static constans removed from com.android.bluetooth.opp package.
e7f887dab2591a46ecf80616e00f33bb5d847935 07-Dec-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 55936599 to stage-korg-master

Change-Id: I5f04a3ae2f0246853f16b0fdb209e67df95e6ca8
e1fd97242bcac3c546c35a2576df3fafee04d25a 07-Dec-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 22e1e357 to master

Change-Id: I96ff536c0d1c000a6b6d5b0b2ea5a3849b21985e
22e1e357b6053b572820b54ed8f2b8fe3c1eb0f8 07-Dec-2010 Jean-Baptiste Queru <jbq@google.com> am 16d171b1: Merge "code cleanup. some unused import statement, local variabls, private members and static constants removed form classes in com.android.bluetooth/pbap package."

* commit '16d171b1ba7bd2b74c15b9f4d0289de84117cbb5':
code cleanup. some unused import statement, local variabls, private members and static constants removed form classes in com.android.bluetooth/pbap package.
a930b6831d0c70b6c5d34e548e6b1dceaa6529a0 01-Nov-2010 Mohammad Shamsi <m.h.shams@gmail.com> code cleanup.
unused imports, local variabls and static constans removed from
com.android.bluetooth.opp package.

Change-Id: I0fd682a190221e216fac71723c05d3828b9fa42d
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppTransferHistory.java
luetooth/opp/TestActivity.java
cff3303d1878037f35c9feb58e0c747aef403d4d 01-Nov-2010 Mohammad Shamsi <m.h.shams@gmail.com> code cleanup.
some unused import statement, local variabls, private members and static constants removed form
classes in com.android.bluetooth/pbap package.

Change-Id: I95d7d403ab78afa6f9ada82cfb357056a6bf61d0
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
84ec2fa756c3e918b6083726271128096de57ffb 23-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> Send CONNECTION_STATE_CHANGE intent.

Change-Id: Ibbf53b1f96d92c9d0c6acbfc491e93046136e95d
luetooth/pbap/BluetoothPbapService.java
affbd828459349396e000624a90a4ea800a7108b 14-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> am 5eadab02: am 4492b2c6: Fix OPP crash and Call Log sort order.

Merge commit '5eadab02ea3202f417434a13a7637379fffc43de'

* commit '5eadab02ea3202f417434a13a7637379fffc43de':
Fix OPP crash and Call Log sort order.
4492b2c66cf3b26fd988f3b7f1f5df6cc9ed49f2 12-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> Fix OPP crash and Call Log sort order.

Bug: 3067780 3067770
Dr No: jerry

Change-Id: I2ac39e2f1f0233a6ada84af39d8addfe0fe04cea
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/pbap/BluetoothPbapVcardManager.java
99c41899699fef2cea41cb227003eeda851f93ad 11-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> am c47e9733: am 3f475149: Merge "Make "search by number" function work" into gingerbread

Merge commit 'c47e9733b12c81b24ec32f0707f2cd5288aaf6b0'

* commit 'c47e9733b12c81b24ec32f0707f2cd5288aaf6b0':
Make "search by number" function work
8fb1d457e213dfa7b4f2f7057a7d7340a1db972c 07-Oct-2010 Nick Pelly <npelly@google.com> am a6a28724: am 82d9bdb1: Merge "Don\'t enforce Authenticated Link key (MITM protection) on PBAP." into gingerbread

Merge commit 'a6a28724002f61ad69d240192e3886be11a61693'

* commit 'a6a28724002f61ad69d240192e3886be11a61693':
Don't enforce Authenticated Link key (MITM protection) on PBAP.
0dcd2262d853c2011e11617a8efba6758370c41f 05-Oct-2010 Liejun Tao <L.J.Tao@motorola.com> Make "search by number" function work

Previous "search by number" is wrong. Re-implement it to make it work.
Add flexible to handle searchValue as both null-terminated and not
null-terminated.

Change-Id: Ie50f8d29dfcbae868c43d482467b09b08ed2be0f
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
4fbc7412b96934831ce29a7af54b170056f8c2de 04-Oct-2010 Jaikumar Ganesh <jaikumar@google.com> Don't enforce Authenticated Link key (MITM protection) on PBAP.

Gory Details:
SecureRfcomm API => authentication is true and encyrption is true. (HIGH)
InSecureRfcomm API => authentication is false and encryption is true. (MEDIUM)
The authentication above refers to the authentication of the link
key i.e prevention of MITM attacks.
Bluetooth 2.0 legacy pairing doesn't provide MITM protection.

Bluetooth 2.1 -> If pairing is done with MITM protection already,
this doesn't matter. If pairing is NOT done with MITM protection
we have the same security as the other core profiles. It dones't make
sense to enfore MITM for this profile while having Handsfree profile
to not have MITM i.e some attacker can listen in on conversations.

Why are we changing this now: More headsets with 2.1 and No Input/Output
have started to support PBAP. So we pair without MITM with them and then
when the PBAP request comes it fails because we need MITM protection and
we try to exchange keys (i.e pair again)
The headset don't allow pairing to happen at any time because its a security
issue and hence PBAP request fails.

Change-Id: Ia80c15c545e9396e7c6882b731c90a8ede119827
luetooth/pbap/BluetoothPbapService.java
4ce32fccf381a3b448f0d5ff56665201c0e0e6d3 16-Jun-2010 Ola Johnsson <ola.johnsson@sonyericsson.com> PullvCardList implemented according to specification

The value tag sent as a byte array was not parsed correctly
leading to illegal strings. The list count value was not used
according to the specification, now refers to number of entries
that should be returned. Specification for Phone book access
profile chapter 5.3 default max list size of OxFFFF (65535)
taken from 5.3.4.4. Now uses default values when Application
Parameter headers are missing.

Change-Id: Ib17f2208a91b4f896d9beebaf3a21566502ac291
luetooth/pbap/BluetoothPbapObexServer.java
7a93f67e130cd9d0972d4f1346c8bcf3250e687e 29-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> am 8b08754f: am 5f78d4ef: Merge "Update BT folder icon." into gingerbread

Merge commit '8b08754fe9d87d6f6f3b19b81330622889ac8264'

* commit '8b08754fe9d87d6f6f3b19b81330622889ac8264':
Update BT folder icon.
8b08754fe9d87d6f6f3b19b81330622889ac8264 29-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> am 5f78d4ef: Merge "Update BT folder icon." into gingerbread

Merge commit '5f78d4ef75710e3dbf608644b16da7c6f88d00ed' into gingerbread-plus-aosp

* commit '5f78d4ef75710e3dbf608644b16da7c6f88d00ed':
Update BT folder icon.
5f78d4ef75710e3dbf608644b16da7c6f88d00ed 29-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Update BT folder icon." into gingerbread
5b09b7148807c3f864da0a671141f2a2379445b2 29-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> Update BT folder icon.

Change-Id: I1aecca20d4a9aaaf8e4aad37eb5c2e2357fad6ad
luetooth/opp/BluetoothOppLiveFolder.java
3fba9e8d40649b06fe1f4f7d99f4655e9e2500fe 28-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am c24d5e25: am 0a79bdbb: Trim the Bluetooth database off the main thread.

Merge commit 'c24d5e2584346d02fe6a6cabae2ada4cf3e04ee1'

* commit 'c24d5e2584346d02fe6a6cabae2ada4cf3e04ee1':
Trim the Bluetooth database off the main thread.
c24d5e2584346d02fe6a6cabae2ada4cf3e04ee1 28-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am 0a79bdbb: Trim the Bluetooth database off the main thread.

Merge commit '0a79bdbbfa3b79b808cbbe7490731e5aae4489e9' into gingerbread-plus-aosp

* commit '0a79bdbbfa3b79b808cbbe7490731e5aae4489e9':
Trim the Bluetooth database off the main thread.
0a79bdbbfa3b79b808cbbe7490731e5aae4489e9 28-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Trim the Bluetooth database off the main thread.

This looks to be most if not all of the remaining StrictMode
violations in this process. Not a huge deal, but cleaning up noise
will make bigger problems stand out easier in the future.

Change-Id: I262194c12114114fbe059d73475afb1bbb5654ab
luetooth/opp/BluetoothOppService.java
453050fdaf7dcd488f399d3549ce257e7b9e7e79 17-May-2010 Wojciech Jowsa <wojciech.jowsa@stericsson.com> BT - Not possible to accept incoming obex transfers using key-presses.

It is not possible to accept/reject an incoming obex file transfer
using key-press. Only touch screen press was working.

With this fix, key press down is not ignored and it is possible
to accept/reject an incoming obex file transfer with key-press.

ST-Ericsson Change ID: ER260817
Change-Id: Ic7f668bd1b0efa549d0218edc8719efee1984941

Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
6dfc94e0b2a57f95432dd2dd4e505f7d80f6b594 22-Sep-2010 a5206c <a5206c@motorola.com> am 541939ff: am 77b122f5: For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT

Merge commit '541939ff48867b2a8656503d29f29eb6bf6f1a30'

* commit '541939ff48867b2a8656503d29f29eb6bf6f1a30':
For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT
541939ff48867b2a8656503d29f29eb6bf6f1a30 22-Sep-2010 a5206c <a5206c@motorola.com> am 77b122f5: For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT

Merge commit '77b122f551ae37811c75ae76fa2029f7b3f2f404' into gingerbread-plus-aosp

* commit '77b122f551ae37811c75ae76fa2029f7b3f2f404':
For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT
77b122f551ae37811c75ae76fa2029f7b3f2f404 22-Sep-2010 a5206c <a5206c@motorola.com> For PBAP, Limit the number of call log to CALLLOG_NUM_LIMIT
luetooth/pbap/BluetoothPbapObexServer.java
f3d6b25c0ea3b2bcd01ab457967c7b40ccd20b5b 13-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Let BT use FLAG_REFRAIN_IMAGE_EXPORT.

Bug: 2603200
Change-Id: I385e831b8c5684cc75c249ee6d41d5256a29f3c5
luetooth/pbap/BluetoothPbapVcardManager.java
0fd720422f69837c3c121c2debeac71794d27e30 03-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am d4693ca9: am 55470710: Replace use of SharedPreference commit() with apply().

Merge commit 'd4693ca99284a12703a0de9fd6c70f50262073e0'

* commit 'd4693ca99284a12703a0de9fd6c70f50262073e0':
Replace use of SharedPreference commit() with apply().
d4693ca99284a12703a0de9fd6c70f50262073e0 03-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am 55470710: Replace use of SharedPreference commit() with apply().

Merge commit '55470710c2624bde2aa56275d29b60055638c06c' into gingerbread-plus-aosp

* commit '55470710c2624bde2aa56275d29b60055638c06c':
Replace use of SharedPreference commit() with apply().
55470710c2624bde2aa56275d29b60055638c06c 03-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Replace use of SharedPreference commit() with apply().

Also fix a typo and replace a bunch of redundant
SharedPreference.Editor commits with one at the end.

Change-Id: I75623cb6809a363d05421f80f1560d586ae1ab80
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppPreference.java
6a962312358451fbb3c77ff7f6048388178f5677 02-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> am 0ddb8aab: Modify variables used in vCard code.

Merge commit '0ddb8aabe0f62d7741ee0aa040e43643b823c441' into gingerbread-plus-aosp

* commit '0ddb8aabe0f62d7741ee0aa040e43643b823c441':
Modify variables used in vCard code.
0ddb8aabe0f62d7741ee0aa040e43643b823c441 02-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Modify variables used in vCard code.

See also Icf265ce7f83c1e2bd5db0c3d9bd4c142afd6db34

Change-Id: I3a94e86d0788a395ac0744bdf6e31c8e64fb0c15
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
addc5ca6de80b9956faf7b3fff9815a4ccde8e93 30-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> am 44fbf5a3: am 8e658ce5: Merge "Send vCard with Unicode encoded Strings over BT" into gingerbread

Merge commit '44fbf5a3537d1d701eedbd85e7115c36ef851c58'

* commit '44fbf5a3537d1d701eedbd85e7115c36ef851c58':
Send vCard with Unicode encoded Strings over BT
44fbf5a3537d1d701eedbd85e7115c36ef851c58 30-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> am 8e658ce5: Merge "Send vCard with Unicode encoded Strings over BT" into gingerbread

Merge commit '8e658ce507d2525616ca27aa7135032eee9a5e75' into gingerbread-plus-aosp

* commit '8e658ce507d2525616ca27aa7135032eee9a5e75':
Send vCard with Unicode encoded Strings over BT
8e658ce507d2525616ca27aa7135032eee9a5e75 30-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Send vCard with Unicode encoded Strings over BT" into gingerbread
f890b9395afee07aef2ae93e1213819919bc5e9f 27-Aug-2010 Edward Savage-Jones <edward.savage-jones@sonyericsson.com> Send vCard with Unicode encoded Strings over BT

The standard Android code doesn't correctly handle creation of byte
packets when sending vCard data. The length of a String is used to
specify the number of bytes being sent, which works if all
characters are ASCII (1 byte per char), but if Unicode characters
exist within the string, then bytes vs String length differ which
causes a truncation of the vCard during Bluetooth send.

Change-Id: Ic39dd53a38f1f353523c625940b0317b00e86d4f
luetooth/pbap/BluetoothPbapVcardManager.java
b8c5dba8b3e9a46873b8568d5cbead6d7390f96b 27-Aug-2010 Edward Savage-Jones <edward.savage-jones@sonyericsson.com> Send vCard with Unicode encoded Strings over BT

The standard Android code doesn't correctly handle creation of byte
packets when sending vCard data. The length of a String is used to
specify the number of bytes being sent, which works if all
characters are ASCII (1 byte per char), but if Unicode characters
exist within the string, then bytes vs String length differ which
causes a truncation of the vCard during Bluetooth send.

Change-Id: Ic39dd53a38f1f353523c625940b0317b00e86d4f
luetooth/pbap/BluetoothPbapVcardManager.java
accd7a537cabd7d0a8f83471a4f635a2b44f9c00 11-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> am d5b94fe6: am ff2927dc: Merge "Optimize Opp Notification" into gingerbread

Merge commit 'd5b94fe6cd8144b9c6f0d6de35080f8ca49c601d'

* commit 'd5b94fe6cd8144b9c6f0d6de35080f8ca49c601d':
Optimize Opp Notification
d5b94fe6cd8144b9c6f0d6de35080f8ca49c601d 11-Aug-2010 Jaikumar Ganesh <jaikumar@google.com> am ff2927dc: Merge "Optimize Opp Notification" into gingerbread

Merge commit 'ff2927dcdff66114e56b0636d6b29ac71f62508b' into gingerbread-plus-aosp

* commit 'ff2927dcdff66114e56b0636d6b29ac71f62508b':
Optimize Opp Notification
eb77c4b1d9aa71d7dd8dd934e9d1971583f9c0e2 03-Aug-2010 Liejun Tao <L.J.Tao@motorola.com> Optimize Opp Notification

Current Opp notification is running too frequently. When file transfer
speed is fast, it could update notification 7-8 times in 1 second.
Use a timer to limit the notification to once per second.

Change-Id: I162033d9e12148260515c8ed318928e4de9a4392
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransferHistory.java
b6885cba0539ea82025862394e0dac010a5a8f33 16-Jul-2010 The Android Open Source Project <initial-contribution@android.com> am 587ef795: merge from open-source master

Merge commit '587ef79589b5b453e71f8472baea583390579e20'

* commit '587ef79589b5b453e71f8472baea583390579e20':
PullvCardList implemented according to specification
587ef79589b5b453e71f8472baea583390579e20 16-Jul-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Id325ee50130e50b8080fd3a1e51a4fda8371e4c8
12f500b84c1a635d0ed951c8c586f81b55fb9f6b 16-Jun-2010 Ola Johnsson <ola.johnsson@sonyericsson.com> PullvCardList implemented according to specification

The value tag sent as a byte array was not parsed correctly
leading to illegal strings. The list count value was not used
according to the specification, now refers to number of entries
that should be returned. Specification for Phone book access
profile chapter 5.3 default max list size of OxFFFF (65535)
taken from 5.3.4.4. Now uses default values when Application
Parameter headers are missing.

Change-Id: Ib17f2208a91b4f896d9beebaf3a21566502ac291
luetooth/pbap/BluetoothPbapObexServer.java
0d17dc3f5be65452b7998125e22537868bdfa9ed 08-Jun-2010 Jaikumar Ganesh <jaikumar@google.com> am 69b2c318: Merge "Set number as "Unknown" for private numbers." into kraken
00aee7a70e3c76b6c9ef59133d59fcdc592fea99 07-Jun-2010 Jaikumar Ganesh <jaikumar@google.com> Set number as "Unknown" for private numbers.

Change-Id: I54bb9595913c90e72eef659627d95bb63398e84a
luetooth/pbap/BluetoothPbapCallLogComposer.java
920ed171213a79b0d9877f4f7ce3a9046bed58a6 28-May-2010 David Yue <a5206c@motorola.com> am 0c21a35d: correct PBAP call log parameters
0c21a35d6d56dd42c97a80e3233df578d0a1cb21 27-May-2010 David Yue <a5206c@motorola.com> correct PBAP call log parameters
luetooth/pbap/BluetoothPbapCallLogComposer.java
12cb33f6d9fd269944a5618661e3880beea58b6e 17-May-2010 Daisuke Miyakawa <dmiyakawa@google.com> Use a static version of vCard library.

See also I435e1057.

Bug: 2689523
Change-Id: I6aaa893d13ad2ff66f1439731ef7dbcf079b5011
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
f7df7a88230c525e2973ca5603f54a77fe47445d 13-May-2010 Jaikumar Ganesh <jaikumar@google.com> Use FLAG_REFRAIN_PHONE_NUMBER_FORMATTING to prevent discard
of "+", "p", "w" etc in phone numbers.

Change-Id: I20aa8d697925ac68dbfd9dc997dcf66fc0d7f5d8
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
ff55fbfa8cf30fe8a72e1a68420cd744ce957828 15-Apr-2010 Daisuke Miyakawa <dmiyakawa@google.com> Use FLAG_REFRAIN_PHONE_NUMBER_FORMATTING to prevent discard
of "+", "p", "w" etc in phone numbers.

Change-Id: Ic69d60e5831e59a497c523aa62c753922edf06f6
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
a988a391b2093fd2f9a50bde63177fe8a416da96 12-May-2010 David Yue <a5206c@motorola.com> am 00cd32b6: am b7533e86: Add missing moveToNext() calling.
00cd32b6c83164f942149613c03e41d7cd61a9fb 12-May-2010 David Yue <a5206c@motorola.com> am b7533e86: Add missing moveToNext() calling.

Merge commit 'b7533e86bb84a2f95c2cff62c1565a8e1696d1ea' into kraken

* commit 'b7533e86bb84a2f95c2cff62c1565a8e1696d1ea':
Add missing moveToNext() calling.
b7533e86bb84a2f95c2cff62c1565a8e1696d1ea 11-May-2010 David Yue <a5206c@motorola.com> Add missing moveToNext() calling.

Bug: 2674275
Change-Id: Ib5f5d2ebe3ff6ab02e43df38097a89541e132b55
luetooth/pbap/BluetoothPbapCallLogComposer.java
b754e49db1753161dab1fe32e417101bcfabc9aa 05-May-2010 Lixin Yue <L.X.YUE@motorola.com> am 1d222264: Fix the %1 bug in UI when sdcard full
1d2222642c372e5635a906b6d6620ac35a304cf9 16-Apr-2010 Lixin Yue <L.X.YUE@motorola.com> Fix the %1 bug in UI when sdcard full
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppTransferAdapter.java
luetooth/opp/BluetoothOppUtility.java
0894f16289755e5d3e81e0d8c1c8097179aeb7f7 20-Apr-2010 Daisuke Miyakawa <dmiyakawa@google.com> Remove wrong merge.

Change-Id: I94ff5633226d37fcc2df39fdcb7ad313a523d435
luetooth/pbap/BluetoothPbapVcardManager.java
a7b31bac7cbea0382a14d7dcd22a01c3af370b54 20-Apr-2010 Daisuke Miyakawa <dmiyakawa@google.com> am 96ae98f9: Make BluetoothPbapCallLogComposer use FLAG_REFRAIN_IMAGE_EXPORT.
96ae98f996c5809bb34156b85bfc9e3d01008246 20-Apr-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make BluetoothPbapCallLogComposer use FLAG_REFRAIN_IMAGE_EXPORT.

Bug: 2603200
Change-Id: Ie6a40c12fafac5927b616f31a8335df0181f9e18
luetooth/pbap/BluetoothPbapVcardManager.java
e05d3a710c592db386b55a265a1e657b0467e49f 16-Apr-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make BT new structure.

Change-Id: If1400731a1ba9a91d493ca96f2cc0364ef9b5b18
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
ec6f2d44491bf1e3ffa7c75875985f9c16cf721d 26-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Clear notifications when the user presses clear from the notifications bar.

Bug: 2542260
Change-Id: I00f9d8216d70543b93cfbcdb2cd8da8331044d77
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/Constants.java
0bd5f7b5c36a60687ffe895368fd8df6df38acab 24-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Fix pbap and opp running bluetooth in phone process problems.

1. Use the right context instead of application context.
2. Make PbapActivity run in the same process as PbapService as they
share state.

Change-Id: Ib50c63c271dd8b30108f22734c47ee8645cd4839
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppPreference.java
luetooth/pbap/BluetoothPbapService.java
20b5a93b6e18cd441065edfdf676ad612affc507 18-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Fix Typo.

Change-Id: Ia71a5b3bb970463132b2c25b90cf3897fc227fb9
luetooth/pbap/BluetoothPbapObexServer.java
7b0dbafb310175a465c8d06c44b748c1344d1d86 18-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Add ABORT request handling to PBAP"
2cd80b69baa6c96f1ab759fb45cd98e2cbc5f845 18-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Enhanced support to OPP content share"
151f41949621e082e127fe468bedd28289bc3a19 12-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Enhanced support to OPP content share

Add support to Browser link share via BT;
Add support to share files via BT in 3rd party file manager;

Change-Id: I9a93eb0891d0f670109afd44ab4064f7f15b01f3
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppSendFileInfo.java
60c43926b63509fa0607fc671e6fd91106d4a827 17-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Update notification in Transfer history manually when BT if off"
75fc857d22de0ec22e082bddb720d8465c9e3552 12-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> optimize deleting operation in trimDatabase()
luetooth/opp/BluetoothOppService.java
0b1b0069658326e8c12dc0f887e4319c5227feb5 16-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Add ABORT request handling to PBAP
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
de773e60fed15a4ad13325089a5609c9bc6ede59 15-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Update notification in Transfer history manually when BT if off
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppTransferHistory.java
df25af65a20d30b18b4715d47ca6c0b2557116ad 10-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Trim Opp database when service restarts."
389f6dd45f7a45b12af847a510086125777e1198 03-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Trim Opp database when service restarts.

When Opp service restart, we will trim the database.
a) No visible case is deleted.
b) Invisible complete outbound (failed and successful) are deleted.
c) Invisible complete failed inbound are deleted.
d) Invisible complete success inbound are deleted if needed to keep records max
to 1000.

Live folder only has received files, so the above makes sense.

Change-Id: If27080721d9abed025162ff805f661fde01564d3
luetooth/opp/BluetoothOppService.java
luetooth/opp/Constants.java
20844c451b1a82d683b3dd6169b00b03373f6531 10-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Merge "Not update TransferActivity button during activity creating."
0e927e914b80baf2d37439f8b99134cfe274a1d5 08-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Not update TransferActivity button during activity creating.

This is to fix below issue: when an ongoing transfer is almost to complete,
click the ongoing notification to launch TransferActivity, there will be
possible crash due to NullPointerException.
Root casue is: when TransferActivity onCreate() is called, the transfer is
still ongoing, so mIsComplete is false; but when onCreate() call to
updateProgressbar(), the transfer may change to complete, and then updateButton()
will be called; In updateButton(), mAlert (which will be initialized in father
class AlertActivity) still not intialized, which caused NullPointerException.

Change-Id: Ibfe363f3822386a38b9b108e29f60ad6673f70f6
luetooth/opp/BluetoothOppTransferActivity.java
509a6cd43906cce5f9bc78a83bd2058a4e5249e7 05-Mar-2010 Lixin Yue <L.X.YUE@motorola.com> Remove the number above status icon for Opp transfers
luetooth/opp/BluetoothOppNotification.java
f6c72e8d6ec3d3eae78ef4850cfda7364d44a9bf 04-Mar-2010 Michael Chan <mchan@android.com> Merge "Add opp Transfer history to avoid cluster of notificatoins To reduce the cluster of Opp nofications, we introduce the concept of Opp transfer history. Only 2 notifications exist for finished opp transfers, one is for outbound transfers, and another is for inbound transfers. User can see all detailed items in corresponding screen when click the notification."
5cc617943765df27844e459362c4bc1821305216 26-Feb-2010 Lixin Yue <L.X.YUE@motorola.com> Add opp Transfer history to avoid cluster of notificatoins To reduce the cluster of Opp nofications, we introduce the concept of Opp transfer history. Only 2 notifications exist for finished opp transfers, one is for outbound transfers, and another is for inbound transfers. User can see all detailed items in corresponding screen when click the notification.

Change-Id: Iffed353ea6b0d7c958c71fe8d3996937058ced30
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransferAdapter.java
luetooth/opp/BluetoothOppTransferHistory.java
luetooth/opp/Constants.java
fcce2453c8d9370d515f655b2706d5e00b9da139 04-Mar-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add missing addHandler().

Bug: 2485875
luetooth/pbap/BluetoothPbapVcardManager.java
198e5d109571b27b7c45c30ed3ea42febcb99201 23-Feb-2010 Daisuke Miyakawa <dmiyakawa@google.com> Move Pbap logic to Bluetooth package so that we do not have unnecessary tight coupling.
luetooth/pbap/BluetoothPbapCallLogComposer.java
luetooth/pbap/BluetoothPbapVcardManager.java
c6f1bacf1d4c39d7efd5dc98004d936c18ed51f1 23-Dec-2009 Lixin Yue <L.X.YUE@motorola.com> Move insert share info operation to a thread to avoid Receiver timeout

In OppReceiver, the function mOppManager.startTransfer(remoteDevice), which
is used to insert share records to DB, can be really a time-consuming
operation in case of 300 or more objects sharing case.
For onReceive() function in BroadcastReceiver, there are below specification:
The function is normally called within the main thread of its process, so you should never
perform long-running operations in it (there is a timeout of 10 seconds that the system allows
before considering the receiver to be blocked and a candidate to be killed)

Add handle to concurrent sending case
In Gellary, user can multiple select files (say 50files), and share via bluetooth to device1,
and then right away share via bluetooth to device2, and also can share to device3. In such
extream case, we need ensure all share info are saved to db.

Complete the TODO in OppManager
Store application data to SharedPreferences and restore them when service restart.
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppReceiver.java
1f0fc26568c1babf0c66d2c75812b72e894eb0de 16-Dec-2009 Lixin Yue <L.X.YUE@motorola.com> Fix non-existing received file still appearing in live folder issue

After receiving a file by OPP from Bluetooth remote device, user can delete
this file from Gallery or 3rd party application. In Opp live folder, user
could still open this file, but with dialog "file not exist" displayed, and
there is no way to make this file disappear from liver folder.
Current solution is to delete the BT OPP DB record after openning an invalid
uri associated with the file in folder, as an easy method without syncing.
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
a4508589f298c67fda54c344760ae39f0f375c11 10-Dec-2009 Lixin Yue <L.X.YUE@motorola.com> Update the error codes to be compatible with PBAP spec.

Catch IndexOutOfBoundsException and NullPointerException in Opp sendFile().
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/pbap/BluetoothPbapObexServer.java
6ef730f85e90a8246d06c7a58bb21eee5074945c 17-Dec-2009 Lixin Yue <L.X.YUE@motorola.com> Enable vcard share in OPP

Bluetooth OPP to handle x-vcard MIME type from contacts share
Handle vcard size by content type instead of tightening with contacts
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/Constants.java
6414394c20cd885f5bd4561e06bbecac9c93cfb1 02-Dec-2009 Lixin Yue <L.X.YUE@motorola.com> am 6ee2d0e0: Fix Opp notifications timestamp not correct issue

Merge commit '6ee2d0e0405a074cf827e0c0ac4bfbffd1850cea' into eclair-mr2

* commit '6ee2d0e0405a074cf827e0c0ac4bfbffd1850cea':
Fix Opp notifications timestamp not correct issue
019188fd686dbe7a9610255ea8aa61bd589a6bd1 30-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ifb8562d3 into eclair-mr2

* changes:
Add a few specific file type support
6ee2d0e0405a074cf827e0c0ac4bfbffd1850cea 02-Nov-2009 Lixin Yue <L.X.YUE@motorola.com> Fix Opp notifications timestamp not correct issue

Should set the value of Notification.when before calling
setLatestEventInfo()

Dr No:Eastham
Bug: 2292381
luetooth/opp/BluetoothOppNotification.java
fb8562d35d3b7d2fc60e1bb01a9c15cfe9824a94 18-Nov-2009 Tao Liejun <a19884@motorola.com> Add a few specific file type support

Support to receive and send a few specific file types
.xls, .zip, .doc, .ppt, .pdf
luetooth/opp/Constants.java
975bc7ee50d8d5b596b1801f2c60057de122d2b0 26-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> am 03f598ba: Catch all exceptions while trying to send a file.

Merge commit '03f598bafa0fc0cbde0c5ab8fed89e07a67d482e' into eclair-mr2

* commit '03f598bafa0fc0cbde0c5ab8fed89e07a67d482e':
Catch all exceptions while trying to send a file.
03f598bafa0fc0cbde0c5ab8fed89e07a67d482e 25-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> Catch all exceptions while trying to send a file.

While trying to share pictures, some applications might
not have given the adequate permissions.

DrNo:Jsh
Bug:2284822
luetooth/opp/BluetoothOppService.java
5dc084a9ecbe35da9ac506ea4385e58d68e08aa5 13-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> am 39a9c98e: Merge change I8b791d4f into eclair

Merge commit '39a9c98edca4633348d91027b3481ee43d4aa588' into eclair-mr2

* commit '39a9c98edca4633348d91027b3481ee43d4aa588':
Don't send default phone number for 0.vcf card.
8b791d4f581f31acf69f1297952c24aa39f01855 13-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> Don't send default phone number for 0.vcf card.

This prevents an entry "My name" with "000000" in the car kit contacts.
We now send only the name and the version in the vcf.
Ideally, we could like to send an empty vcard, but we would need to test
with various car kits with that works well.

Original Change by: Lixin Yue
Bug: 2247067
Dr No: Eastham
luetooth/pbap/BluetoothPbapService.java
5ce62e929e6ce169be5c32c173efc44f76684e2d 06-Nov-2009 Lixin Yue <L.X.YUE@motorola.com> am cd5ed0c7: PBAP only transfer contacts that are visible in contacts application.

Merge commit 'cd5ed0c7d04119e508fbddfd9656ef8559e3e524' into eclair-mr2

* commit 'cd5ed0c7d04119e508fbddfd9656ef8559e3e524':
PBAP only transfer contacts that are visible in contacts application.
cd5ed0c7d04119e508fbddfd9656ef8559e3e524 05-Nov-2009 Lixin Yue <L.X.YUE@motorola.com> PBAP only transfer contacts that are visible in contacts application.

This is to address below issue:
There have been reports by users where they are seeing contacts in the
carkit that are not present in the Contacts App UI but are present in the
database.

Bug: 2245178
Dr No: Eastham
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
ae7f70563660d02d56365092fa27f195b54d5d15 05-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> am 2b36e173: Fix get contact size not correct issue.

Merge commit '2b36e1731eb5ed784abc1a374eb69d8523123df1' into eclair-mr2

* commit '2b36e1731eb5ed784abc1a374eb69d8523123df1':
Fix get contact size not correct issue.
2b36e1731eb5ed784abc1a374eb69d8523123df1 30-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Fix get contact size not correct issue.

Call history handles should be ordered by "date DESC" per spec. The first
handle 1.vcf should be the most recently happend call.

Add order support for pullVcardListing reqeust:
One typical use case for PBAP is: first use pullVcardListing request to
display the contacts list, then use pullVcardEntry request to tirgger
the selected contact vcard. In such case, we need keep the contact db
query consistent for pullVcardListing and pullVcardEntry.

Use "Own number" for phone owner number instead of "Unknown name" in case
can not get the name from system.

Original Change: Fan Jackson
Dr No: Eastham
Bug Id: 2183320
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
e10881ae39eb4affb7a78827f2060964e8534515 02-Nov-2009 Daisuke Miyakawa <dmiyakawa@google.com> Fix a typo.
luetooth/pbap/BluetoothPbapVcardManager.java
c065fc5530cc0e8f14261f8c347984cdde070169 30-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Disable sending Photo field for PBAP. Do Not Merge.

Some car kits don't handle contacts with Photo Fields well.
Disable this field for the time being.

Original Change by: Yue Lixin

Bug: 2183320
Dr No: Eastham
luetooth/pbap/BluetoothPbapVcardManager.java
59582607bc341f9e9662d6ec5c1a93bb4c537d38 15-Oct-2009 Daisuke Miyakawa <dmiyakawa@google.com> Fix a build breakage.

Make Bluetooth code use new type instead of old.
luetooth/pbap/BluetoothPbapVcardManager.java
4ceaa3e03dc7a68d4e7c0c8e14a461cfd7c4c19c 12-Oct-2009 Daisuke Miyakawa <dmiyakawa@google.com> Adapt to the new interface of vCard code.

Internal Issue number: 2160039
luetooth/pbap/BluetoothPbapVcardManager.java
b506e52fabbc02445f3652049ed8a390d4fcaa7f 09-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I428bc0fc into eclair

* changes:
Remove STOPSHIP BT logging.
0e6233ffba67e757f60171803d7ab376cf73c16c 09-Oct-2009 Nick Pelly <npelly@google.com> Remove STOPSHIP BT logging.

Do not merge.

Change-Id: I428bc0fc67030f24112f2e9c865824dfaea4897d
DrNo: eastham
Bug: 2089423
Joke: Why does E.T. have such big eyes? Because he saw his phone bill.
luetooth/opp/Constants.java
luetooth/pbap/BluetoothPbapService.java
59256dee3f9787fd660c346d61e0271ecd4bfe9a 08-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Update PBAP code for Contacts database changes and check for OPP
file extension.

Original Author for PBAP - Yue Lixin
Dr No: Eastham
Bug: 2174759
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/pbap/BluetoothPbapVcardManager.java
3a88b20fcd71e42451e402d27374b19eeb2ff0da 08-Oct-2009 Nick Pelly <npelly@google.com> Update application code for BluetoothAdapter.getDefaultAdapter().

Change-Id: I7baafb909b74783da4e51d48f2465e7aacf07eb5
DrNo: eastham
Bug: 2158765
Joke: What goes 99-thump, 99-thump? A centipede with a wooden leg.
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
luetooth/pbap/BluetoothPbapService.java
773ca65d26f0eb0eda3ec44c2a788043387981cf 05-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Remove Disconnected and Connected PBAP toasts.

Original Author: Fan Jackson
Bug number: 2060933
Dr No: Eastham
luetooth/pbap/BluetoothPbapService.java
0eb2230d3b7c184a00599e8ab70331c599e9ef1c 02-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Fix ANR by repeating BT ON/OFF caused by PBAP closeservice deadlock

Move back socket closing sequence ahead of Thread.shutdown and join operation;
Seperate socket closing and resetting as null to avoid NPE during service close

Original Author: Fan Jackson
Bug: 2158262
DrNo: Paul

Change-Id: I2b36f3fb920c80602f5734a67a8cf6c6fbd00de4
luetooth/pbap/BluetoothPbapService.java
29a07d9c52cde18ee818fd21528288cd5c8127c8 30-Sep-2009 Daisuke Miyakawa <dmiyakawa@google.com> Remove redundant dependency toward android.syncml.
luetooth/pbap/BluetoothPbapVcardManager.java
e42f4c90d20e3192c18bbe8fad98059b0c910cd7 30-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I8222c790 into eclair

* changes:
Update OPP/PBAP service to use onStartCommand() Adjust function call seqence in PBAP closeService
8222c7902a2281929fd31e840f6012038e6fa44a 29-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update OPP/PBAP service to use onStartCommand()
Adjust function call seqence in PBAP closeService
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapService.java
b0fa09caef6a0748a568dc2a89f5d94b85423bb2 29-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update OPP/PBAP UI

Add timeout handling to incoming file confirm dialog, to avoid uncertain
behavior when timeout happen
Fix PBAP request timeout issue when open/close slider, dismiss timeout
dialog to avoid uncertain behavior
Fix typo in strings
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothShare.java
luetooth/pbap/BluetoothPbapActivity.java
4ef0999864c582e64b62ecf46a569574e7cae9a1 29-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I18bde766 into eclair

* changes:
Update PBAP to make compatiable with spec
18bde766b20c899310ebdd5ca823e30ff27d407f 27-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update PBAP to make compatiable with spec

Add check to incoming application parameter, be nice to accept PCE request
Fix minor pullvCardEntry issue for call logs
Fix one pullPhoneBook issue about request size
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapVcardManager.java
668a8d617ac827770a484ad6b3f329ee248745ee 28-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ifb946935 into eclair

* changes:
Added WhiteList of acceptable MIME types for OBEX transfers. Part of OBEX/OPP security review. Bug information: http://b/issue?id=1972237
fb946935fe50d957e835ac00a592bd3d222edef3 28-Sep-2009 Oscar Montemayor <oam@android.com> Added WhiteList of acceptable MIME types for OBEX transfers. Part of OBEX/OPP security review.
Bug information: http://b/issue?id=1972237
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/Constants.java
202e9f669d8972d6371c349ed65f311de465be1a 28-Sep-2009 Nick Pelly <npelly@google.com> Update application for android.bluetooth.ParcelUuid -> android.os.ParcelUuid

Change-Id: Ia0eb46d9bdff6a8ab3333bb0ad1f66d0303c135a
luetooth/opp/BluetoothOppTransfer.java
6fbad3dd950238d871c4efce4eb258ae1a54b878 27-Sep-2009 Oscar Montemayor <oam@android.com> Proposed file canonical path prevetion for directory trasvesal attacks. Fix suggested by meder@google.com.
More fixes form CR comments.
luetooth/opp/BluetoothOppReceiveFileInfo.java
2f8fe66f45bac2bc61395bd4f8de553f4c2b7c30 24-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update PBAP to use new VCardComposer

Totally removed the use of old syncml.pim.vcard.VCardComposer
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapRfcommTransport.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
9d9e511fe7425fb3105ece227ecedb43d6333333 21-Sep-2009 Tao Liejun <L.J.Tao@motorola.com> Use new SDP API for OPP

Use new API BluetoothDevice.fetchUuidsWithSdp() to query SDP for un-paired device, and request SDP
update when Opp is not in cache.
Handle a concurrent case when incoming connection and file share happens together
Some other minor changes

Change-Id: I7ebf34801518867553551d8f7bba7ac62e22667e
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/Constants.java
c4b72ebe2ed9cd29c40a75411702ca9dca9424ac 24-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 26736 into eclair

* changes:
Update opp/pbap look and feel
38416553a26e55963e11276f1029d78e9e6cad70 23-Sep-2009 Rich Cannings <richc@google.com> Fixes NullPointerException that crashes Bluetooth when filename ends end with slash, e.g.: 'fooo..txt/'.

choosefilename() can return null. We should handle this result and grecefully fail.
luetooth/opp/BluetoothOppReceiveFileInfo.java
dc3bacd6eb626a93f2c3c4c62b3ef6aa9e575d92 21-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update opp/pbap look and feel

Update OPP BtEnabling Dialog-add timeout handling, handle Bluetooth ON intent, handle back key

Change-Id: I3d3ade3a9a4de645ddb7195e8b81ca42afb3d31e
luetooth/opp/BluetoothOppBtEnableActivity.java
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppTransferActivity.java
1f556d99c4bb7cae5ed55c171ce7f65b5010fa57 22-Sep-2009 Oscar Montemayor <oam@android.com> Replaced back-slashes on hint path URI with forward-slahes, more in line with Linux FS conventions.
Code review changes incorporated patch set 3 rev.
luetooth/opp/BluetoothOppReceiveFileInfo.java
68ea2a43de2e7cee20c03332ed9f5ff004e42884 02-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Change handling of remoteUuids.
luetooth/opp/BluetoothOppTransfer.java
f2c447b81c6c03cb1c8a3e64a10381e23934834a 10-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API changes.

Change-Id: I618553f2aa4e8705e3dff1247752e5fc357ef94d
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
613bae227d65f61903e196944a9c718b4394f25a 09-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API change: deprecation of BluetoothError.
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
f4a286ee2aba5a75abe41881334bbdb5d0080105 09-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API change.
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppService.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
c5495c585c0d19cdd20963e5a2144e5f984a306e 09-Sep-2009 Lixin Yue <L.X.YUE@motorola.com> Update PBAP to be compatible with Mecel stack

The response to the targeted connect operation should contain a Who with the same UUID as
sent in the request's matching Target header. If the Who header was present in the request,
a Target header identifying the same client should be sent in the response.

Play ringtone for incoming PBAP connection request
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
4446eaa935994bc91d6d308303e8d27526b4590d 31-Aug-2009 Lixin Yue <L.X.YUE@motorola.com> Pbap update

Improve PBAP download contacts performance greatly
Add 10 times retry for creation of listening socket
Change PbapReciever to be clearer
Rename functions and adjust function sequence in PbapService
Cleanup logging
Remove unused functions
Remove serversocket polling
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapAuthenticator.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
5c670ec88d1c59e5ad32b0264552199f3d6073c5 01-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 23495 into eclair

* changes:
Workaround bug in Poloroid Pogo.
fa5d402906010cd17c8ed7de0dbcbfdcb78dab20 01-Sep-2009 Nick Pelly <npelly@google.com> Workaround bug in Poloroid Pogo.

Rename extra dots to underscores.

Working with Poloroid to get an updated list of affected MAC addresses. For now
we just have 00:04:48.
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppTransfer.java
acab258c177d82338b1696360cd0b8c9821b0f03 26-Aug-2009 Lixin Yue <L.X.YUE@motorola.com> Allow Pbap if device is trusted
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapService.java
888485a3f5fe991116c5536bb6d6903d47b63a70 31-Aug-2009 Tao Liejun <L.J.Tao@motorola.com> Cleanup Opp debug code

Stop Rfcomm polling
Delete a few unused functions
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/Constants.java
luetooth/opp/TestActivity.java
luetooth/opp/TestTcpListener.java
luetooth/opp/TestTcpServer.java
luetooth/opp/TestTcpSessionNotifier.java
luetooth/opp/TestTcpTransport.java
32e47df203390052c1ef771d78b22fc4aa5f9e72 27-Aug-2009 Tao Liejun <L.J.Tao@motorola.com> Simplify wakelock release for Obex Server
luetooth/opp/BluetoothOppObexServerSession.java
ce4d93666275df294cb073fe41de5b85932570a8 28-Aug-2009 Nick Pelly <npelly@google.com> Clean up Logging.

Use the pattern if (V) Log.v(...); for logging. The Android style prefers curly braces, but for log lines it is ok to use a one-liner to keep the code manageable.

Remove spaces from some log tags, and rename TAG BluetoothShareProvider to BluetoothOpp.

Rename LOGVV to V, and LOGV to D.

Just before ship we will change Constants.DEBUG and Constants.VERBOSE to false to compile out all the logging code.
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppBtEnableActivity.java
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppBtErrorActivity.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/Constants.java
luetooth/opp/TestTcpListener.java
luetooth/opp/TestTcpServer.java
d6641e4a7bb22833e1c07cb3af7989835fa7e16d 19-Aug-2009 Tao Liejun <L.J.Tao@motorola.com> Remove Device picker
luetooth/opp/BluetoothDevicePickerActivity.java
luetooth/opp/BluetoothDevicePickerBtStatus.java
luetooth/opp/BluetoothDevicePickerDevice.java
luetooth/opp/BluetoothDevicePickerDeviceManager.java
luetooth/opp/BluetoothDevicePickerDevicePreference.java
luetooth/opp/BluetoothDevicePickerListener.java
luetooth/opp/BluetoothDevicePickerManager.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothPinDialog.java
luetooth/opp/BluetoothShare.java
luetooth/opp/ProgressCategory.java
1ac5507790a87810061a19dadec36eb328a222ea 07-Aug-2009 Tao Liejun <L.J.Tao@motorola.com> OPP update

Rewrite provider permission to allow LiveFolders work
Support file:// uri to share file
Support multiple share from gallery
Fully support sending file queue
Hold incoming connection for a while when OPP is busy instead of reject directly
Move notification update to a thread
Handle many error cases to display correct error messages
Improve server/client timeout
Delete empty file after reject incoming file
Support upper case incoming file extension
Avoid multiple mediascanner connections
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/Constants.java
41ef8d494511c040451f2f887cb31c3100746b61 07-Aug-2009 Nick Pelly <npelly@google.com> Bluetooth: Update Bluetooth.apk to match BT API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).
luetooth/opp/BluetoothDevicePickerActivity.java
luetooth/opp/BluetoothDevicePickerDevice.java
luetooth/opp/BluetoothDevicePickerDeviceManager.java
luetooth/opp/BluetoothDevicePickerListener.java
luetooth/opp/BluetoothDevicePickerManager.java
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppRfcommTransport.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/BluetoothPinDialog.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
464d9d216ab1a6cf192e3e526596073c7e35e4a7 13-Aug-2009 L.X.YUE <L.X.YUE@motorola.com> Update Opp icons

Update incomming file notification icon to be consistent with system;
Update OPP launcher icon per Anroid guidline;
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppNotification.java
52236de777c23788df8147de15912a57e8bc36dd 04-Aug-2009 Tao Liejun <L.J.Tao@motorola.com> Fix a few OPP issues

Grab wakelock for server session
Fix send small file bug
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/Constants.java
d896162ef022a5607b13bae5177637ff3f18b737 28-Jul-2009 Lixin Yue <L.X.YUE@motorola.com> Update PBAP per review comments:

Patch 3 fix listing call-history issue
Remove the use of Enum in PbapObexServer.java
Simplify codes by using function and paras
Change some informal usage in codes
Fix minor issues
Rename some function and vars
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapAuthenticator.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
239bc526513429995c61c4148c105725c395b1a9 27-Jul-2009 Jackson Fan <xyfan@motorola.com> Enable Opp Livefolder, modify localizable resource

Update on patchset 2
Update icon for Bluetooth share and Incoming file
Fix minor Opp UI issue
Update log print for mimetype got from android system.
Update return response code for un-supported media type
Patchset 1
remove the use of replace() of localizable resource
Enable Opp Livefolder by using local certificate
Reject vcard actively
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppLiveFolder.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/Constants.java
37b69bd05e4b7a7d0e43575a6c22734b2d8c3f69 24-Jul-2009 Jackson Fan <xyfan@motorola.com> Remove TODOs for frameworks change

Modify for aidl added in frameworks
luetooth/pbap/BluetoothPbapService.java
87f9a72cc2d9544f65eab18893f7dc0de4f6ee31 23-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Disable verbose logging.

TODO: We need to fix logging according to new verbose logging in OPP and PBAP.
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/Constants.java
luetooth/pbap/BluetoothPbapService.java
b9cd7fee03a41e56a0cea9aa2e1af3b28c5be590 23-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Add copyright and fix some style issues.
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapAuthenticator.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapRfcommTransport.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
2c282d5898ac0916470ebfa9ff26ba784cf4bb24 18-Jul-2009 Jackson Fan <xyfan@motorola.com> Add pbap into bluetooth package

Update PBAP as patchset 5
Adjust some resouces strings after UI test
Change localized resource usage
Modify exception handle, rename a confusing variable name
Remove compile dependency on 240 for now. Add TODO in code
Some minor changes to address the comments
Submit on-behalf of Yue Lixin <a5206c@motorola.com>

Update PBAP as patchset 4 according to comments
Format resource files
Re-organize the logs
Submit on-behalf of Jiafa Liu <pbx376@motorola.com>
luetooth/pbap/BluetoothPbapActivity.java
luetooth/pbap/BluetoothPbapAuthenticator.java
luetooth/pbap/BluetoothPbapObexServer.java
luetooth/pbap/BluetoothPbapReceiver.java
luetooth/pbap/BluetoothPbapRfcommTransport.java
luetooth/pbap/BluetoothPbapService.java
luetooth/pbap/BluetoothPbapVcardManager.java
eb37b3c2c9d59bc1c0f09f911f5bde077a63f4da 18-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Rename cancelPin to cancelPairingUserInput for Bluetooth 2.1
luetooth/opp/BluetoothPinDialog.java
af9af3c451fde7712e86c9430169c306b91836a4 15-Jul-2009 Jackson Fan <xyfan@motorola.com> Cleanup resources of OPP

Modify according to Ranian's comments
- adjust layout
- remove Capitalized resource names
- format
luetooth/opp/TestActivity.java
df7415da0e510ab8e4b73831a5ade38306982fe1 16-Jul-2009 Tao Liejun <L.J.Tao@motorola.com> Fix OPP receive bug

Fix the bug that second receving would fail
Show display name instead of full name in notification
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppTransfer.java
6769b59d715ea98bd72eafcfea9acd2714a887da 15-Jul-2009 Tao Liejun <L.J.Tao@motorola.com> Make opp compile

Modify to make opp application compliable in new git
-change package name
-change manifest
-modify a few comments
luetooth/opp/BluetoothDevicePickerActivity.java
luetooth/opp/BluetoothDevicePickerBtStatus.java
luetooth/opp/BluetoothDevicePickerDevice.java
luetooth/opp/BluetoothDevicePickerDeviceManager.java
luetooth/opp/BluetoothDevicePickerDevicePreference.java
luetooth/opp/BluetoothDevicePickerManager.java
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppBtEnableActivity.java
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppBtErrorActivity.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppLiveFolder.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/BluetoothPinDialog.java
luetooth/opp/BluetoothShare.java
luetooth/opp/Constants.java
luetooth/opp/ProgressCategory.java
luetooth/opp/TestActivity.java
luetooth/opp/TestTcpListener.java
luetooth/opp/TestTcpServer.java
luetooth/opp/TestTcpSessionNotifier.java
09e9cba205af60b3f42e7a4d891a7d1392e1f2a5 11-Jul-2009 Nick Pelly <npelly@google.com> Initial drop of Motorola Bluetooth OPP code.

Minor changes from Moto code:
- Added Motorola BSD license
- Moved com.motorola.bluetoothshare to com.android.bluetooth.opp
- Updated com.motorola.obex to javax.obex
- Moved Android.mk to Android.mk.hide: does not yet compile due to changes in
Obex library.
luetooth/opp/BluetoothDevicePickerActivity.java
luetooth/opp/BluetoothDevicePickerBtStatus.java
luetooth/opp/BluetoothDevicePickerDevice.java
luetooth/opp/BluetoothDevicePickerDeviceManager.java
luetooth/opp/BluetoothDevicePickerDevicePreference.java
luetooth/opp/BluetoothDevicePickerListener.java
luetooth/opp/BluetoothDevicePickerManager.java
luetooth/opp/BluetoothOppBatch.java
luetooth/opp/BluetoothOppBtEnableActivity.java
luetooth/opp/BluetoothOppBtEnablingActivity.java
luetooth/opp/BluetoothOppBtErrorActivity.java
luetooth/opp/BluetoothOppIncomingFileConfirmActivity.java
luetooth/opp/BluetoothOppLauncherActivity.java
luetooth/opp/BluetoothOppLiveFolder.java
luetooth/opp/BluetoothOppManager.java
luetooth/opp/BluetoothOppNotification.java
luetooth/opp/BluetoothOppObexClientSession.java
luetooth/opp/BluetoothOppObexServerSession.java
luetooth/opp/BluetoothOppObexSession.java
luetooth/opp/BluetoothOppPreference.java
luetooth/opp/BluetoothOppProvider.java
luetooth/opp/BluetoothOppReceiveFileInfo.java
luetooth/opp/BluetoothOppReceiver.java
luetooth/opp/BluetoothOppRfcommListener.java
luetooth/opp/BluetoothOppRfcommTransport.java
luetooth/opp/BluetoothOppSendFileInfo.java
luetooth/opp/BluetoothOppService.java
luetooth/opp/BluetoothOppShareInfo.java
luetooth/opp/BluetoothOppTransfer.java
luetooth/opp/BluetoothOppTransferActivity.java
luetooth/opp/BluetoothOppTransferInfo.java
luetooth/opp/BluetoothOppUtility.java
luetooth/opp/BluetoothPinDialog.java
luetooth/opp/BluetoothShare.java
luetooth/opp/Constants.java
luetooth/opp/ProgressCategory.java
luetooth/opp/TestActivity.java
luetooth/opp/TestTcpListener.java
luetooth/opp/TestTcpServer.java
luetooth/opp/TestTcpSessionNotifier.java
luetooth/opp/TestTcpTransport.java