commit | 203b0533f82b75105e7b8ab2c68c3663397069fe | [log] [tgz] |
---|---|---|
author | Dongwon Kang <dwkang@google.com> | Wed Nov 14 10:51:37 2018 -0800 |
committer | Dongwon Kang <dwkang@google.com> | Wed Nov 14 16:19:37 2018 -0800 |
tree | a7399a313a1132abeabd4e2c56caaf2d9f8f2a21 | |
parent | 54cbc29870372ef9d5763c2a86d86508bc351d1b [diff] |
Fix MediaPlayer2AudioOutput::setAudioAttributes() regression from Ibe19c8a259c735ea2b5822f769babaf4 Test: MediaPlayer2Test Change-Id: If1deea900858ba817021d573d859ca8e733e260e
diff --git a/media/libmediaplayer2/MediaPlayer2AudioOutput.cpp b/media/libmediaplayer2/MediaPlayer2AudioOutput.cpp index 3040c2d..7457d84 100644 --- a/media/libmediaplayer2/MediaPlayer2AudioOutput.cpp +++ b/media/libmediaplayer2/MediaPlayer2AudioOutput.cpp
@@ -243,9 +243,7 @@ void MediaPlayer2AudioOutput::setAudioAttributes(const jobject attributes) { Mutex::Autolock lock(mLock); - if (attributes != nullptr) { - sp<JObjectHolder> x = new JObjectHolder(attributes); - } + mAttributes = (attributes == nullptr) ? nullptr : new JObjectHolder(attributes); } audio_stream_type_t MediaPlayer2AudioOutput::getAudioStreamType() const {