OSDN Git Service

android-x86/packages-apps-Bluetooth.git
8 years agoAdd scan results to scan stats
Ajay Panicker [Wed, 9 Mar 2016 03:54:18 +0000 (19:54 -0800)]
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

8 years agoFix register for notification logic
Jakub Pawlowski [Tue, 22 Mar 2016 22:32:55 +0000 (15:32 -0700)]
Fix register for notification logic

Bug: 27790582
Change-Id: I118071b907ec16faad401ba6583ca395d08d6d6e

8 years agoMerge "PBAP abort operations when disconnected" into nyc-dev
Joseph Pirozzo [Tue, 22 Mar 2016 20:57:43 +0000 (20:57 +0000)]
Merge "PBAP abort operations when disconnected" into nyc-dev

8 years agoUse handles to identify GATT attributes (3/4)
Jakub Pawlowski [Thu, 17 Mar 2016 22:58:19 +0000 (15:58 -0700)]
Use handles to identify GATT attributes (3/4)

Bug: 27778668
Change-Id: Id6ec1229998c9fc2ecd4d0a908405a7148703bec

8 years agoChange how services are passed up to the stack
Jakub Pawlowski [Wed, 2 Mar 2016 00:09:14 +0000 (16:09 -0800)]
Change how services are passed up to the stack

Bug: 27455533
Change-Id: I4c8218fb4c7437ab4597071ad9b580a797e34339

8 years agoRemove unused callbacks
Jakub Pawlowski [Thu, 3 Mar 2016 23:00:46 +0000 (15:00 -0800)]
Remove unused callbacks

Bug: 27455533
Change-Id: I743b8ba7187a397f088ac720f239e368dd84a7a2

8 years agoGet whole GATT db, instead of one by one element.
Jakub Pawlowski [Fri, 26 Feb 2016 20:01:36 +0000 (12:01 -0800)]
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

8 years agoPBAP abort operations when disconnected
Joseph Pirozzo [Mon, 21 Mar 2016 21:23:06 +0000 (14:23 -0700)]
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

8 years agoForward in iPhone leads to play state being presisted as STOP.
Sanket Agarwal [Mon, 21 Mar 2016 21:00:30 +0000 (14:00 -0700)]
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

8 years agoMake sure wakelock is held before releaseing it
Andre Eisenbach [Mon, 21 Mar 2016 17:15:30 +0000 (10:15 -0700)]
Make sure wakelock is held before releaseing it

Bug: 27748109
Change-Id: I38c8ec640f5def7c53348d2dd96a0a2492ff00cc

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Sat, 19 Mar 2016 03:39:57 +0000 (04:39 +0100)]
Import translations. DO NOT MERGE

Change-Id: I6df2f8330fbce97f53729c931fe78e1a77482107
Auto-generated-cl: translation import

8 years agoDo not delete/re-create wakelock on acquisition/release
Andre Eisenbach [Thu, 17 Mar 2016 23:49:59 +0000 (16:49 -0700)]
Do not delete/re-create wakelock on acquisition/release

Also provide additional status for wakelock acquisition/release errors.

Bug: 27721443
Change-Id: Iac544226fed4a73a50bd954e74d96edd4bed93d2

8 years agoDisable Account Authenticator
Joseph Pirozzo [Thu, 17 Mar 2016 22:06:46 +0000 (15:06 -0700)]
Disable Account Authenticator

Conditionally disable account authenticator when pbap client service is
unavailable.

Bug: 27689917
Change-Id: Ia215b40805568e10f44b6c784abbfd9d39586bdf

8 years agoImplement PBAP PCE client role service.
Joseph Pirozzo [Wed, 9 Mar 2016 23:22:11 +0000 (15:22 -0800)]
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

8 years agoMerge "HFP is exposed via Telecom ConnectionService." into nyc-dev
Sanket Agarwal [Mon, 14 Mar 2016 22:58:01 +0000 (22:58 +0000)]
Merge "HFP is exposed via Telecom ConnectionService." into nyc-dev

8 years agoPrint bluetooth state as a string
Ajay Panicker [Mon, 14 Mar 2016 19:56:20 +0000 (12:56 -0700)]
Print bluetooth state as a string

Bug: 27294154
Change-Id: I992f720d94be1f0762424ebad36ec1b6af58600b

