зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061126: Add AVRCP_UID_SIZE to Bluetooth, r=shuang
This constant AVRCP_UID_SIZE replaces the corresponding Bluedroid constant BTRC_UID_SIZE.
This commit is contained in:
Родитель
d9f896e9f7
Коммит
46e6f7feba
|
@ -362,6 +362,10 @@ enum ControlPlayStatus {
|
||||||
PLAYSTATUS_ERROR = 0xFF,
|
PLAYSTATUS_ERROR = 0xFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
AVRCP_UID_SIZE = 8
|
||||||
|
};
|
||||||
|
|
||||||
enum BluetoothAvrcpMediaAttribute {
|
enum BluetoothAvrcpMediaAttribute {
|
||||||
AVRCP_MEDIA_ATTRIBUTE_TITLE,
|
AVRCP_MEDIA_ATTRIBUTE_TITLE,
|
||||||
AVRCP_MEDIA_ATTRIBUTE_ARTIST,
|
AVRCP_MEDIA_ATTRIBUTE_ARTIST,
|
||||||
|
|
|
@ -732,8 +732,8 @@ BluetoothA2dpManager::UpdateMetaData(const nsAString& aTitle,
|
||||||
BluetoothAvrcpNotificationParam param;
|
BluetoothAvrcpNotificationParam param;
|
||||||
// convert to network big endian format
|
// convert to network big endian format
|
||||||
// since track stores as uint8[8]
|
// since track stores as uint8[8]
|
||||||
// 56 = 8 * (BTRC_UID_SIZE -1)
|
// 56 = 8 * (AVRCP_UID_SIZE -1)
|
||||||
for (int i = 0; i < BTRC_UID_SIZE; ++i) {
|
for (int i = 0; i < AVRCP_UID_SIZE; ++i) {
|
||||||
param.mTrack[i] = (aMediaNumber >> (56 - 8 * i));
|
param.mTrack[i] = (aMediaNumber >> (56 - 8 * i));
|
||||||
}
|
}
|
||||||
mTrackChangedNotifyType = AVRCP_NTF_CHANGED;
|
mTrackChangedNotifyType = AVRCP_NTF_CHANGED;
|
||||||
|
@ -836,7 +836,7 @@ BluetoothA2dpManager::UpdateRegisterNotification(BluetoothAvrcpEvent aEvent,
|
||||||
mTrackChangedNotifyType = AVRCP_NTF_INTERIM;
|
mTrackChangedNotifyType = AVRCP_NTF_INTERIM;
|
||||||
// needs to convert to network big endian format since track stores
|
// needs to convert to network big endian format since track stores
|
||||||
// as uint8[8]. 56 = 8 * (BTRC_UID_SIZE -1).
|
// as uint8[8]. 56 = 8 * (BTRC_UID_SIZE -1).
|
||||||
for (int index = 0; index < BTRC_UID_SIZE; ++index) {
|
for (int index = 0; index < AVRCP_UID_SIZE; ++index) {
|
||||||
// We cannot easily check if a track is selected, so whenever A2DP is
|
// We cannot easily check if a track is selected, so whenever A2DP is
|
||||||
// streaming, we assume a track is selected.
|
// streaming, we assume a track is selected.
|
||||||
if (mSinkState == BluetoothA2dpManager::SinkState::SINK_PLAYING) {
|
if (mSinkState == BluetoothA2dpManager::SinkState::SINK_PLAYING) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче