Loading audio/2.0/default/Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ Return<Result> Device::setParameters(const hidl_vec<ParameterValue>& parameters) } Return<void> Device::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { analyzeStatus("dump", mDevice->dump(mDevice, fd->data[0])); } return Void(); Loading audio/2.0/default/Stream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ Return<Result> Stream::setParameters(const hidl_vec<ParameterValue>& parameters) } Return<void> Stream::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { analyzeStatus("dump", mStream->dump(mStream, fd->data[0])); } return Void(); Loading audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,11 @@ TEST_F(AudioPrimaryHidlTest, debugDump) { testDebugDump([this](const auto& handle){ return device->debugDump(handle); }); } TEST_F(AudioPrimaryHidlTest, debugDumpInvalidArguments) { doc::test("Check that the hal dump doesn't crash on invalid arguments"); ASSERT_OK(device->debugDump(hidl_handle())); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////// open{Output,Input}Stream ////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -809,6 +814,10 @@ TEST_IO_STREAM(DebugDump, "Check that a stream can dump its state without error", testDebugDump([this](const auto& handle){ return stream->debugDump(handle); })) TEST_IO_STREAM(DebugDumpInvalidArguments, "Check that the stream dump doesn't crash on invalid arguments", ASSERT_OK(stream->debugDump(hidl_handle()))) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////// addRemoveEffect /////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading audio/effect/2.0/default/EffectsFactory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ Return<void> EffectsFactory::createEffect( } Return<void> EffectsFactory::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { EffectDumpEffects(fd->data[0]); } return Void(); Loading audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ using android::hardware::audio::effect::V2_0::Result; using android::hardware::MQDescriptorSync; using android::hardware::Return; using android::hardware::Void; using android::hardware::hidl_handle; using android::hardware::hidl_memory; using android::hardware::hidl_string; using android::hardware::hidl_vec; Loading Loading @@ -142,6 +143,12 @@ TEST_F(AudioEffectsFactoryHidlTest, GetDescriptor) { EXPECT_TRUE(ret.isOk()); } TEST_F(AudioEffectsFactoryHidlTest, DebugDumpInvalidArgument) { description("Verify that debugDump doesn't crash on invalid arguments"); Return<void> ret = effectsFactory->debugDump(hidl_handle()); ASSERT_TRUE(ret.isOk()); } // Equalizer effect is required by CDD, but only the type is fixed. // This is the same UUID as AudioEffect.EFFECT_TYPE_EQUALIZER in Java. static const Uuid EQUALIZER_EFFECT_TYPE = { Loading Loading
audio/2.0/default/Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ Return<Result> Device::setParameters(const hidl_vec<ParameterValue>& parameters) } Return<void> Device::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { analyzeStatus("dump", mDevice->dump(mDevice, fd->data[0])); } return Void(); Loading
audio/2.0/default/Stream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ Return<Result> Stream::setParameters(const hidl_vec<ParameterValue>& parameters) } Return<void> Stream::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { analyzeStatus("dump", mStream->dump(mStream, fd->data[0])); } return Void(); Loading
audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,11 @@ TEST_F(AudioPrimaryHidlTest, debugDump) { testDebugDump([this](const auto& handle){ return device->debugDump(handle); }); } TEST_F(AudioPrimaryHidlTest, debugDumpInvalidArguments) { doc::test("Check that the hal dump doesn't crash on invalid arguments"); ASSERT_OK(device->debugDump(hidl_handle())); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////// open{Output,Input}Stream ////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -809,6 +814,10 @@ TEST_IO_STREAM(DebugDump, "Check that a stream can dump its state without error", testDebugDump([this](const auto& handle){ return stream->debugDump(handle); })) TEST_IO_STREAM(DebugDumpInvalidArguments, "Check that the stream dump doesn't crash on invalid arguments", ASSERT_OK(stream->debugDump(hidl_handle()))) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////// addRemoveEffect /////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading
audio/effect/2.0/default/EffectsFactory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ Return<void> EffectsFactory::createEffect( } Return<void> EffectsFactory::debugDump(const hidl_handle& fd) { if (fd->numFds == 1) { if (fd.getNativeHandle() != nullptr && fd->numFds == 1) { EffectDumpEffects(fd->data[0]); } return Void(); Loading
audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ using android::hardware::audio::effect::V2_0::Result; using android::hardware::MQDescriptorSync; using android::hardware::Return; using android::hardware::Void; using android::hardware::hidl_handle; using android::hardware::hidl_memory; using android::hardware::hidl_string; using android::hardware::hidl_vec; Loading Loading @@ -142,6 +143,12 @@ TEST_F(AudioEffectsFactoryHidlTest, GetDescriptor) { EXPECT_TRUE(ret.isOk()); } TEST_F(AudioEffectsFactoryHidlTest, DebugDumpInvalidArgument) { description("Verify that debugDump doesn't crash on invalid arguments"); Return<void> ret = effectsFactory->debugDump(hidl_handle()); ASSERT_TRUE(ret.isOk()); } // Equalizer effect is required by CDD, but only the type is fixed. // This is the same UUID as AudioEffect.EFFECT_TYPE_EQUALIZER in Java. static const Uuid EQUALIZER_EFFECT_TYPE = { Loading