OSDN Git Service

android-x86/packages-apps-Bluetooth.git
6 years agoAdapterProperties: Guard unregisterReceiver oreo-x86
Hans Månsson [Fri, 5 May 2017 13:09:33 +0000 (15:09 +0200)]
AdapterProperties: Guard unregisterReceiver

At first boot if Bluetooth is not enabled by default the Bluetooth app
will crash due to a poorly guarded cleanup method.

The root cause is that BluetoothMangerService.handleOnBootPhase() issues
a MESSAGE_GET_NAME_AND_ADDRESS, which inturn will try get device address
and name. When done it will call unbindAndFinish() if Bluetooth is not
enabled. The Bluetooth app then cleans up in preparation for shutdown
and the crash occurs.

Test: def_bluetooth_on => false in SettingsProvider defaults. Build/boot
Change-Id: Idc6817eacd75fcc22d284ca0e54933914b587e49

6 years agoMerge cherrypicks of [2805728, 2805966] into oc-r5-release
android-build-team Robot [Mon, 28 Aug 2017 18:43:19 +0000 (18:43 +0000)]
Merge cherrypicks of [28057282805966] into oc-r5-release

Change-Id: I448e262d28436d256d901d86f9acc3549a6cc9c9

6 years agoImprove AVRCP quality and state handling (1/2)
Ajay Panicker [Tue, 15 Aug 2017 00:18:01 +0000 (17:18 -0700)]
Improve AVRCP quality and state handling (1/2)

Bug: 64749777
Test: Play music with various car kits and see that metadata shows up
      See go/oc-avrcp-sotu - 8/15/20 OC + Patches for further info
Change-Id: Ia9dd450860f5bc54bd249322bfb9762c6235dc32
(cherry picked from commit 6b95520b8fe8a5bd8bc264e06bec51f3591d2507)

6 years agorelease-request-49e3b466-076f-42b5-804c-ed9aab783aec-for-git_oc-r5-release-4255676...
android-build-team Robot [Mon, 14 Aug 2017 21:46:05 +0000 (21:46 +0000)]
release-request-49e3b466-076f-42b5-804c-ed9aab783aec-for-git_oc-r5-release-4255676 snap-temp-L37500000092850661

Change-Id: I0c2724b9c89231dca0166b7e62e9a5a4dfca3d4f

7 years agoMerge cherrypicks of [2622852, 2622193, 2622194, 2622195, 2622933, 2622990, 2622991...
android-build-team Robot [Fri, 28 Jul 2017 17:25:45 +0000 (17:25 +0000)]
Merge cherrypicks of [2622852262219326221942622195262293326229902622991262299226229932622994262299526229342622196262297526229962622997262299826230502622935262219726230512622936262291826229192622999] into oc-release

Change-Id: I89bf7b4c5c90c09ed87de04b0433cdcab101440c

7 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 26 Jul 2017 03:33:12 +0000 (20:33 -0700)]
Import translations. DO NOT MERGE

Change-Id: If44ad0f9a0a92dcce2786f89487d1f6ef92f65a0
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
(cherry picked from commit ad273a8c33d1072df6639efcd87507dbf7064f96)

7 years agoMerge cherrypicks of [2455372, 2455337, 2455612, 2455497] into oc-release
android-build-team Robot [Sat, 24 Jun 2017 01:25:35 +0000 (01:25 +0000)]
Merge cherrypicks of [2455372245533724556122455497] into oc-release

Change-Id: I05e7158e88bbdba30984eac8f4ab0eaf8cb0a55c

7 years agoAVRCP: Fix NowPlayingList looping
Ajay Panicker [Thu, 22 Jun 2017 23:14:58 +0000 (16:14 -0700)]
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)

7 years agoAvrcp: Limit available players changed
Marie Janssen [Thu, 22 Jun 2017 17:01:29 +0000 (10:01 -0700)]
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)

7 years agoAvrcp: refactor addressed player notifications
Marie Janssen [Wed, 21 Jun 2017 18:43:20 +0000 (11:43 -0700)]
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)

