OSDN Git Service

android-x86/packages-apps-Bluetooth.git
8 years agoMerge "Prevent Null Pointer Exception caused by race condition in AVRCP init"
Treehugger Robot [Tue, 11 Oct 2016 06:16:59 +0000 (06:16 +0000)]
Merge "Prevent Null Pointer Exception caused by race condition in AVRCP init"

8 years agoPrevent Null Pointer Exception caused by race condition in AVRCP init
Ajay Panicker [Tue, 11 Oct 2016 04:07:17 +0000 (21:07 -0700)]
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

8 years agoMerge "Convert advertising HAL from struct into class (2/3)"
Treehugger Robot [Mon, 10 Oct 2016 22:34:50 +0000 (22:34 +0000)]
Merge "Convert advertising HAL from struct into class (2/3)"

8 years agoConvert advertising HAL from struct into class (2/3)
Jakub Pawlowski [Thu, 6 Oct 2016 23:52:44 +0000 (16:52 -0700)]
Convert advertising HAL from struct into class (2/3)

Bug: 30622771
Test: all related tests were updated
Change-Id: Ib32b7ef9483b14dd92a9555856d1b62b85e87c0a

8 years agoMerge "style: Remove commented-out code"
Treehugger Robot [Mon, 10 Oct 2016 20:22:40 +0000 (20:22 +0000)]
Merge "style: Remove commented-out code"

8 years agostyle: Remove commented-out code
Marie Janssen [Mon, 10 Oct 2016 17:31:29 +0000 (10:31 -0700)]
style: Remove commented-out code

Test: continues to compile
Change-Id: I94f3e869621bcffd1aba678894ac14fc3800184f

8 years agoMerge "Make AVRCP encryption aware"
Treehugger Robot [Sun, 9 Oct 2016 01:52:07 +0000 (01:52 +0000)]
Merge "Make AVRCP encryption aware"

8 years agoMake AVRCP encryption aware
Ajay Panicker [Fri, 7 Oct 2016 23:39:51 +0000 (16:39 -0700)]
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

8 years agoMerge "Ensure LE scan clients are removed when the related app dies"
Treehugger Robot [Fri, 7 Oct 2016 17:46:56 +0000 (17:46 +0000)]
Merge "Ensure LE scan clients are removed when the related app dies"

8 years agoEnsure LE scan clients are removed when the related app dies
Andre Eisenbach [Fri, 7 Oct 2016 00:39:31 +0000 (17:39 -0700)]
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)

8 years agoMerge "Fix connecting to profiles when bonding from local device (2/3)"
Jakub Pawlowski [Thu, 6 Oct 2016 20:54:07 +0000 (20:54 +0000)]
Merge "Fix connecting to profiles when bonding from local device (2/3)"

8 years agoFix connecting to profiles when bonding from local device (2/3)
Jakub Pawlowski [Wed, 20 Jul 2016 18:41:09 +0000 (11:41 -0700)]
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

8 years agoMerge "Offset browsing media entry UID by one"
Treehugger Robot [Wed, 5 Oct 2016 21:43:57 +0000 (21:43 +0000)]
Merge "Offset browsing media entry UID by one"

8 years agoMerge "Re-enable browsing support for AVRCP"
Andre Eisenbach [Wed, 5 Oct 2016 21:23:17 +0000 (21:23 +0000)]
Merge "Re-enable browsing support for AVRCP"

8 years agoRe-enable browsing support for AVRCP
Ajay Panicker [Wed, 5 Oct 2016 17:34:02 +0000 (10:34 -0700)]
Re-enable browsing support for AVRCP

Bug: 31941615
Change-Id: Ia6846b3d6133c42863ae3cc630c980bea3e6bf20

8 years agoOffset browsing media entry UID by one
Ajay Panicker [Wed, 5 Oct 2016 18:16:24 +0000 (11:16 -0700)]
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

8 years agoMerge "Cleanup BluetoothPbapReceiver log messages"
Treehugger Robot [Thu, 29 Sep 2016 01:39:54 +0000 (01:39 +0000)]
Merge "Cleanup BluetoothPbapReceiver log messages"

8 years agoCleanup BluetoothPbapReceiver log messages
Pavlin Radoslavov [Wed, 28 Sep 2016 23:58:07 +0000 (16:58 -0700)]
Cleanup BluetoothPbapReceiver log messages

Bug: 31442739
Bug: 31457305
Test: manual - checked logcat output for (lack of) excessive logs
Change-Id: I76f32dd950afd0a2949f38bfa6c0d4212b83357c

