Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4bd2461 authored by Devin Moore's avatar Devin Moore
Browse files

Don't expect HIDL bufferpool service when HIDL is not supported

New devices have no HIDL support so the service will not be available.
Skip the test in that case.

Test: atest VtsVndkHidlBufferpoolV1_0TargetMultiTest
Bug: 218588089
Change-Id: I3610014cfe93defebceae9bd4ac87b1d1678054e
parent 464f4447
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
#include <hidl/LegacySupport.h>
#include <hidl/ServiceManagement.h>
#include <hidl/Status.h>
#include <signal.h>
#include <sys/types.h>
@@ -36,6 +37,7 @@

using android::hardware::configureRpcThreadpool;
using android::hardware::hidl_handle;
using android::hardware::isHidlSupported;
using android::hardware::media::bufferpool::V1_0::IClientManager;
using android::hardware::media::bufferpool::V1_0::ResultStatus;
using android::hardware::media::bufferpool::V1_0::implementation::BufferId;
@@ -178,6 +180,7 @@ TEST_F(BufferpoolMultiTest, TransferBuffer) {
  ResultStatus status;
  PipeMessage message;

  if (!isHidlSupported()) GTEST_SKIP() << "HIDL is not supported on this device";
  ASSERT_TRUE(receiveMessage(mResultPipeFds, &message));

  android::sp<IClientManager> receiver = IClientManager::getService();