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

Commit 863fd304 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8451755 from 6e0cc925 to tm-release

Change-Id: I956562372ab634b570d1da04b0df0c115b4f08c9
parents eabe6358 6e0cc925
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ cc_fuzz {
        "android.hardware.bluetooth-async",
        "android.hardware.bluetooth-hci",
        "libcutils",
        "libutils",
    ],
    shared_libs: [
        "android.hardware.bluetooth@1.0",
@@ -54,6 +53,7 @@ cc_fuzz {
        "libhidlbase",
        "libbt-vendor-fuzz",
        "liblog",
        "libutils",
    ],
    fuzz_config: {
        cc: [
+2 −3
Original line number Diff line number Diff line
@@ -229,8 +229,7 @@ interface ISensors {
     *
     * @param mem shared memory info data structure.
     * @param out channelHandle The registered channel handle.
     * @return The direct channel handle, which is positive if successfully registered, and -1
     *         otherwise.
     * @return The direct channel handle, which is positive if successfully registered.
     * @return Status::ok on success
     *         EX_ILLEGAL_ARGUMENT if the shared memory information is not consistent.
     *         EX_UNSUPPORTED_OPERATION if this functionality is unsupported.
@@ -245,7 +244,7 @@ interface ISensors {
     * @see OperationMode
     * @param mode The operation mode.
     * @return Status::ok on success
     *         EX_UNSUPPORTED_OPERATION if requested mode is not supported.
     *         EX_UNSUPPORTED_OPERATION or EX_ILLEGAL_ARGUMENT if requested mode is not supported.
     *         EX_SECURITY if the operation is not allowed.
     */
    void setOperationMode(in OperationMode mode);
+0 −8
Original line number Diff line number Diff line
@@ -141,10 +141,6 @@ ScopedAStatus HalProxyAidl::configDirectReport(int32_t in_sensorHandle,
        *_aidl_return = reportToken;
      });

  if (!status.isOk()) {
    *_aidl_return = -1;
  }

  return status;
}

@@ -216,10 +212,6 @@ HalProxyAidl::registerDirectChannel(const ISensors::SharedMemInfo &in_mem,
  native_handle_delete(const_cast<native_handle_t *>(
      sharedMemInfo.memoryHandle.getNativeHandle()));

  if (!status.isOk()) {
    *_aidl_return = -1;
  }

  return status;
}

+16 −10
Original line number Diff line number Diff line
@@ -599,10 +599,12 @@ TEST_P(SensorsAidlTest, SetOperationMode) {
        ASSERT_TRUE(getSensors()->setOperationMode(ISensors::OperationMode::DATA_INJECTION).isOk());
        ASSERT_TRUE(getSensors()->setOperationMode(ISensors::OperationMode::NORMAL).isOk());
    } else {
        ASSERT_EQ(getSensors()
      int errorCode =
          getSensors()
              ->setOperationMode(ISensors::OperationMode::DATA_INJECTION)
                          .getExceptionCode(),
                  EX_UNSUPPORTED_OPERATION);
              .getExceptionCode();
      ASSERT_TRUE((errorCode == EX_UNSUPPORTED_OPERATION) ||
                  (errorCode == EX_ILLEGAL_ARGUMENT));
    }
}

@@ -939,11 +941,11 @@ void SensorsAidlTest::checkRateLevel(const SensorInfo& sensor, int32_t directCha
        ASSERT_TRUE(status.isOk());
        if (rateLevel != ISensors::RateLevel::STOP) {
          ASSERT_GT(*reportToken, 0);
        }
    } else {
      ASSERT_EQ(status.getExceptionCode(), EX_ILLEGAL_ARGUMENT);
    }
}
}

void SensorsAidlTest::queryDirectChannelSupport(ISensors::SharedMemInfo::SharedMemType memType,
                                                bool* supportsSharedMemType,
@@ -982,11 +984,15 @@ void SensorsAidlTest::verifyRegisterDirectChannel(
    ::ndk::ScopedAStatus status = registerDirectChannel(mem->getSharedMemInfo(), &channelHandle);
    if (supportsSharedMemType) {
        ASSERT_TRUE(status.isOk());
        ASSERT_EQ(channelHandle, 0);
        ASSERT_GT(channelHandle, 0);

        // Verify that the memory has been zeroed
        for (size_t i = 0; i < mem->getSize(); i++) {
          ASSERT_EQ(buffer[i], 0x00);
        }
    } else {
        int32_t error = supportsAnyDirectChannel ? EX_ILLEGAL_ARGUMENT : EX_UNSUPPORTED_OPERATION;
        ASSERT_EQ(status.getExceptionCode(), error);
        ASSERT_EQ(channelHandle, -1);
    }
    *directChannelHandle = channelHandle;
}
@@ -1038,7 +1044,7 @@ void SensorsAidlTest::verifyConfigure(const SensorInfo& sensor,
        // Verify that a sensor handle of -1 is only acceptable when using RateLevel::STOP
        ndk::ScopedAStatus status = configDirectReport(-1 /* sensorHandle */, directChannelHandle,
                                                       ISensors::RateLevel::NORMAL, &reportToken);
        ASSERT_EQ(status.getServiceSpecificError(), android::BAD_VALUE);
        ASSERT_EQ(status.getExceptionCode(), EX_ILLEGAL_ARGUMENT);

        status = configDirectReport(-1 /* sensorHandle */, directChannelHandle,
                                    ISensors::RateLevel::STOP, &reportToken);
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ aidl_interface {
    vendor_available: true,
    srcs: ["android/hardware/uwb/*.aidl"],
    stability: "vintf",
    host_supported: true,
    backend: {
        java: {
            sdk_version: "module_Tiramisu",
Loading