7 years agorelease-request-160c4b31-7fa0-4e2b-aabe-85380836a1ce-for-git_oc-release-4129081 snap...
android-build-team Robot [Fri, 23 Jun 2017 07:10:54 +0000 (07:10 +0000)]
release-request-160c4b31-7fa0-4e2b-aabe-85380836a1ce-for-git_oc-release-4129081 snap-temp-L15300000077039010

Change-Id: Id006a211bca6b526a92cc2861e3e2efdc19b8881

7 years agoMerge "Add a missing check for null pointer during closing of PBAP Service" into...
TreeHugger Robot [Thu, 22 Jun 2017 18:28:32 +0000 (18:28 +0000)]
Merge "Add a missing check for null pointer during closing of PBAP Service" into oc-dev

7 years agorelease-request-767e2998-9243-43e0-b656-1acb30ac5115-for-git_oc-release-4124637 snap...
android-build-team Robot [Thu, 22 Jun 2017 07:11:39 +0000 (07:11 +0000)]
release-request-767e2998-9243-43e0-b656-1acb30ac5115-for-git_oc-release-4124637 snap-temp-L74200000076595014

Change-Id: I0c0722e17efcae75db01b8906b68d5374510c7ca

7 years agoAvrcp: redact media info
Marie Janssen [Wed, 21 Jun 2017 20:25:06 +0000 (13:25 -0700)]
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)

7 years agoAdd a missing check for null pointer during closing of PBAP Service
Pavlin Radoslavov [Wed, 21 Jun 2017 16:47:01 +0000 (09:47 -0700)]
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)

7 years agoAVRCP: Prevent multithread issues in cleanup
Marie Janssen [Fri, 16 Jun 2017 15:57:16 +0000 (08:57 -0700)]
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)

7 years agorelease-request-0b3ce0b0-0f38-494b-a590-b594ba11c2d2-for-git_oc-release-4098933 snap...
android-build-team Robot [Wed, 14 Jun 2017 07:10:08 +0000 (07:10 +0000)]
release-request-0b3ce0b0-0f38-494b-a590-b594ba11c2d2-for-git_oc-release-4098933 snap-temp-L41500000074000728

Change-Id: I0bddcefa830bfd24f27f1025a87564e3ab6197d0

7 years agoAVRCP: Workaround Queue ID & metadata updates
Marie Janssen [Mon, 12 Jun 2017 22:04:22 +0000 (15:04 -0700)]
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)

7 years agoWork around/prevent NPE in aclStateChangedCallback.
Calvin On [Fri, 9 Jun 2017 19:23:53 +0000 (12:23 -0700)]
Work around/prevent NPE in aclStateChangedCallback.

Bug: 62440980
Change-Id: I0fd02d80a9cb656a253e537a4ce2dd538df4c48d

7 years agoWork around/prevent NPE in aclStateChangedCallback. am: ffe43a054b
Calvin On [Tue, 13 Jun 2017 17:55:34 +0000 (17:55 +0000)]
Work around/prevent NPE in aclStateChangedCallback. am: ffe43a054b
am: f76c8861f6  -s ours

Change-Id: I2ed091e0c43366f2fdba8931efe35202b78167a7

7 years agorelease-request-7d12f16b-b4a7-4324-8b59-be2d4e07dcb3-for-git_oc-release-4094438 snap...
android-build-team Robot [Tue, 13 Jun 2017 07:09:26 +0000 (07:09 +0000)]
release-request-7d12f16b-b4a7-4324-8b59-be2d4e07dcb3-for-git_oc-release-4094438 snap-temp-L80000000073561277

Change-Id: I4e38097bc3cf02d9dc8a8e24375fa366a4a2dd98

7 years agoMerge "AVRCP: reduce PLAY_INTERVAL_TIMEOUT logspam" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 01:03:03 +0000 (01:03 +0000)]
Merge "AVRCP: reduce PLAY_INTERVAL_TIMEOUT logspam" into oc-dev

7 years agoWork around/prevent NPE in aclStateChangedCallback.
Calvin On [Mon, 12 Jun 2017 23:06:36 +0000 (23:06 +0000)]
Work around/prevent NPE in aclStateChangedCallback.
am: ffe43a054b

Change-Id: I462bc866296419519b059232d64305cf0357ddca

