audiopolicy: Restrict the audio port callbacks by both uid and pid

Set audio port callbacks enabled is called by each client, the client
maybe has the same uid by different pid. And the notification clients
is indexed with uid in services, so the audio port cb may be disabled
by other pid. Here is the steps to reproduce this issue:
1.make a phone call
2.plugin a USB headset
3.check the P-sensor
The screen will get black when the hand is near to the phone, actually
it should not get black

Test: make, take a photo, record a video and play video; make a call,
plugin a USB headset, and check the P-sensor status.

Change-Id: I43970ca0ab78ef47bd34d1c7191d4c8c3ad2b793
Signed-off-by: luochaojiang <luochaojiang@xiaomi.com>
2 files changed