OSDN Git Service

SAP: Dynamic use of wake locks
authorCasper Bonde <c.bonde@samsung.com>
Wed, 22 Apr 2015 11:37:31 +0000 (13:37 +0200)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 3 Jun 2015 04:37:03 +0000 (21:37 -0700)
commitbbb071e6d73df46230ec654e3066a46f6e35a88d
tree6d0719691ee509c5b4fe13275ed243eef07af219
parentf98ad52d9b979273b01fb97466f2e077dc7b6bd6
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>
src/com/android/bluetooth/sap/SapRilReceiver.java
src/com/android/bluetooth/sap/SapServer.java
src/com/android/bluetooth/sap/SapService.java