7 years agoAVRCP: reduce PLAY_INTERVAL_TIMEOUT logspam
Marie Janssen [Mon, 12 Jun 2017 20:41:19 +0000 (13:41 -0700)]
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)

7 years agoAVRCP: fix single item queue Now Playing issues
Marie Janssen [Tue, 6 Jun 2017 20:34:33 +0000 (13:34 -0700)]
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)

7 years agoWork around/prevent NPE in aclStateChangedCallback.
Calvin On [Fri, 9 Jun 2017 19:23:53 +0000 (12:23 -0700)]
Work around/prevent NPE in aclStateChangedCallback.

Bug: 62440980
Change-Id: I0fd02d80a9cb656a253e537a4ce2dd538df4c48d

7 years agorelease-request-276f9f52-87fd-4915-bd79-9a2f0ee77433-for-git_oc-release-4090213 snap...
android-build-team Robot [Sun, 11 Jun 2017 07:15:09 +0000 (07:15 +0000)]
release-request-276f9f52-87fd-4915-bd79-9a2f0ee77433-for-git_oc-release-4090213 snap-temp-L31600000073091223

Change-Id: Ia3aa2ea96f76d6f083489e5b53fb9433709bedae

7 years agoPBAP: Implement Folder Version Counter(s)
Hemant Gupta [Thu, 9 Mar 2017 15:00:54 +0000 (20:30 +0530)]
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)

7 years agoPBAP: Add support for PBAP 1.2
Hemant Gupta [Fri, 17 Feb 2017 12:10:50 +0000 (17:40 +0530)]
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)

7 years agoInitialize the RemoteDevice Class Of Device to UNCATEGORIZED
Pavlin Radoslavov [Thu, 8 Jun 2017 23:27:47 +0000 (16:27 -0700)]
Initialize the RemoteDevice Class Of Device to UNCATEGORIZED

Bug: 37615863
Test: Manual with LG HBS1100 headset
Change-Id: I0420cd517f77a4c8965c6651a24f97c29ae99f7f
(cherry picked from commit 2c5969fcd9beac52e4218d66f7f47d8ea901647a)

7 years agorelease-request-011e6329-d82e-4e46-980f-68776b0cd6b9-for-git_oc-release-4080367 snap...
android-build-team Robot [Thu, 8 Jun 2017 10:03:07 +0000 (10:03 +0000)]
release-request-011e6329-d82e-4e46-980f-68776b0cd6b9-for-git_oc-release-4080367 snap-temp-L79900000072116775

Change-Id: Ifdf955676234eacb9e8577d7a33978a013eaffd6

7 years agoPrevent opportunistic scans from changing the hardware filter
Ajay Panicker [Wed, 7 Jun 2017 00:18:00 +0000 (17:18 -0700)]
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)

7 years agorelease-request-777c0f47-a42e-446a-b45c-0bb1aaa9612e-for-git_oc-release-4066915 snap...
android-build-team Robot [Sun, 4 Jun 2017 07:12:45 +0000 (07:12 +0000)]
release-request-777c0f47-a42e-446a-b45c-0bb1aaa9612e-for-git_oc-release-4066915 snap-temp-L92300000070444114

Change-Id: Iaeb8690e1d44b23ecf65f1e2f45d63d5d6d94c6a

7 years agoMerge "AVRCP: Fix issues around trackChanged notification" into oc-dev
TreeHugger Robot [Sat, 3 Jun 2017 03:37:11 +0000 (03:37 +0000)]
Merge "AVRCP: Fix issues around trackChanged notification" into oc-dev

7 years agoJNI: Fix callback obj for Advertisement
Sunny Kapdi [Fri, 2 Jun 2017 05:49:57 +0000 (22:49 -0700)]
JNI: Fix callback obj for Advertisement

Use the Advertise callback object for all Advertisement
calls in jni

Bug: 62305016
Change-Id: I6511decdff48be58c6e45cb6b93932589ca6464e

7 years agoFix OnAdvertisingSetStopped callback not being called
Jakub Pawlowski [Fri, 2 Jun 2017 17:37:13 +0000 (10:37 -0700)]
Fix OnAdvertisingSetStopped callback not being called

