Track pid for each session
so they can be properly freed.
Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 5a50280..d0df710 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -190,7 +190,8 @@
int sessionId = AUDIO_SESSION_ALLOCATE,
transfer_type transferType = TRANSFER_DEFAULT,
const audio_offload_info_t *offloadInfo = NULL,
- int uid = -1);
+ int uid = -1,
+ pid_t pid = -1);
/* Creates an audio track and registers it with AudioFlinger.
* With this constructor, the track is configured for static buffer mode.
@@ -215,7 +216,8 @@
int sessionId = AUDIO_SESSION_ALLOCATE,
transfer_type transferType = TRANSFER_DEFAULT,
const audio_offload_info_t *offloadInfo = NULL,
- int uid = -1);
+ int uid = -1,
+ pid_t pid = -1);
/* Terminates the AudioTrack and unregisters it from AudioFlinger.
* Also destroys all resources associated with the AudioTrack.
@@ -253,7 +255,8 @@
int sessionId = AUDIO_SESSION_ALLOCATE,
transfer_type transferType = TRANSFER_DEFAULT,
const audio_offload_info_t *offloadInfo = NULL,
- int uid = -1);
+ int uid = -1,
+ pid_t pid = -1);
/* Result of constructing the AudioTrack. This must be checked for successful initialization
* before using any AudioTrack API (except for set()), because using
@@ -757,6 +760,7 @@
sp<DeathNotifier> mDeathNotifier;
uint32_t mSequence; // incremented for each new IAudioTrack attempt
int mClientUid;
+ pid_t mClientPid;
};
class TimedAudioTrack : public AudioTrack