8 years agoHFP is exposed via Telecom ConnectionService.
Sanket Agarwal [Wed, 9 Mar 2016 23:29:38 +0000 (15:29 -0800)]
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

8 years agoAdd enabled time to dump output
Ajay Panicker [Wed, 9 Mar 2016 01:38:25 +0000 (17:38 -0800)]
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

8 years agoMove ScanStats to its own file
Ajay Panicker [Wed, 2 Mar 2016 03:59:51 +0000 (19:59 -0800)]
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

8 years agoAutoConnect A2DP and HFP for Car Kitt roles.
Sanket Agarwal [Wed, 9 Mar 2016 00:02:21 +0000 (16:02 -0800)]
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

8 years agoAudio Focus for A2DP.
Sanket Agarwal [Fri, 12 Feb 2016 22:48:51 +0000 (14:48 -0800)]
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

8 years agoMerge "Fix a bug where batch scan wasn't stopped correctly." into nyc-dev
Wei Wang [Thu, 3 Mar 2016 18:41:48 +0000 (18:41 +0000)]
Merge "Fix a bug where batch scan wasn't stopped correctly." into nyc-dev

8 years agoMerge "Add more statistics to scan logs" into nyc-dev
Ajay Panicker [Wed, 2 Mar 2016 17:24:38 +0000 (17:24 +0000)]
Merge "Add more statistics to scan logs" into nyc-dev

8 years agoDO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles...
Bryce Lee [Wed, 2 Mar 2016 03:22:40 +0000 (03:22 +0000)]
DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles. am: 90b78410c2  -s ours
am: 2c0f222c4e  -s ours

* commit '2c0f222c4e3637dfce4c0a5d9e0ea9ba26e3f6d0':
  DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.

8 years agoDO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.
Bryce Lee [Wed, 2 Mar 2016 03:13:17 +0000 (03:13 +0000)]
DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.
am: 90b78410c2  -s ours

* commit '90b78410c20e3232954891d66bed3352fc5c97e7':
  DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.

8 years agoAdd more statistics to scan logs
Ajay Panicker [Tue, 1 Mar 2016 21:46:00 +0000 (13:46 -0800)]
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

8 years agoMerge "Protect ScanStats from race conditions" into nyc-dev
Ajay Panicker [Wed, 2 Mar 2016 02:21:36 +0000 (02:21 +0000)]
Merge "Protect ScanStats from race conditions" into nyc-dev

8 years agoFix a bug where batch scan wasn't stopped correctly.
Wei Wang [Tue, 1 Mar 2016 21:02:07 +0000 (13:02 -0800)]
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

8 years agoProtect ScanStats from race conditions
Ajay Panicker [Mon, 29 Feb 2016 18:37:33 +0000 (10:37 -0800)]
Protect ScanStats from race conditions

Bug: 27294154
Change-Id: Icc0b0a6cfb93fca4a9a2aee49b94c0be1d62527f

8 years agoFix warnings in packages/apps/Bluetooth
Ajay Panicker [Tue, 1 Mar 2016 22:14:56 +0000 (14:14 -0800)]
Fix warnings in packages/apps/Bluetooth

Bug: 27301103
Change-Id: I2f2698a2fb3f7ca7031a803e43a398f59bd32cdb

8 years agoFix race in reportActivityInfo causing NPE
Adam Lesinski [Tue, 1 Mar 2016 01:14:59 +0000 (17:14 -0800)]
Fix race in reportActivityInfo causing NPE

Bug:27162966
Change-Id: Id43898440824c1bbb24cef5a23a3f2a4fcde0534

8 years agoDO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.
Bryce Lee [Mon, 29 Feb 2016 22:58:49 +0000 (14:58 -0800)]
DO NOT MERGE ANYWHERE Implement new API for retrieving supported Bluetooth profiles.

Bug: 26451648
Change-Id: Ice55556d64208656824d5a6f9b90230d17f0c3bc

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 29 Feb 2016 13:52:16 +0000 (05:52 -0800)]
Import translations. DO NOT MERGE

Change-Id: Ie08c10f0f7b831ab669f237454dd96b96447ebbe
Auto-generated-cl: translation import