Bug: 62031687
Test: sl4a AdvertisingSetTest
Change-Id: I6de84bb68d8c54d8c9685e701ca5ee4967a7b6f0

7 years agoAVRCP: Fix issues around trackChanged notification
Marie Janssen [Tue, 30 May 2017 22:37:51 +0000 (15:37 -0700)]
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

7 years agoMerge "AVRCP: synchronize around mMediaController" into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 23:22:20 +0000 (23:22 +0000)]
Merge "AVRCP: synchronize around mMediaController" into oc-dev

7 years agoMerge cherrypicks of [2344945, 2344576, 2344897, 2344874, 2344907, 2344949, 2345021...
android-build-team Robot [Thu, 1 Jun 2017 20:33:37 +0000 (20:33 +0000)]
Merge cherrypicks of [23449452344576234489723448742344907234494923450212344909234495123448372344962234483823451212345141234512223450622344915] into oc-release

Change-Id: I8355ea5b0dd1077173b2ce03c6f94539e1c58ca2

7 years agoAdd mutex-based protection mechanism to the HFP JNI layer
Pavlin Radoslavov [Sun, 28 May 2017 19:39:08 +0000 (12:39 -0700)]
Add mutex-based protection mechanism to the HFP JNI layer

The protection mechanism is needed to avoid a race condition during
graceful cleaning up of the Bluetooth Handsfree Interface when Bluetooth
is disabled, and native upcalls like connection_state_callback()

Bug: 62116636
Test: manual
Change-Id: I6be4c0bd996beca5252e881c55279ea4f7503e7b
(cherry picked from commit 273651938dbc9bab838945f1524fb588699419c7)
(cherry picked from commit f90eca34df4a5fb45bf4a073d21a02e7b3e616b8)

7 years agoMerge "Improve internal state synchronization of the A2dpStateMachine" into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 20:06:25 +0000 (20:06 +0000)]
Merge "Improve internal state synchronization of the A2dpStateMachine" into oc-dev

7 years agoAdd mutex-based protection mechanism to the HFP JNI layer
Pavlin Radoslavov [Sun, 28 May 2017 19:39:08 +0000 (12:39 -0700)]
Add mutex-based protection mechanism to the HFP JNI layer

The protection mechanism is needed to avoid a race condition during
graceful cleaning up of the Bluetooth Handsfree Interface when Bluetooth
is disabled, and native upcalls like connection_state_callback()

Bug: 62116636
Test: manual
Change-Id: I6be4c0bd996beca5252e881c55279ea4f7503e7b
(cherry picked from commit 273651938dbc9bab838945f1524fb588699419c7)

7 years agoImprove internal state synchronization of the A2dpStateMachine
Pavlin Radoslavov [Thu, 1 Jun 2017 00:26:45 +0000 (17:26 -0700)]
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)

7 years agorelease-request-18270495-77c6-4d95-8968-eb22e3d2fe8b-for-git_oc-release-4057656 snap...
android-build-team Robot [Thu, 1 Jun 2017 07:15:39 +0000 (07:15 +0000)]
release-request-18270495-77c6-4d95-8968-eb22e3d2fe8b-for-git_oc-release-4057656 snap-temp-L93200000069424216

Change-Id: I1272655b57bbfafe4a5f436a0d0c5aef7a549157

7 years agoMerge "Send ble scan type to Batterystats" into oc-dev
Joe Onorato [Wed, 31 May 2017 19:26:45 +0000 (19:26 +0000)]
Merge "Send ble scan type to Batterystats" into oc-dev

7 years agorelease-request-49d3fda6-f7aa-4b8d-aeeb-eed9adb96e3c-for-git_oc-release-4053943 snap...
android-build-team Robot [Wed, 31 May 2017 07:11:43 +0000 (07:11 +0000)]
release-request-49d3fda6-f7aa-4b8d-aeeb-eed9adb96e3c-for-git_oc-release-4053943 snap-temp-L63500000069017893

Change-Id: I7866276a466b8270b179221b12b651951d18a568

7 years agoMerge "Turn off logspam (Bluetooth)" into oc-dev
TreeHugger Robot [Wed, 31 May 2017 01:20:35 +0000 (01:20 +0000)]
Merge "Turn off logspam (Bluetooth)" into oc-dev