8 years agoMerge "Don't try to stop advertising on death of GATT clients"
Treehugger Robot [Fri, 23 Sep 2016 21:50:30 +0000 (21:50 +0000)]
Merge "Don't try to stop advertising on death of GATT clients"

8 years agoDon't try to stop advertising on death of GATT clients
Jakub Pawlowski [Mon, 19 Sep 2016 21:51:03 +0000 (14:51 -0700)]
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

8 years agoMerge "Enable debug logs for Bluetooth AdapterService"
Treehugger Robot [Thu, 22 Sep 2016 21:54:51 +0000 (21:54 +0000)]
Merge "Enable debug logs for Bluetooth AdapterService"

8 years agoMerge "Enable debug logs by default in BluetoothPbapReceiver"
Treehugger Robot [Thu, 22 Sep 2016 21:47:13 +0000 (21:47 +0000)]
Merge "Enable debug logs by default in BluetoothPbapReceiver"

8 years agoMerge "Do not downgrade filtered scans to opportunistic"
Andre Eisenbach [Thu, 22 Sep 2016 20:32:24 +0000 (20:32 +0000)]
Merge "Do not downgrade filtered scans to opportunistic"

8 years agoEnable debug logs for Bluetooth AdapterService
Pavlin Radoslavov [Thu, 22 Sep 2016 00:46:07 +0000 (17:46 -0700)]
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

8 years agoEnable debug logs by default in BluetoothPbapReceiver
Pavlin Radoslavov [Thu, 15 Sep 2016 20:15:41 +0000 (13:15 -0700)]
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

8 years agoDo not downgrade filtered scans to opportunistic
Andre Eisenbach [Mon, 19 Sep 2016 19:23:15 +0000 (12:23 -0700)]
Do not downgrade filtered scans to opportunistic

Fixes: 31308591
Test: manual
Change-Id: I0d8bcffef9951c03607f7f3b25b79557062a9bec
(cherry picked from commit 8d6abb0a65bd4e9f4726a9c565b0c74fb6aed1a1)

8 years agoMerge "Update deprecated Notification builder to new API"
Treehugger Robot [Wed, 21 Sep 2016 02:50:30 +0000 (02:50 +0000)]
Merge "Update deprecated Notification builder to new API"

8 years agoUpdate deprecated Notification builder to new API
Jack He [Mon, 19 Sep 2016 19:10:36 +0000 (12:10 -0700)]
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

8 years agoMerge "Bluetooth: split setting params and enabling advertising (1/3)"
Treehugger Robot [Tue, 13 Sep 2016 08:30:26 +0000 (08:30 +0000)]
Merge "Bluetooth: split setting params and enabling  advertising (1/3)"

8 years agoBluetooth: split setting params and enabling advertising (1/3)
Jakub Pawlowski [Tue, 23 Aug 2016 20:49:59 +0000 (13:49 -0700)]
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

8 years agoMerge "AVRCP 1.6: media browsing support on Target(3/3)"
Ajay Panicker [Fri, 2 Sep 2016 20:46:00 +0000 (20:46 +0000)]
Merge "AVRCP 1.6: media browsing support on Target(3/3)"

8 years agoAVRCP 1.6: media browsing support on Target(3/3)
Avish Shah [Wed, 22 Jun 2016 01:23:35 +0000 (06:53 +0530)]
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

8 years agoMerge "Mercedes Benz MAP message listing workaround"
Treehugger Robot [Fri, 2 Sep 2016 02:17:09 +0000 (02:17 +0000)]
Merge "Mercedes Benz MAP message listing workaround"

8 years agoMercedes Benz MAP message listing workaround
ugo_yu [Fri, 27 May 2016 12:11:08 +0000 (20:11 +0800)]
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)

8 years agoMerge "Fix ConcurrentModificationException in GattService.onScanResult"
Treehugger Robot [Thu, 1 Sep 2016 22:09:19 +0000 (22:09 +0000)]
Merge "Fix ConcurrentModificationException in GattService.onScanResult"

8 years agoFix ConcurrentModificationException in GattService.onScanResult
Jakub Pawlowski [Thu, 1 Sep 2016 19:04:07 +0000 (12:04 -0700)]
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

8 years agoMerge "Change MAP to send one new message event upon storage unlock"
Treehugger Robot [Wed, 31 Aug 2016 21:02:22 +0000 (21:02 +0000)]
Merge "Change MAP to send one new message event upon storage unlock"