8 years agoFix logic for repeated record scan calls
Ajay Panicker [Sat, 27 Feb 2016 00:03:10 +0000 (16:03 -0800)]
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

8 years agoMark background and opportunistic scans in scan statistics
Ajay Panicker [Wed, 24 Feb 2016 23:43:53 +0000 (15:43 -0800)]
Mark background and opportunistic scans in scan statistics

Bug: 27294154
Change-Id: I71d8f388aa83da581958d2169ca9a5eb6088a367

8 years agoFix the argument processing when dumping Bluetooth state
Pavlin Radoslavov [Fri, 26 Feb 2016 04:03:09 +0000 (20:03 -0800)]
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

8 years agoAdd a missing null pointer check for AdapterService
Pavlin Radoslavov [Wed, 24 Feb 2016 22:53:22 +0000 (14:53 -0800)]
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

8 years agoAdd timestamps to last LE scan log
Ajay Panicker [Wed, 24 Feb 2016 00:49:54 +0000 (16:49 -0800)]
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

8 years agoClean up gatt dump output
Ajay Panicker [Fri, 19 Feb 2016 00:43:26 +0000 (16:43 -0800)]
Clean up gatt dump output

Bug: 27294154
Change-Id: Ia411bb3446b657b06a1748daa14628da79d59ca0

8 years agoMerge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)"...
Andre Eisenbach [Wed, 24 Feb 2016 19:03:04 +0000 (19:03 +0000)]
Merge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)" into mnc-dr-dev am: e836319052 am: 9e6146ee2f
am: aa485fdd77  -s ours

* commit 'aa485fdd771ca724c557a5c6c9928d79c3a4959d':
  DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)

8 years agoMerge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)"...
Andre Eisenbach [Wed, 24 Feb 2016 18:53:50 +0000 (18:53 +0000)]
Merge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)" into mnc-dr-dev am: e836319052
am: 9e6146ee2f

* commit '9e6146ee2f94c0301d8cc19ca4655e197528829c':
  DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)

8 years agoMerge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)"...
Andre Eisenbach [Wed, 24 Feb 2016 18:47:16 +0000 (18:47 +0000)]
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)

8 years agoMerge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)"...
Andre Eisenbach [Wed, 24 Feb 2016 18:35:37 +0000 (18:35 +0000)]
Merge "DO NOT MERGE Read Bluetooth interop database entries from settings (2/2)" into mnc-dr-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 24 Feb 2016 13:59:51 +0000 (05:59 -0800)]
Import translations. DO NOT MERGE

Change-Id: I11299a617378b0822d73cd5ac94c6556eb62c35e
Auto-generated-cl: translation import

8 years agoFix warnings in packages/apps/Bluetooth
Aurimas Liutikas [Tue, 23 Feb 2016 00:39:38 +0000 (16:39 -0800)]
Fix warnings in packages/apps/Bluetooth

Cherry-pick of https://android-review.googlesource.com/#/c/204513/

Bug: 27301103
Change-Id: I46e0094d8e58c4d3a3ed0401600e7176fb1417c6

8 years agoDO NOT MERGE Enhance AVRCP Absolute Volume control implementation am: 1a1169dcb2...
Liejun Tao [Tue, 23 Feb 2016 22:07:47 +0000 (22:07 +0000)]
DO NOT MERGE Enhance AVRCP Absolute Volume control implementation am: 1a1169dcb2  -s ours am: 68d4713d8a
am: 65284fb3d9  -s ours

* commit '65284fb3d9310f17ba6dff5c0cb07ead318c90d2':
  DO NOT MERGE Enhance AVRCP Absolute Volume control implementation

8 years agoDO NOT MERGE Enhance AVRCP Absolute Volume control implementation am: 1a1169dcb2...
Liejun Tao [Tue, 23 Feb 2016 21:59:48 +0000 (21:59 +0000)]
DO NOT MERGE Enhance AVRCP Absolute Volume control implementation am: 1a1169dcb2  -s ours
am: 68d4713d8a

* commit '68d4713d8aa4bf743939b195e2658ae89703ffe7':
  DO NOT MERGE Enhance AVRCP Absolute Volume control implementation

8 years agoDO NOT MERGE Enhance AVRCP Absolute Volume control implementation
Liejun Tao [Tue, 23 Feb 2016 21:53:10 +0000 (21:53 +0000)]
DO NOT MERGE Enhance AVRCP Absolute Volume control implementation
am: 1a1169dcb2  -s ours

