Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3224)

Unified Diff: chromeos/dbus/cras_audio_client.cc

Issue 2510093003: Handle audio node stable device ID change (Closed)
Patch Set: fix a typo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/audio_node.cc ('k') | chromeos/dbus/cras_audio_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cras_audio_client.cc
diff --git a/chromeos/dbus/cras_audio_client.cc b/chromeos/dbus/cras_audio_client.cc
index acf24ed48000986a946047fe775bc0bfba902df7..3d63d604e12f89b3668ad7c7118d50d92df107c6 100644
--- a/chromeos/dbus/cras_audio_client.cc
+++ b/chromeos/dbus/cras_audio_client.cc
@@ -426,7 +426,7 @@ class CrasAudioClientImpl : public CrasAudioClient {
bool GetAudioNode(dbus::Response* response,
dbus::MessageReader* array_reader,
- AudioNode *node) {
+ AudioNode* node) {
while (array_reader->HasMoreData()) {
dbus::MessageReader dict_entry_reader(response);
dbus::MessageReader value_reader(response);
@@ -462,8 +462,12 @@ class CrasAudioClientImpl : public CrasAudioClient {
if (!value_reader.PopString(&node->mic_positions))
return false;
} else if (key == cras::kStableDeviceIdProperty) {
- if (!value_reader.PopUint64(&node->stable_device_id))
+ if (!value_reader.PopUint64(&node->stable_device_id_v1))
return false;
+ } else if (key == cras::kStableDeviceIdNewProperty) {
+ if (!value_reader.PopUint64(&node->stable_device_id_v2))
+ return false;
+ node->has_v2_stable_device_id = true;
}
}
« no previous file with comments | « chromeos/dbus/audio_node.cc ('k') | chromeos/dbus/cras_audio_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698