7 years agoAVRCP: synchronize around mMediaController
Marie Janssen [Thu, 25 May 2017 16:36:04 +0000 (09:36 -0700)]
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)

7 years agoTurn off logspam (Bluetooth)
Joe Onorato [Wed, 26 Apr 2017 18:03:45 +0000 (11:03 -0700)]
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

7 years agoSwitch GATT scan timekeeping to use a different clock
Ajay Panicker [Wed, 24 May 2017 18:06:49 +0000 (11:06 -0700)]
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)

7 years agoAVRCP: Fix GetItemAttributesCommand
Hemant Gupta [Fri, 12 May 2017 07:29:13 +0000 (12:59 +0530)]
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)

7 years agorelease-request-fca2b5ac-03eb-4055-a549-b4fc2b292b64-for-git_oc-release-4049993 snap...
android-build-team Robot [Sun, 28 May 2017 07:23:31 +0000 (07:23 +0000)]
release-request-fca2b5ac-03eb-4055-a549-b4fc2b292b64-for-git_oc-release-4049993 snap-temp-L04900000068539456

Change-Id: I4b3ea75c9c4a644244723d2950f0b37acb61f406

7 years agoRemove usage of ScopedLocalFrame because it is not needed
Pavlin Radoslavov [Thu, 25 May 2017 18:28:30 +0000 (11:28 -0700)]
Remove usage of ScopedLocalFrame because it is not needed

ScopedLocalFrame is needed only when we need to reserve a large
number of JNI local references. The local references in the corresponding
code is small (below the default limit of 15).

Furthermore, using ScopedLocalFrame itself can be problematic:
it is excessive (reserves 128 entries out of total 512), and does
not check for errors.

Bug: 37969574
Test: Manual
Change-Id: Ia460fe9dd61ce91c940f64a980ec7256774d2fff
(cherry picked from commit ec462d88be2751b9a42adf67123877385562b7d8)

7 years agoFix setFlags/addFlags typo
Marie Janssen [Wed, 24 May 2017 16:33:47 +0000 (09:33 -0700)]
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)

7 years agorelease-request-33b11ddd-d658-45bf-bdb2-acceb024fe39-for-git_oc-release-4042766 snap...
android-build-team Robot [Thu, 25 May 2017 07:16:30 +0000 (07:16 +0000)]
release-request-33b11ddd-d658-45bf-bdb2-acceb024fe39-for-git_oc-release-4042766 snap-temp-L87400000067730042

Change-Id: Ib46ba9820dd9a7a694fac787733ba14ebdcefe43

7 years agoAVRCP: don't remove inactive media controllers
Marie Janssen [Wed, 24 May 2017 15:21:40 +0000 (08:21 -0700)]
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)

7 years agoSend ble scan type to Batterystats
Bookatz [Tue, 23 May 2017 19:36:19 +0000 (12:36 -0700)]
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

7 years agorelease-request-94bbded7-c270-40fa-9a74-fedecfd046c6-for-git_oc-release-4034177 snap...
android-build-team Robot [Tue, 23 May 2017 12:20:20 +0000 (12:20 +0000)]
release-request-94bbded7-c270-40fa-9a74-fedecfd046c6-for-git_oc-release-4034177 snap-temp-L73200000066785187

Change-Id: I4ccd40a7ff9dc0e0ae4abeba34d7692e29078bae

7 years agoMerge "Remove logspam in service state changes" into oc-dev
TreeHugger Robot [Mon, 22 May 2017 22:54:35 +0000 (22:54 +0000)]
Merge "Remove logspam in service state changes" into oc-dev

7 years agoRemove logspam in service state changes
Ajay Panicker [Wed, 17 May 2017 21:18:37 +0000 (14:18 -0700)]
Remove logspam in service state changes

Bug: 37803501
Test: Code still compiles
Change-Id: I9b2055476f74486a3d57957d2c9e6cf7946a139e
(cherry picked from commit edbf12256878f7d1a01c12f44342ec4ffe3405ba)

7 years agoRemove logspam for empty remote device properties
Ajay Panicker [Wed, 17 May 2017 17:58:48 +0000 (10:58 -0700)]
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)