* commit '1a1169dcb2627c9667153232a356984e81f24e82':
  DO NOT MERGE Enhance AVRCP Absolute Volume control implementation

8 years agoDO NOT MERGE Enhance AVRCP Absolute Volume control implementation
Liejun Tao [Fri, 18 Dec 2015 20:59:01 +0000 (14:59 -0600)]
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

8 years agoDO NOT MERGE Read Bluetooth interop database entries from settings (2/2)
Andre Eisenbach [Thu, 14 Jan 2016 10:06:23 +0000 (02:06 -0800)]
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

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 22 Feb 2016 13:20:01 +0000 (05:20 -0800)]
Import translations. DO NOT MERGE

Change-Id: I8691388fe0ac0923b347e91e3c0e865364b44d3c
Auto-generated-cl: translation import

8 years agoUse IpManager when feeling Pan-tastic
Erik Kline [Wed, 17 Feb 2016 13:52:02 +0000 (22:52 +0900)]
Use IpManager when feeling Pan-tastic

Convert Bluetooth PAN from dhcpcd to IpManager.

Bug: 26991160
Change-Id: Iec8a48294702a8d214f43bea5ef9a041fa52d20f

8 years agoRead Bluetooth interop database entries from settings (2/2)
Andre Eisenbach [Thu, 14 Jan 2016 10:06:23 +0000 (02:06 -0800)]
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)

8 years agoOutput the Protobuf result in Base64 string
Pavlin Radoslavov [Thu, 18 Feb 2016 03:01:42 +0000 (19:01 -0800)]
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

8 years agoAdd Java Protobuf dump and ScanEvent Protobuf
Ajay Panicker [Tue, 16 Feb 2016 18:38:53 +0000 (10:38 -0800)]
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

8 years agoImprove BT OPP throughput
Deepak A Metri [Fri, 9 Oct 2015 10:42:21 +0000 (12:42 +0200)]
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>
8 years agoHFP: Do not return NULL when the HDP interface is unavailable
Arnav Gupta [Wed, 10 Feb 2016 00:27:49 +0000 (05:57 +0530)]
HFP: Do not return NULL when the HDP interface is unavailable

We're not supposed to return a NULL from a a function returning an int
value. And indeed the calling Java code does not have a NPE check either.

If an HDP interface is not avaialable, send -1 which the Java code
correctly assumes as a failure to register the health app.

Change-Id: I5ac7dc6f9acc9fefae8d1d2233453448c3ba79bc
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
8 years agoFix NPE crash while removeBatch
jun.x.wang [Thu, 14 Aug 2014 05:36:59 +0000 (13:36 +0800)]
Fix NPE crash while removeBatch

When unpairing two devices, the BluetoothOppShareInfo
in BluetoothOppBatch may be null during transfer.

Change-Id: I7b4fbd0f291250deebdeaea4bf2d2f540fe233dc

8 years agodumpNative has garbage in args
Ajay Panicker [Mon, 8 Feb 2016 23:12:49 +0000 (15:12 -0800)]
dumpNative has garbage in args

|args| sometimes has garbage in it which can cause segfaults later on.

Change-Id: Ie754d8066dc591b4d64e922b1ffe93fe131bc68d

8 years agoFix typo in Bluetooth MAP access string
Andre Eisenbach [Tue, 9 Feb 2016 17:17:49 +0000 (09:17 -0800)]
Fix typo in Bluetooth MAP access string

Bug: 26970075
Change-Id: I5d3ffbe3391389abafcfafbe924f390116954d18

8 years agoNull terminate MAP instance information
Ajay Panicker [Fri, 8 Jan 2016 00:05:11 +0000 (16:05 -0800)]
Null terminate MAP instance information

Bug: 26437927
Change-Id: I673de7f7c68b9a02b234bb99c6f89c7fc36f90c9

8 years agoMerge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev am: e225df4abf am...
Akshay Thakker [Sun, 14 Feb 2016 22:50:19 +0000 (22:50 +0000)]
Merge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev am: e225df4abf am: eeb99e6b70
am: 6554484313

