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

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

Snap for 12173239 from 05f8e379 to 24Q4-release

Change-Id: I0bb26fa6ac87bf7e9f1d80e18030eefd30664601
parents b5321ff5 05f8e379
Loading
Loading
Loading
Loading
+16 −5
Original line number Diff line number Diff line
@@ -714,11 +714,14 @@ TEST_P(SensorsAidlTest, CallInitializeTwice) {
        return;  // Exit early if setting up the new environment failed
    }

    size_t numNonOneShotAndNonSpecialSensors = getNonOneShotAndNonSpecialSensors().size();
    activateAllSensors(true);
    // Verify that the old environment does not receive any events
    EXPECT_EQ(getEnvironment()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), 0);
    if (numNonOneShotAndNonSpecialSensors > 0) {
        // Verify that the new event queue receives sensor events
        EXPECT_GE(newEnv.get()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), kNumEvents);
    }
    activateAllSensors(false);

    // Cleanup the test environment
@@ -733,7 +736,9 @@ TEST_P(SensorsAidlTest, CallInitializeTwice) {

    // Ensure that the original environment is receiving events
    activateAllSensors(true);
    if (numNonOneShotAndNonSpecialSensors > 0) {
        EXPECT_GE(getEnvironment()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), kNumEvents);
    }
    activateAllSensors(false);
}

@@ -743,7 +748,11 @@ TEST_P(SensorsAidlTest, CleanupConnectionsOnInitialize) {
    // Verify that events are received
    constexpr useconds_t kCollectionTimeoutUs = 1000 * 1000;  // 1s
    constexpr int32_t kNumEvents = 1;

    size_t numNonOneShotAndNonSpecialSensors = getNonOneShotAndNonSpecialSensors().size();
    if (numNonOneShotAndNonSpecialSensors > 0) {
        ASSERT_GE(getEnvironment()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), kNumEvents);
    }

    // Clear the active sensor handles so they are not disabled during TearDown
    auto handles = mSensorHandles;
@@ -757,7 +766,9 @@ TEST_P(SensorsAidlTest, CleanupConnectionsOnInitialize) {
    // Verify no events are received until sensors are re-activated
    ASSERT_EQ(getEnvironment()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), 0);
    activateAllSensors(true);
    if (numNonOneShotAndNonSpecialSensors > 0) {
        ASSERT_GE(getEnvironment()->collectEvents(kCollectionTimeoutUs, kNumEvents).size(), kNumEvents);
    }

    // Disable sensors
    activateAllSensors(false);
+7 −5
Original line number Diff line number Diff line
@@ -137,15 +137,17 @@ int32_t TvInputAidlTest::getNumNotIn(vector<int32_t>& nums) {
}

bool TvInputAidlTest::isValidHandle(NativeHandle& handle) {
    if (handle.fds.empty()) {
    if (handle.fds.empty() && handle.ints.empty()) {
        return false;
    }
    if (!(handle.fds.empty())) {
        for (size_t i = 0; i < handle.fds.size(); i++) {
            int fd = handle.fds[i].get();
            if (fcntl(fd, F_GETFL) < 0) {
                return false;
            }
        }
    }
    return true;
}

+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ package android.hardware.uwb.fira_android;
@Backing(type="int") @VintfStability
enum UwbVendorCapabilityTlvTypes {
  SUPPORTED_POWER_STATS_QUERY = 0xC0,
  SUPPORTED_ANTENNA_MODES = 0xC1,
  CCC_SUPPORTED_CHAPS_PER_SLOT = 0xA0,
  CCC_SUPPORTED_SYNC_CODES = 0xA1,
  CCC_SUPPORTED_HOPPING_CONFIG_MODES_AND_SEQUENCES = 0xA2,
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
package android.hardware.uwb.fira_android;
@Backing(type="long") @VintfStability
enum UwbVendorCapabilityTlvValues {
  ANTENNA_MODE_OMNI = 1,
  ANTENNA_MODE_DIRECTIONAL = (1 << 1) /* 2 */,
  UWB_CONFIG_0 = 0,
  UWB_CONFIG_1 = 1,
  PULSE_SHAPE_SYMMETRICAL_ROOT_RAISED_COSINE = 0,
+7 −0
Original line number Diff line number Diff line
@@ -41,6 +41,13 @@ enum UwbVendorCapabilityTlvTypes {
     */
    SUPPORTED_POWER_STATS_QUERY = 0xC0,

    /**
     * 1 byte bitmask to indicate which antennas modes are supported.
     * 0x01 = "Omni mode",
     * 0x02 = "Directional mode",
     */
    SUPPORTED_ANTENNA_MODES = 0xC1,

    /*********************************************
     * CCC specific
     ********************************************/
Loading