8 years agoMerge "ContextMap: Remove connection references when an app is removed"
Treehugger Robot [Wed, 31 Aug 2016 20:16:31 +0000 (20:16 +0000)]
Merge "ContextMap: Remove connection references when an app is removed"

8 years agoChange MAP to send one new message event upon storage unlock
Ajay Panicker [Wed, 24 Aug 2016 03:23:08 +0000 (20:23 -0700)]
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)

8 years agoMerge "Separate advertiser from GATT client (2/4)"
Jakub Pawlowski [Wed, 31 Aug 2016 18:05:26 +0000 (18:05 +0000)]
Merge "Separate advertiser from GATT client (2/4)"

8 years agoContextMap: Remove connection references when an app is removed
Kyle Horimoto [Wed, 31 Aug 2016 00:54:16 +0000 (17:54 -0700)]
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)

8 years agoSeparate advertiser from GATT client (2/4)
Jakub Pawlowski [Wed, 13 Jul 2016 18:56:59 +0000 (11:56 -0700)]
Separate advertiser from GATT client (2/4)

Bug: 30622771
Change-Id: Icacf1fa6a526d67ffadb8acc056d2acfefc5e895

8 years agoMerge "Don't use SMS database until after the phone is unlocked"
Treehugger Robot [Wed, 31 Aug 2016 03:00:18 +0000 (03:00 +0000)]
Merge "Don't use SMS database until after the phone is unlocked"

8 years agoDon't use SMS database until after the phone is unlocked
Ajay Panicker [Thu, 21 Jul 2016 17:39:14 +0000 (10:39 -0700)]
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

8 years agoMerge "Set the Adapter Service onCreate()"
Treehugger Robot [Thu, 25 Aug 2016 21:33:02 +0000 (21:33 +0000)]
Merge "Set the Adapter Service onCreate()"

8 years agoSet the Adapter Service onCreate()
Pavlin Radoslavov [Sat, 25 Jun 2016 00:31:52 +0000 (17:31 -0700)]
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)

8 years agoMerge "Allocate CallbacksObj Before Initializing A2DP JNI Interface"
Andre Eisenbach [Wed, 24 Aug 2016 00:46:52 +0000 (00:46 +0000)]
Merge "Allocate CallbacksObj Before Initializing A2DP JNI Interface"
am: b1b9ae5d4b

Change-Id: I2f4cb3851fd7941bb4192aa6eded60403d67201d

8 years agoMerge "Allocate CallbacksObj Before Initializing A2DP JNI Interface"
Andre Eisenbach [Wed, 24 Aug 2016 00:35:31 +0000 (00:35 +0000)]
Merge "Allocate CallbacksObj Before Initializing A2DP JNI Interface"

8 years agoAllocate CallbacksObj Before Initializing A2DP JNI Interface
Nathan Harold [Tue, 23 Aug 2016 22:23:33 +0000 (15:23 -0700)]
Allocate CallbacksObj Before Initializing A2DP JNI Interface

Bug: 31016704
Change-Id: If3dd4fdbc92e1420bc60910c39771aa549ac5dab

8 years agoMerge changes from topic 'ble-scan-accounting'
Jakub Pawlowski [Tue, 23 Aug 2016 21:51:39 +0000 (21:51 +0000)]
Merge changes from topic 'ble-scan-accounting'
am: 725d2dac7b  -s ours

Change-Id: Ic992092816435f0b1b24c762abd06722e32b7c58

8 years agoMerge changes from topic 'ble-scan-accounting'
Jakub Pawlowski [Tue, 23 Aug 2016 21:07:32 +0000 (21:07 +0000)]
Merge changes from topic 'ble-scan-accounting'

* changes:
  Reset ble scans in BatteryStats on start up
  Use the incoming WorkSource to notify batterystats of BLE scans

8 years agoMerge "Fix a deadlock in service discovery callbacks"
Jakub Pawlowski [Mon, 22 Aug 2016 21:38:36 +0000 (21:38 +0000)]
Merge "Fix a deadlock in service discovery callbacks"
am: 6fcd0081eb

Change-Id: I6e343bbc3ef5c54e372687ee989e1baa133a01c8

8 years agoMerge "Fix a deadlock in service discovery callbacks"
Treehugger Robot [Mon, 22 Aug 2016 21:22:21 +0000 (21:22 +0000)]
Merge "Fix a deadlock in service discovery callbacks"

8 years agoReset ble scans in BatteryStats on start up
Adam Lesinski [Mon, 22 Aug 2016 18:49:51 +0000 (11:49 -0700)]
Reset ble scans in BatteryStats on start up

