aaudio: reduce error logging, improve security
Reduce log spam and error logging as part of the Green Log effort.
Replace logging of addresses with integer IDs.
Bug: 36785118
Bug: 122073229
Bug: 130569151
Test: Open an AAudio stream at 44100 and look at logcat.
Test: adb shell write_sine_callback -pl -r44100
Test: adb logcat | grep -i aaudio | grep " E "
Test: Should see no "E" logs from AAudio.
Test: Should see no addresses from AAudio.
Change-Id: I1d4e0bc349095f818fad52603d2bb8e7317d3681
Merged-In: I1d4e0bc349095f818fad52603d2bb8e7317d3681
(cherry picked from commit 7ba46558fbd28b555ba751837cc9094a7c785f75)
diff --git a/services/oboeservice/AAudioClientTracker.cpp b/services/oboeservice/AAudioClientTracker.cpp
index 7264a9b..83704ba 100644
--- a/services/oboeservice/AAudioClientTracker.cpp
+++ b/services/oboeservice/AAudioClientTracker.cpp
@@ -101,7 +101,7 @@
aaudio_result_t
AAudioClientTracker::registerClientStream(pid_t pid, sp<AAudioServiceStreamBase> serviceStream) {
aaudio_result_t result = AAUDIO_OK;
- ALOGV("registerClientStream(%d, %p)\n", pid, serviceStream.get());
+ ALOGV("registerClientStream(%d,)\n", pid);
std::lock_guard<std::mutex> lock(mLock);
sp<NotificationClient> notificationClient = mNotificationClients[pid];
if (notificationClient == 0) {
@@ -118,27 +118,23 @@
aaudio_result_t
AAudioClientTracker::unregisterClientStream(pid_t pid,
sp<AAudioServiceStreamBase> serviceStream) {
- ALOGV("unregisterClientStream(%d, %p)\n", pid, serviceStream.get());
+ ALOGV("unregisterClientStream(%d,)\n", pid);
std::lock_guard<std::mutex> lock(mLock);
auto it = mNotificationClients.find(pid);
if (it != mNotificationClients.end()) {
- ALOGV("unregisterClientStream(%d, %p) found NotificationClient\n",
- pid, serviceStream.get());
+ ALOGV("unregisterClientStream(%d,) found NotificationClient\n", pid);
it->second->unregisterClientStream(serviceStream);
} else {
- ALOGE("unregisterClientStream(%d, %p) missing NotificationClient\n",
- pid, serviceStream.get());
+ ALOGE("unregisterClientStream(%d,) missing NotificationClient\n", pid);
}
return AAUDIO_OK;
}
AAudioClientTracker::NotificationClient::NotificationClient(pid_t pid)
: mProcessId(pid) {
- //ALOGD("NotificationClient(%d) created %p\n", pid, this);
}
AAudioClientTracker::NotificationClient::~NotificationClient() {
- //ALOGD("~NotificationClient() destroyed %p\n", this);
}
int32_t AAudioClientTracker::NotificationClient::getStreamCount() {