OSDN Git Service

Device cannot go to sleep while connected to HBM-570 BT headset
authorZhihai Xu <zhihaixu@google.com>
Mon, 14 Oct 2013 19:16:39 +0000 (12:16 -0700)
committerVineeta Srivastava <vsrivastava@google.com>
Thu, 6 Mar 2014 17:35:56 +0000 (09:35 -0800)
commite061a83b8cbd872cd9f0fea33717aa57112e6228
tree4bf92608b363d4aa9753f44b569622d0cc9c97f2
parent3f298ffe0add6b60e8d6265670928f84ce7d7338
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
src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java
src/com/android/bluetooth/pbap/BluetoothPbapService.java