diff options
author | Glenn Kasten <gkasten@google.com> | 2013-10-07 09:27:06 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-10-07 09:31:15 -0700 |
commit | 35295078ab59c8c5d143a54d5a55557c3ca62c51 (patch) | |
tree | ebe936c19f0de4024fa1982fcd286a803bc3b951 /media/libmedia/IAudioFlinger.cpp | |
parent | 61f58c0c8d02970ea6d94ff816c54bf606f755b7 (diff) | |
parent | 9a7d11f07dc19327892915f0bfecce758d2f4098 (diff) | |
download | frameworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.zip frameworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.tar.gz frameworks_av-35295078ab59c8c5d143a54d5a55557c3ca62c51.tar.bz2 |
resolved conflicts for merge of 9a7d11f0 to master
Change-Id: Ie4d101185a93d37ec280f608813ad62a077a584e
Diffstat (limited to 'media/libmedia/IAudioFlinger.cpp')
-rw-r--r-- | media/libmedia/IAudioFlinger.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index 5d81e5d..f9f6779 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -184,6 +184,17 @@ public: } lStatus = reply.readInt32(); record = interface_cast<IAudioRecord>(reply.readStrongBinder()); + if (lStatus == NO_ERROR) { + if (record == 0) { + ALOGE("openRecord should have returned an IAudioRecord"); + lStatus = UNKNOWN_ERROR; + } + } else { + if (record != 0) { + ALOGE("openRecord returned an IAudioRecord but with status %d", lStatus); + record.clear(); + } + } } if (status != NULL) { *status = lStatus; @@ -802,6 +813,7 @@ status_t BnAudioFlinger::onTransact( status_t status; sp<IAudioRecord> record = openRecord(input, sampleRate, format, channelMask, frameCount, &flags, tid, &sessionId, &status); + LOG_ALWAYS_FATAL_IF((record != 0) != (status == NO_ERROR)); reply->writeInt32(flags); reply->writeInt32(sessionId); reply->writeInt32(status); |