7 years agorelease-request-c72e46fd-06a9-4104-bad3-f7ba8aeb3e1d-for-git_oc-release-4029917 snap...
android-build-team Robot [Sun, 21 May 2017 08:26:53 +0000 (08:26 +0000)]
release-request-c72e46fd-06a9-4104-bad3-f7ba8aeb3e1d-for-git_oc-release-4029917 snap-temp-L38800000066299680

Change-Id: Ib7ca0d85736bf12b6658b5e966edcb17dbcc1a86

7 years agoSettings: Convert notifications to use NotificationChannel (1/2)
Hemant Gupta [Tue, 16 May 2017 11:30:53 +0000 (17:00 +0530)]
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)

7 years agoAVRCP: increase log info density
Marie Janssen [Tue, 16 May 2017 21:50:05 +0000 (14:50 -0700)]
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)

7 years agoMerge "Track BLE Scanning statistics by UID instead of by package name" into oc-dev
TreeHugger Robot [Fri, 19 May 2017 17:45:44 +0000 (17:45 +0000)]
Merge "Track BLE Scanning statistics by UID instead of by package name" into oc-dev

7 years agoAVRCP: send track changed if queue id is the same
Marie Janssen [Wed, 17 May 2017 18:53:41 +0000 (11:53 -0700)]
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)

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 18 May 2017 01:55:45 +0000 (18:55 -0700)]
Import translations. DO NOT MERGE

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

7 years agoTrack BLE Scanning statistics by UID instead of by package name
Ajay Panicker [Mon, 15 May 2017 20:33:41 +0000 (13:33 -0700)]
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

7 years agorelease-request-6c498b17-9310-412b-ad36-3dcf25ffef73-for-git_oc-release-4017086 snap...
android-build-team Robot [Wed, 17 May 2017 07:15:58 +0000 (07:15 +0000)]
release-request-6c498b17-9310-412b-ad36-3dcf25ffef73-for-git_oc-release-4017086 snap-temp-L16500000064871237

Change-Id: I6b2bd36f96b9ca8365659ebeecc8cbd911f9d0ab

7 years agoDiscover primary service by UUID for PTS tests (3/4)
Jakub Pawlowski [Tue, 16 May 2017 17:54:28 +0000 (10:54 -0700)]
Discover primary service by UUID for PTS tests (3/4)

Bug: 38123054
Test: manual
Change-Id: I1547f1dbd46e2d5e9a4e2b953b9973fb3f52a7d7
(cherry picked from commit 84685c0e90fc8ad9453157d6f2b6454974d594e8)

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Tue, 16 May 2017 18:29:36 +0000 (18:29 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Tue, 16 May 2017 15:01:42 +0000 (08:01 -0700)]
Import translations. DO NOT MERGE

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

7 years agorelease-request-ad2b7abc-f489-4c21-891e-cb2cf48c6370-for-git_oc-release-4012004 snap...
android-build-team Robot [Tue, 16 May 2017 07:34:20 +0000 (07:34 +0000)]
release-request-ad2b7abc-f489-4c21-891e-cb2cf48c6370-for-git_oc-release-4012004 snap-temp-L44000000064332402

Change-Id: Ia01d401e2e03ba11deb0ecc6b002dc7dd451b930

7 years agoAVRCP: Fix concurrency issues with MediaController
Marie Janssen [Thu, 11 May 2017 23:19:46 +0000 (16:19 -0700)]
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)

7 years agorelease-request-951b3a8b-6c0c-4d2e-8af4-1c3f7e209f66-for-git_oc-release-4006899 snap...
android-build-team Robot [Sun, 14 May 2017 07:19:28 +0000 (07:19 +0000)]
release-request-951b3a8b-6c0c-4d2e-8af4-1c3f7e209f66-for-git_oc-release-4006899 snap-temp-L39600000063784275

Change-Id: I99d4859b72a315dcc420666242c7304985d50805

7 years agoImport translations. DO NOT MERGE
Bill Yi [Sat, 13 May 2017 01:33:47 +0000 (18:33 -0700)]
Import translations. DO NOT MERGE

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