Bug:22718669
Change-Id: Id31431bf35db3a52c8f1af1f210247d7ea20f6ed

8 years agoUse the incoming WorkSource to notify batterystats of BLE scans
Adam Lesinski [Mon, 22 Aug 2016 18:26:16 +0000 (11:26 -0700)]
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: I15dd7c912320552323aaf9d713b4bb3224ffffec

8 years agoFix a deadlock in service discovery callbacks
Jakub Pawlowski [Fri, 19 Aug 2016 11:08:18 +0000 (04:08 -0700)]
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

8 years agoMerge "Fix NPE in permissionCheck"
Jakub Pawlowski [Thu, 18 Aug 2016 01:39:29 +0000 (01:39 +0000)]
Merge "Fix NPE in permissionCheck"
am: 64ed2357e3

Change-Id: Ief4258ed339822801b97c9a85309608d59e98286

8 years agoMerge "Fix NPE in permissionCheck"
Treehugger Robot [Thu, 18 Aug 2016 01:37:50 +0000 (01:37 +0000)]
Merge "Fix NPE in permissionCheck"

8 years agoFix NPE in permissionCheck
Jakub Pawlowski [Thu, 18 Aug 2016 00:00:02 +0000 (17:00 -0700)]
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

8 years agoMerge "Add LE Secure Connection data parsing (2/4)"
Jakub Pawlowski [Thu, 11 Aug 2016 23:06:03 +0000 (23:06 +0000)]
Merge "Add LE Secure Connection data parsing (2/4)"
am: 29101f7fd4

Change-Id: I962b635c44d2573a62936ab58bf8577ef19000cc

8 years agoMerge "Add LE Secure Connection data parsing (2/4)"
Jakub Pawlowski [Thu, 11 Aug 2016 22:32:22 +0000 (22:32 +0000)]
Merge "Add LE Secure Connection data parsing (2/4)"

8 years agoAdd LE Secure Connection data parsing (2/4)
Jakub Pawlowski [Thu, 28 Jul 2016 12:19:11 +0000 (05:19 -0700)]
Add LE Secure Connection data parsing (2/4)

Bug: 30460956
Change-Id: Ie5c3ad96e7a834c9dc0a6791cf2cd24ecaeb927e

8 years agoMerge "Prevent LE scanning apps from being wrongflully downgraded to opportunistic"
Ajay Panicker [Wed, 10 Aug 2016 01:38:40 +0000 (01:38 +0000)]
Merge "Prevent LE scanning apps from being wrongflully downgraded to opportunistic"
am: c9db1189d8

Change-Id: I216d43f760661274145b7140efb68e5c01528073

8 years agoMerge "Prevent LE scanning apps from being wrongflully downgraded to opportunistic"
Treehugger Robot [Wed, 10 Aug 2016 01:27:38 +0000 (01:27 +0000)]
Merge "Prevent LE scanning apps from being wrongflully downgraded to opportunistic"

8 years agoPrevent LE scanning apps from being wrongflully downgraded to opportunistic
Ajay Panicker [Thu, 4 Aug 2016 02:18:50 +0000 (19:18 -0700)]
Prevent LE scanning apps from being wrongflully downgraded to opportunistic

Bug: 30648104
Change-Id: I9d749a20eefdbeb126fa25a425d636205a22b2ef
(cherry picked from commit a1c7315ed05df04599e7cdc5f4bcf7d3ec8d3392)

8 years agoMerge "Change URI accessed to properly update read status"
Andre Eisenbach [Tue, 9 Aug 2016 23:55:06 +0000 (23:55 +0000)]
Merge "Change URI accessed to properly update read status"
am: f337ee1fe0

Change-Id: Iad683df58a9067e275bc07c0701cce2dfb94fd83

8 years agoMerge "Protect against SecurityException generated by query"
Andre Eisenbach [Tue, 9 Aug 2016 23:55:04 +0000 (23:55 +0000)]
Merge "Protect against SecurityException generated by query"
am: 369f6662fa

Change-Id: I9e379db4c8d54a7733bba873da2cb6abc73493e6

8 years agoMerge "Change URI accessed to properly update read status"
Andre Eisenbach [Tue, 9 Aug 2016 23:50:36 +0000 (23:50 +0000)]
Merge "Change URI accessed to properly update read status"

8 years agoChange URI accessed to properly update read status
Ajay Panicker [Thu, 28 Jul 2016 00:18:35 +0000 (17:18 -0700)]
Change URI accessed to properly update read status

