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

Commit e84d9f36 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.

This is a cherry pick from AOSP. Somehow it didn't make it to git_main.

Test: atest VtsVndkHidlBufferpoolV1_0TargetMultiTest
Bug: 218588089
Change-Id: I7d1b1c0c6f6681e1d65fb684782831efac0ea339
parent 6bcce872
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();