AudioSystem: fix missing audio port callbacks after audioserver restart
Commit ce3d1106 dropped the enablement of audio port and volume group
callbacks after registering the audio policy client when reconnecting
audiosystem to a new instance of audio policy service.
Bug: 378032953
Test: make
Flag: EXEMPT bug fix
Change-Id: Ia20bbe206b6073c37b4ba07faf3b906abd52b549
diff --git a/media/libaudioclient/AudioSystem.cpp b/media/libaudioclient/AudioSystem.cpp
index dcfef45..d511dc2 100644
--- a/media/libaudioclient/AudioSystem.cpp
+++ b/media/libaudioclient/AudioSystem.cpp
@@ -985,6 +985,8 @@
// TODO(b/375280520) consider registerClient() within mMutex lock.
const int64_t token = IPCThreadState::self()->clearCallingIdentity();
aps->registerClient(client);
+ aps->setAudioPortCallbacksEnabled(client->isAudioPortCbEnabled());
+ aps->setAudioVolumeGroupCallbacksEnabled(client->isAudioVolumeGroupCbEnabled());
IPCThreadState::self()->restoreCallingIdentity(token);
}