Bug: 28970262
Change-Id: I07d9ab24d10396baa4ddbfbdfad5b1eec1b8e9d5

8 years agoMerge "Protect against SecurityException generated by query"
Andre Eisenbach [Tue, 9 Aug 2016 23:48:42 +0000 (23:48 +0000)]
Merge "Protect against SecurityException generated by query"

8 years agoProtect against SecurityException generated by query
Ajay Panicker [Wed, 3 Aug 2016 01:53:00 +0000 (18:53 -0700)]
Protect against SecurityException generated by query

Bug: 30444661
Change-Id: I1d93645f1d4475cf603cda8bb28df0b960ccb445

8 years agoMerge "HFP 1.7 profile update (4/4)"
Mudumba Ananth [Thu, 4 Aug 2016 01:36:48 +0000 (01:36 +0000)]
Merge "HFP 1.7 profile update (4/4)"
am: 1b9d2081e0

Change-Id: Ib18e452187c7d673e8ae387da99bf9e6faf43bda

8 years agoMerge "HFP 1.7 profile update (4/4)"
Andre Eisenbach [Thu, 4 Aug 2016 01:06:51 +0000 (01:06 +0000)]
Merge "HFP 1.7 profile update (4/4)"

8 years agoHFP 1.7 profile update (4/4)
Mudumba Ananth [Mon, 29 Feb 2016 10:14:18 +0000 (02:14 -0800)]
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)

8 years agoMerge "Remove write type from GATT descriptor writes (2/4)"
Jakub Pawlowski [Thu, 4 Aug 2016 00:01:49 +0000 (00:01 +0000)]
Merge "Remove write type from GATT descriptor writes (2/4)"
am: ddd61d3443

Change-Id: I08ecf740a524cb511d86aa771809ccbc4afbf57b

8 years agoMerge "Remove write type from GATT descriptor writes (2/4)"
Treehugger Robot [Wed, 3 Aug 2016 23:54:35 +0000 (23:54 +0000)]
Merge "Remove write type from GATT descriptor writes (2/4)"

8 years agoRemove write type from GATT descriptor writes (2/4)
Jakub Pawlowski [Thu, 31 Mar 2016 05:57:24 +0000 (22:57 -0700)]
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

8 years agoMerge "Move file lookup to its own thread for beaming"
Ajay Panicker [Wed, 3 Aug 2016 18:29:11 +0000 (18:29 +0000)]
Merge "Move file lookup to its own thread for beaming"
am: 001643829c

Change-Id: I6849f122ad600984b8e99a38576343d67ae86033

8 years agoMerge "Move file lookup to its own thread for beaming"
Treehugger Robot [Wed, 3 Aug 2016 18:17:02 +0000 (18:17 +0000)]
Merge "Move file lookup to its own thread for beaming"

8 years agoMove file lookup to its own thread for beaming
Ajay Panicker [Tue, 26 Jul 2016 18:54:21 +0000 (11:54 -0700)]
Move file lookup to its own thread for beaming

Bug: 28973021
Change-Id: I40f6d32ffadd58e60dbd1e44802a629b9fab64e4
(cherry picked from commit 9b6816400cbb35df12eaf5fd59d1996d3d0dad84)

8 years agoresolve merge conflicts of ebe5b95 to stage-aosp-master
Jakub Pawlowski [Wed, 3 Aug 2016 12:52:58 +0000 (05:52 -0700)]
resolve merge conflicts of ebe5b95 to stage-aosp-master

Change-Id: I8c9ef03ff5e26128c9c6d69635355c4637075a45

8 years agoMerge "GATT Server refactoring (3/4)"
Jakub Pawlowski [Wed, 3 Aug 2016 10:21:43 +0000 (10:21 +0000)]
Merge "GATT Server refactoring (3/4)"

8 years agoGATT Server refactoring (3/4)
Jakub Pawlowski [Fri, 1 Apr 2016 15:07:48 +0000 (08:07 -0700)]
GATT Server refactoring (3/4)

Bug: 27999121
Change-Id: I45fec0fa6d0e8e26e40e1856ba9fee6f7fbd4f7b

8 years agoMerge "RemoteDevices: Optimize adding new remote devices"
Myles Watson [Wed, 3 Aug 2016 00:13:49 +0000 (00:13 +0000)]
Merge "RemoteDevices: Optimize adding new remote devices"
am: 55e58872c3

