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

Commit 742a9328 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-8cd2a23c-f767-488e-8139-390d1636483f-for-git_oc-mr1-release-43...

release-request-8cd2a23c-f767-488e-8139-390d1636483f-for-git_oc-mr1-release-4323561 snap-temp-L80400000100600189

Change-Id: Ic628b734b90c8f5b717b2d9dbb2d717eba0d398b
parents 68554253 a24f85f9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -61,3 +61,5 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.auto
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*)
$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk/android.hardware.tests*)
+27 −18
Original line number Diff line number Diff line
@@ -464,8 +464,9 @@ void BluetoothHidlTest::sendAndCheckACL(int num_packets, size_t size,

// Return the number of completed packets reported by the controller.
int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
    EXPECT_TRUE(bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived)
                    .no_timeout);
    if (!bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).no_timeout) {
        ALOGW("%s: WaitForCallback timed out.", __func__);
    }
    int packets_processed = 0;
    while (event_queue.size() > 0) {
        hidl_vec<uint8_t> event = event_queue.front();
@@ -604,20 +605,24 @@ TEST_F(BluetoothHidlTest, LoopbackModeSinglePackets) {

  // This should work, but breaks on some current platforms.  Figure out how to
  // grandfather older devices but test new ones.
  int sco_packets_sent = 0;
  if (0 && sco_connection_handles.size() > 0) {
    sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]);
    sco_packets_sent = 1;
    EXPECT_EQ(sco_packets_sent,
              wait_for_completed_packets_event(sco_connection_handles[0]));
    int sco_packets_sent = 1;
    int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]);
    if (sco_packets_sent != completed_packets) {
        ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent,
              completed_packets);
    }
  }

  int acl_packets_sent = 0;
  if (acl_connection_handles.size() > 0) {
    sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]);
    acl_packets_sent = 1;
    EXPECT_EQ(acl_packets_sent,
              wait_for_completed_packets_event(acl_connection_handles[0]));
    int acl_packets_sent = 1;
    int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]);
    if (acl_packets_sent != completed_packets) {
        ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent,
              completed_packets);
    }
  }
}

@@ -633,22 +638,26 @@ TEST_F(BluetoothHidlTest, LoopbackModeBandwidth) {

  // This should work, but breaks on some current platforms.  Figure out how to
  // grandfather older devices but test new ones.
  int sco_packets_sent = 0;
  if (0 && sco_connection_handles.size() > 0) {
    sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length,
                    sco_connection_handles[0]);
    sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH;
    EXPECT_EQ(sco_packets_sent,
              wait_for_completed_packets_event(sco_connection_handles[0]));
    int sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH;
    int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]);
    if (sco_packets_sent != completed_packets) {
        ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent,
              completed_packets);
    }
  }

  int acl_packets_sent = 0;
  if (acl_connection_handles.size() > 0) {
    sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length,
                    acl_connection_handles[0]);
    acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH;
    EXPECT_EQ(acl_packets_sent,
              wait_for_completed_packets_event(acl_connection_handles[0]));
    int acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH;
    int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]);
    if (acl_packets_sent != completed_packets) {
        ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent,
              completed_packets);
    }
  }
}

+25 −0
Original line number Diff line number Diff line
@@ -498,6 +498,21 @@ void portReconfiguration(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
        ASSERT_EQ(msg.data.eventData.data1, kPortIndexOutput);
        if (msg.data.eventData.data2 == OMX_IndexParamPortDefinition ||
            msg.data.eventData.data2 == 0) {
            // Components can send various kinds of port settings changed events
            // all at once. Before committing to a full port reconfiguration,
            // defer any events waiting in the queue to be addressed to a later
            // point.
            android::List<Message> msgQueueDefer;
            while (1) {
                status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT,
                                                  iBuffer, oBuffer);
                if (status !=
                    android::hardware::media::omx::V1_0::Status::TIMED_OUT) {
                    msgQueueDefer.push_back(msg);
                    continue;
                } else
                    break;
            }
            status = omxNode->sendCommand(
                toRawCommandType(OMX_CommandPortDisable), kPortIndexOutput);
            ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
@@ -577,6 +592,16 @@ void portReconfiguration(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
                ASSERT_EQ(msg.data.eventData.data1, OMX_CommandPortEnable);
                ASSERT_EQ(msg.data.eventData.data2, kPortIndexOutput);

                // Push back deferred messages to the list
                android::List<Message>::iterator it = msgQueueDefer.begin();
                while (it != msgQueueDefer.end()) {
                    status = omxNode->dispatchMessage(*it);
                    ASSERT_EQ(
                        status,
                        ::android::hardware::media::omx::V1_0::Status::OK);
                    it++;
                }

                // dispatch output buffers
                for (size_t i = 0; i < oBuffer->size(); i++) {
                    dispatchOutputBuffer(omxNode, oBuffer, i, oPortMode);
+0 −0

Empty file added.

+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ genrule {
    ],
}

cc_library {
cc_test_library {
    name: "android.hardware.tests.bar@1.0",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.tests.bar@1.0_genc++"],
Loading