* commit '6554484313ae2703d0e57b67cedc67e48061740a':
  Fix memory leak in Bluetooth AVRCP JNI

8 years ago[DO NOT MERGE ANYWHERE] Null terminate MAP instance information am: 082275e311 ...
Ajay Panicker [Sun, 14 Feb 2016 22:50:12 +0000 (22:50 +0000)]
[DO NOT MERGE ANYWHERE] Null terminate MAP instance information am: 082275e311  -s ours am: db872b8302  -s ours
am: 9e1a656643  -s ours

* commit '9e1a6566437d8a1a4a5d9d90dac84eea4258b61c':
  [DO NOT MERGE ANYWHERE] Null terminate MAP instance information

8 years agoMerge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev am: e225df4abf
Akshay Thakker [Sun, 14 Feb 2016 22:38:38 +0000 (22:38 +0000)]
Merge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev am: e225df4abf
am: eeb99e6b70

* commit 'eeb99e6b70dca78c6644c714bd567aa74d5a782d':
  Fix memory leak in Bluetooth AVRCP JNI

8 years ago[DO NOT MERGE ANYWHERE] Null terminate MAP instance information am: 082275e311 ...
Ajay Panicker [Sun, 14 Feb 2016 22:38:31 +0000 (22:38 +0000)]
[DO NOT MERGE ANYWHERE] Null terminate MAP instance information am: 082275e311  -s ours
am: db872b8302  -s ours

* commit 'db872b83023f757554332968ad449c3f815cb5ca':
  [DO NOT MERGE ANYWHERE] Null terminate MAP instance information

8 years agoMerge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev
Akshay Thakker [Sun, 14 Feb 2016 22:28:09 +0000 (22:28 +0000)]
Merge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev
am: e225df4abf

* commit 'e225df4abfe69c5aa99b6463384afd4a67bd39c8':
  Fix memory leak in Bluetooth AVRCP JNI

8 years ago[DO NOT MERGE ANYWHERE] Null terminate MAP instance information
Ajay Panicker [Sun, 14 Feb 2016 22:27:56 +0000 (22:27 +0000)]
[DO NOT MERGE ANYWHERE] Null terminate MAP instance information
am: 082275e311  -s ours

* commit '082275e31109a282c9ba1a00467d3d11bd65067c':
  [DO NOT MERGE ANYWHERE] Null terminate MAP instance information

8 years agoMerge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev
Akshay Thakker [Sun, 14 Feb 2016 22:17:51 +0000 (22:17 +0000)]
Merge "Fix memory leak in Bluetooth AVRCP JNI" into mnc-dr-dev

8 years agoFix memory leak in Bluetooth AVRCP JNI
Casper Bonde [Mon, 4 Jan 2016 15:13:13 +0000 (16:13 +0100)]
Fix memory leak in Bluetooth AVRCP JNI

When rebasing change-id I3941793f9843abf4afa5ffbee40d1d01c118b29b
later change bbb4110b455b3aa29106d5b4f0a37e1be8e09475 in AOSP,
a memory leak fix was removed by accident. This patch re-enables
the memory leak fix.

Bug: 26383160
Change-Id: I70fd2ea00f6135803f92aad3adda9ce38f47cc32
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
(cherry picked from commit 3a4b8693ee49932247a96099942fa1cecb4670bc)

8 years ago[DO NOT MERGE ANYWHERE] Null terminate MAP instance information
Ajay Panicker [Fri, 8 Jan 2016 00:05:11 +0000 (16:05 -0800)]
[DO NOT MERGE ANYWHERE] Null terminate MAP instance information

Bug: 26437927
Change-Id: I673de7f7c68b9a02b234bb99c6f89c7fc36f90c9

8 years agoAlternate dumpsys output for arguments
Marie Janssen [Mon, 1 Feb 2016 19:04:08 +0000 (11:04 -0800)]
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)

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 10 Feb 2016 13:58:42 +0000 (05:58 -0800)]
Import translations. DO NOT MERGE

Change-Id: Ifea77df1ec767947865ddb5495dc86055aa11218
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 8 Feb 2016 16:33:51 +0000 (08:33 -0800)]
Import translations. DO NOT MERGE

Change-Id: I4986a29f9b6b69b2e01057ff96a7871f193ddcc3
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 8 Feb 2016 13:29:38 +0000 (05:29 -0800)]
Import translations. DO NOT MERGE