Change-Id: I85799db7e1fd3069815254afd2d6ebb559894d5a

8 years agoMerge "RemoteDevices: Optimize adding new remote devices"
Treehugger Robot [Wed, 3 Aug 2016 00:05:54 +0000 (00:05 +0000)]
Merge "RemoteDevices: Optimize adding new remote devices"

8 years agoRemoteDevices: Optimize adding new remote devices
Myles Watson [Fri, 15 Jul 2016 00:43:11 +0000 (17:43 -0700)]
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>
8 years agoMerge \"Fix bugs in play status and play pos notifications\"
Marie Janssen [Sat, 30 Jul 2016 06:36:19 +0000 (06:36 +0000)]
Merge \"Fix bugs in play status and play pos notifications\"
am: 764eb24d86

Change-Id: I6a5119996813069494b3c7ee666025474d1d9763

8 years agoMerge "Fix bugs in play status and play pos notifications"
Marie Janssen [Sat, 30 Jul 2016 00:03:53 +0000 (00:03 +0000)]
Merge "Fix bugs in play status and play pos notifications"

8 years agoFix bugs in play status and play pos notifications
Marie Janssen [Tue, 26 Jul 2016 23:23:54 +0000 (16:23 -0700)]
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

8 years agoMerge \"Add foreground flag to AG_CALL_CHANGED broadcast intent.\"
Lianchao Song [Tue, 19 Jul 2016 16:44:21 +0000 (16:44 +0000)]
Merge \"Add foreground flag to AG_CALL_CHANGED broadcast intent.\"
am: df005bf244

Change-Id: I0c8d2337e82c472fe4bd07d90f61c8b39e56dd80

8 years agoMerge "Add foreground flag to AG_CALL_CHANGED broadcast intent."
Chenjie Luo [Tue, 19 Jul 2016 16:38:19 +0000 (16:38 +0000)]
Merge "Add foreground flag to AG_CALL_CHANGED broadcast intent."

8 years agoMerge \"MAP: Remove redundant call to sendShutdownMessage to prevent crash\"
Hemant Gupta [Fri, 15 Jul 2016 17:10:57 +0000 (17:10 +0000)]
Merge \"MAP: Remove redundant call to sendShutdownMessage to prevent crash\"
am: 0786878b88

Change-Id: Ic62f273f84ae4b6b3c4d63ae089511b19723c1e4

8 years agoMerge "MAP: Remove redundant call to sendShutdownMessage to prevent crash"
Andre Eisenbach [Fri, 15 Jul 2016 16:58:18 +0000 (16:58 +0000)]
Merge "MAP: Remove redundant call to sendShutdownMessage to prevent crash"

8 years agoMAP: Remove redundant call to sendShutdownMessage to prevent crash
Hemant Gupta [Mon, 6 Jun 2016 17:33:19 +0000 (23:03 +0530)]
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

8 years agoMerge \"PAN: Avoid reconfiguration of bt-pan interface in NAP role\"
Hemant Gupta [Thu, 14 Jul 2016 20:36:51 +0000 (20:36 +0000)]
Merge \"PAN: Avoid reconfiguration of bt-pan interface in NAP role\"
am: aa83abd905

Change-Id: I084e393e11a893744a6b05b9a9ed3227b0df121a

8 years agoMerge "PAN: Avoid reconfiguration of bt-pan interface in NAP role"
Treehugger Robot [Thu, 14 Jul 2016 20:31:11 +0000 (20:31 +0000)]
Merge "PAN: Avoid reconfiguration of bt-pan interface in NAP role"

8 years agoPAN: Avoid reconfiguration of bt-pan interface in NAP role
Hemant Gupta [Thu, 16 Jun 2016 15:15:29 +0000 (20:45 +0530)]
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

8 years agoMerge \"Fix AVRCP crash, position and state tracking\"
Marie Janssen [Wed, 13 Jul 2016 21:39:02 +0000 (21:39 +0000)]
Merge \"Fix AVRCP crash, position and state tracking\"
am: 5b8a0db93b

Change-Id: Ic553fbdb7e2bbb2356b0525e8d54a2a59945d27e

8 years agoMerge "Fix AVRCP crash, position and state tracking"
Marie Janssen [Wed, 13 Jul 2016 21:25:53 +0000 (21:25 +0000)]
Merge "Fix AVRCP crash, position and state tracking"

8 years agoFix AVRCP crash, position and state tracking
Marie Janssen [Tue, 12 Jul 2016 14:53:54 +0000 (07:53 -0700)]
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