Merge "audio: Fix streamCommon nullptr check in VTS" am: 7c2b5ed7a1

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2363001

Change-Id: If837b42d2f31ed0919b2269039e2a6a8c60ac2d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mikhail Naganov
2022-12-17 02:03:20 +00:00
committed by Automerger Merge Worker

View File

@@ -1835,10 +1835,10 @@ class AudioStream : public AudioCoreModule {
ASSERT_NO_FATAL_FAILURE(stream.SetUp(module.get(), kDefaultBufferSizeFrames));
std::shared_ptr<IStreamCommon> streamCommon1;
EXPECT_IS_OK(stream.get()->getStreamCommon(&streamCommon1));
EXPECT_NE(nullptr, streamCommon1);
std::shared_ptr<IStreamCommon> streamCommon2;
EXPECT_IS_OK(stream.get()->getStreamCommon(&streamCommon2));
EXPECT_NE(nullptr, streamCommon2);
ASSERT_NE(nullptr, streamCommon1);
ASSERT_NE(nullptr, streamCommon2);
EXPECT_EQ(streamCommon1->asBinder(), streamCommon2->asBinder())
<< "getStreamCommon must return the same interface instance across invocations";
}