Change-Id: Idff8a632bf77478d071b00db27d1dd722dcb4be4
Auto-generated-cl: translation import

8 years agoMerge "Reset ble scans in BatteryStats on start up"
Adam Lesinski [Sat, 6 Feb 2016 00:52:39 +0000 (00:52 +0000)]
Merge "Reset ble scans in BatteryStats on start up"

8 years agoMerge "Enhance AVRCP Absolute Volume control implementation" am: b8a26db0b7
Andre Eisenbach [Fri, 5 Feb 2016 20:03:30 +0000 (20:03 +0000)]
Merge "Enhance AVRCP Absolute Volume control implementation" am: b8a26db0b7
am: 6b82837c0f

* commit '6b82837c0facc5f3c343a00f407abd6ee2312496':
  Enhance AVRCP Absolute Volume control implementation

8 years agoMerge "Enhance AVRCP Absolute Volume control implementation"
Andre Eisenbach [Fri, 5 Feb 2016 20:01:16 +0000 (20:01 +0000)]
Merge "Enhance AVRCP Absolute Volume control implementation"
am: b8a26db0b7

* commit 'b8a26db0b7c4eabcd7784d087793dd8c8f9973a2':
  Enhance AVRCP Absolute Volume control implementation

8 years agoMerge "Enhance AVRCP Absolute Volume control implementation"
Andre Eisenbach [Fri, 5 Feb 2016 19:56:58 +0000 (19:56 +0000)]
Merge "Enhance AVRCP Absolute Volume control implementation"

8 years agoEnhance AVRCP Absolute Volume control implementation
Liejun Tao [Fri, 18 Dec 2015 20:59:01 +0000 (14:59 -0600)]
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

8 years agoEnable contact image over PBAP.
Sanket Agarwal [Wed, 3 Feb 2016 00:06:50 +0000 (16:06 -0800)]
Enable contact image over PBAP.

Bug: b/26862739
Change-Id: Ife6b6724f0105e5ba28e7bf16a90c6c7ccd221ee

8 years agoMerge "Implement createBondOutOfBand" am: c450f89460
Andre Eisenbach [Thu, 4 Feb 2016 02:33:33 +0000 (02:33 +0000)]
Merge "Implement createBondOutOfBand" am: c450f89460
am: 28e370be5b  -s ours

* commit '28e370be5bbe2c54bb91c70f54b05326063e32ce':
  Implement createBondOutOfBand

8 years agoMerge "Implement createBondOutOfBand"
Andre Eisenbach [Thu, 4 Feb 2016 00:29:29 +0000 (00:29 +0000)]
Merge "Implement createBondOutOfBand"
am: c450f89460

* commit 'c450f89460855d6dfeb4d28364091f3b99bab447':
  Implement createBondOutOfBand

8 years agoMerge "Implement createBondOutOfBand"
Andre Eisenbach [Thu, 4 Feb 2016 00:25:35 +0000 (00:25 +0000)]
Merge "Implement createBondOutOfBand"

8 years agoImplement createBondOutOfBand
Jakub Pawlowski [Tue, 29 Dec 2015 21:21:30 +0000 (13:21 -0800)]
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

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 3 Feb 2016 13:16:03 +0000 (05:16 -0800)]
Import translations. DO NOT MERGE

Change-Id: I461b071f2b5b8f814c7d33ff18e996493369c840
Auto-generated-cl: translation import

8 years agoAdd MediaBrowser implementaion for A2DP.
Sanket Agarwal [Fri, 22 Jan 2016 20:26:36 +0000 (12:26 -0800)]
Add MediaBrowser implementaion for A2DP.

MediaBrowser is a way to control playback of any generic media
application and to conform to this framework API the a2dpsink client
uses the same format.

This middleware provides a way to use A2DP via the MediaBrowserService
and a user for A2DP sink should not need to use the raw Bluetooth APIs.

