Set the piid for legacy aaudio streams.

The playback mute notifications need the method AudioTrack#setPlayerIId to be called. This enables it to send the mapping between portId and piid to the AudioService. Therefore, as a side effect this change will enable the playback mute notifications for the legacy aaudio streams.

Test: dumpsys audio
Bug: 235521198
Change-Id: Idd25d5c05b1eda9077ef6f1327ce41b720e1513a
diff --git a/media/libaaudio/src/legacy/AudioStreamTrack.cpp b/media/libaaudio/src/legacy/AudioStreamTrack.cpp
index 09caa5c..62d6abb 100644
--- a/media/libaaudio/src/legacy/AudioStreamTrack.cpp
+++ b/media/libaaudio/src/legacy/AudioStreamTrack.cpp
@@ -552,6 +552,16 @@
     return status;
 }
 
+void AudioStreamTrack::registerPlayerBase() {
+    AudioStream::registerPlayerBase();
+
+    if (mAudioTrack == nullptr) {
+        ALOGW("%s: cannot set piid, AudioTrack is null", __func__);
+        return;
+    }
+    mAudioTrack->setPlayerIId(mPlayerBase->getPlayerIId());
+}
+
 #if AAUDIO_USE_VOLUME_SHAPER
 
 using namespace android::media::VolumeShaper;