7 years agoAdd scan result tracking to battery stats
Ajay Panicker [Tue, 9 May 2017 20:36:15 +0000 (13:36 -0700)]
Add scan result tracking to battery stats

Bug: 37720787
Test: View volta stats and check for results
Change-Id: I92f116686fe394b4205fc684fd4872bbc88766a5

7 years agoRemove delay received from audio layer for A2DP state changes
Ajay Panicker [Mon, 8 May 2017 20:11:39 +0000 (13:11 -0700)]
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)

7 years agoFix Periodic Adv method in jni
Sunny Kapdi [Thu, 11 May 2017 00:54:19 +0000 (17:54 -0700)]
Fix Periodic Adv method in jni

Methods related to Periodic Adv are not found
due to incorrect parameter

Bug: 38212326
Change-Id: I97ee8316ff1f292d8c165e1a05499118384605e5
(cherry picked from commit cdf3539edb9002eec7b397ba449a39e097cef2d2)

7 years agoAVRCP: Add PlaybackState for Track Changed
Marie Janssen [Thu, 4 May 2017 22:53:36 +0000 (15:53 -0700)]
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)

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Thu, 11 May 2017 07:09:23 +0000 (00:09 -0700)]
merge in oc-release history after reset to oc-dev

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Thu, 11 May 2017 02:16:11 +0000 (02:16 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "PBAP: Convert notifications to use NotificationChannel" into oc-dev
TreeHugger Robot [Thu, 11 May 2017 01:23:40 +0000 (01:23 +0000)]
Merge "PBAP: Convert notifications to use NotificationChannel" into oc-dev

7 years agoPBAP: Convert notifications to use NotificationChannel
Hemant Gupta [Tue, 9 May 2017 06:30:35 +0000 (12:00 +0530)]
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

7 years agoAVRCP: Prevent concurrent access of Browser List
Marie Janssen [Tue, 2 May 2017 18:31:44 +0000 (11:31 -0700)]
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)

7 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 10 May 2017 19:18:57 +0000 (12:18 -0700)]
Import translations. DO NOT MERGE

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

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Wed, 10 May 2017 07:09:28 +0000 (00:09 -0700)]
merge in oc-release history after reset to oc-dev

7 years agoAVRCP: Stop MediaBrowser attempts on shutdown
Marie Janssen [Fri, 28 Apr 2017 20:23:33 +0000 (13:23 -0700)]
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)

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Tue, 9 May 2017 18:21:22 +0000 (18:21 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Tue, 9 May 2017 12:08:18 +0000 (05:08 -0700)]
Import translations. DO NOT MERGE

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

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Tue, 9 May 2017 07:09:13 +0000 (00:09 -0700)]
merge in oc-release history after reset to oc-dev

7 years agoAVRCP: Fix crash when app change during shutdown
Marie Janssen [Wed, 3 May 2017 22:26:46 +0000 (15:26 -0700)]
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)

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Sun, 7 May 2017 07:09:38 +0000 (00:09 -0700)]
merge in oc-release history after reset to oc-dev

7 years agoAVRCP: set addressed player on key dispatch
Marie Janssen [Thu, 4 May 2017 23:36:06 +0000 (16:36 -0700)]
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)
(cherry picked from commit 0c3b4f4f77175b72061b356a54e2febaf1f19a6a)

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Sat, 6 May 2017 02:29:08 +0000 (19:29 -0700)]
merge in oc-release history after reset to oc-dev

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Sat, 6 May 2017 01:44:04 +0000 (18:44 -0700)]
merge in oc-release history after reset to oc-dev

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Sat, 6 May 2017 01:17:39 +0000 (18:17 -0700)]
merge in oc-release history after reset to oc-dev

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Fri, 5 May 2017 20:48:16 +0000 (13:48 -0700)]
merge in oc-release history after reset to oc-dev

7 years agoAVRCP: set addressed player on key dispatch
Marie Janssen [Thu, 4 May 2017 23:36:06 +0000 (16:36 -0700)]
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)

7 years agomerge in oc-release history after reset to oc-dev
gitbuildkicker [Fri, 5 May 2017 15:23:01 +0000 (08:23 -0700)]
merge in oc-release history after reset to oc-dev