Change-Id: I73b4a51acc469f503286bfd6d33a1766e30fc50d

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr2-dev am: 212bb6f128 -s ours
Geoff Mendal [Tue, 2 Feb 2016 16:26:55 +0000 (16:26 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr2-dev am: 212bb6f128  -s ours
am: d160952d49  -s ours

* commit 'd160952d49c60171bec16ababdef4d7f3e138a1e':
  Import translations. DO NOT MERGE

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr2-dev
Geoff Mendal [Tue, 2 Feb 2016 16:19:30 +0000 (16:19 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr2-dev
am: 212bb6f128  -s ours

* commit '212bb6f128bc72cc1d052ea5ead42fad1fa8bf04':
  Import translations. DO NOT MERGE

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr2-dev
Geoff Mendal [Tue, 2 Feb 2016 16:05:34 +0000 (16:05 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr2-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Tue, 2 Feb 2016 16:01:39 +0000 (10:01 -0600)]
Import translations. DO NOT MERGE

Change-Id: I24e517a832b81ebde981d66d52d4bf75214d9e84
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE am: 8b72673c28 -s ours am: 43f6a005d9 -s ours
Geoff Mendal [Tue, 2 Feb 2016 15:57:19 +0000 (15:57 +0000)]
Import translations. DO NOT MERGE am: 8b72673c28  -s ours am: 43f6a005d9  -s ours
am: 3a35a23169  -s ours

* commit '3a35a23169b2858963967d6bfd0d9b2d07483e20':
  Import translations. DO NOT MERGE

8 years agoImport translations. DO NOT MERGE am: 8b72673c28 -s ours
Geoff Mendal [Tue, 2 Feb 2016 15:48:25 +0000 (15:48 +0000)]
Import translations. DO NOT MERGE am: 8b72673c28  -s ours
am: 43f6a005d9  -s ours

* commit '43f6a005d9634c45d00898c9ed14dd3be4414dd6':
  Import translations. DO NOT MERGE

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Tue, 2 Feb 2016 15:43:30 +0000 (15:43 +0000)]
Import translations. DO NOT MERGE
am: 8b72673c28  -s ours

* commit '8b72673c282ae776113195099236496813b7e0b7':
  Import translations. DO NOT MERGE

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Tue, 2 Feb 2016 15:33:54 +0000 (07:33 -0800)]
Import translations. DO NOT MERGE

Change-Id: I66a6219b85c4b5627c6e716a077eb62d4c36531d
Auto-generated-cl: translation import

8 years agoReset ble scans in BatteryStats on start up
Adam Lesinski [Thu, 28 Jan 2016 20:14:37 +0000 (12:14 -0800)]
Reset ble scans in BatteryStats on start up

Bug:22718669
Change-Id: I89b0106776aadfd383a11c509f6eba660461bd31

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 1 Feb 2016 13:36:08 +0000 (05:36 -0800)]
Import translations. DO NOT MERGE

Change-Id: I7d28f588a7037fab5cafb0f5ca322c4a21ef3695
Auto-generated-cl: translation import

8 years agoMerge "Add android.permission.DUMP for Bluetooth.apk" am: 4518460e7b
Andre Eisenbach [Fri, 29 Jan 2016 21:13:27 +0000 (21:13 +0000)]
Merge "Add android.permission.DUMP for Bluetooth.apk" am: 4518460e7b
am: f211141b3c

* commit 'f211141b3c64010b2b8c5193815087cdef819fe1':
  Add android.permission.DUMP for Bluetooth.apk

8 years agoMerge "Add android.permission.DUMP for Bluetooth.apk"
Andre Eisenbach [Fri, 29 Jan 2016 21:11:31 +0000 (21:11 +0000)]
Merge "Add android.permission.DUMP for Bluetooth.apk"
am: 4518460e7b

* commit '4518460e7b6e065ef161f69ef6d7ed79c3824b4c':
  Add android.permission.DUMP for Bluetooth.apk

8 years agoMerge "Add android.permission.DUMP for Bluetooth.apk"
Andre Eisenbach [Fri, 29 Jan 2016 21:05:31 +0000 (21:05 +0000)]
Merge "Add android.permission.DUMP for Bluetooth.apk"

8 years agoAdd android.permission.DUMP for Bluetooth.apk
Andre Eisenbach [Thu, 28 Jan 2016 21:18:06 +0000 (13:18 -0800)]
Add android.permission.DUMP for Bluetooth.apk

Bug: 26827915
Change-Id: Ia62c0b777225b64279998f234b2df53836b956a4