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

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

Snap for 13025002 from c0fd9b54 to 25Q2-release

Change-Id: I2c6d21b52624708c29a9ca1edb20dc7fdef9f31b
parents 3d2a89be c0fd9b54
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1382,14 +1382,16 @@ int main(int argc, char* const argv[]) {
            }
            break;
        case 'd':
            if (const auto id = android::DisplayId::fromValue<PhysicalDisplayId>(atoll(optarg));
                id && SurfaceComposerClient::getPhysicalDisplayToken(*id)) {
                gPhysicalDisplayId = *id;
        {
            const PhysicalDisplayId id = android::PhysicalDisplayId::fromValue(atoll(optarg));
            if (SurfaceComposerClient::getPhysicalDisplayToken(id)) {
                gPhysicalDisplayId = id;
                break;
            }

            fprintf(stderr, "Invalid physical display ID\n");
            return 2;
        }
        case 'S':
            gSecureDisplay = true;
            break;
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ flag {
    bug: "367667349"
}

# unused
flag {
    name: "bluetooth_mac_address_anonymization"
    namespace: "media_audio"
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
package: "com.android.media.audioserver"
container: "system"

# shipped 24Q3
flag {
    name: "conditionally_ignore_preferred_input_device"
    namespace: "media_audio"
@@ -37,6 +38,7 @@ flag {
    bug: "364923030"
}

# shipped 24Q3
flag {
    name: "fdtostring_timeout_fix"
    namespace: "media_audio"
+8 −1
Original line number Diff line number Diff line
@@ -188,6 +188,11 @@ AudioDeviceDescription make_ADD_UsbHeadset() {
                                       AudioDeviceDescription::CONNECTION_USB());
}

AudioDeviceDescription make_ADD_MultichannelGroup() {
    return make_AudioDeviceDescription(AudioDeviceType::OUT_MULTICHANNEL_GROUP,
                                       AudioDeviceDescription::CONNECTION_VIRTUAL());
}

AudioDevice make_AudioDevice(const AudioDeviceDescription& type,
                             const AudioDeviceAddress& address) {
    AudioDevice result;
@@ -481,7 +486,9 @@ INSTANTIATE_TEST_SUITE_P(
                                         std::vector<uint8_t>{192, 168, 0, 1})),
                make_AudioDevice(make_ADD_UsbHeadset(),
                                 AudioDeviceAddress::make<AudioDeviceAddress::Tag::alsa>(
                                         std::vector<int32_t>{1, 2}))));
                                         std::vector<int32_t>{1, 2})),
                make_AudioDevice(make_ADD_MultichannelGroup(),
                                 AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>("id"))));

TEST(AnonymizedBluetoothAddressRoundTripTest, Legacy2Aidl2Legacy) {
    const std::vector<uint8_t> sAnonymizedAidlAddress {0xFD, 0xFF, 0xFF, 0xFF, 0xAB, 0xCD};
+18 −9
Original line number Diff line number Diff line
@@ -412,6 +412,9 @@ TEST_F(AudioSystemTest, DevicesForRoleAndStrategy) {
                outputDevices.push_back(outputDevice);
            }
        }
        if (outputDevices.empty()) {
            GTEST_SKIP() << "No speaker device found";
        }
        EXPECT_EQ(OK, AudioSystem::setDevicesRoleForStrategy(mediaStrategy.getId(),
                                                             DEVICE_ROLE_PREFERRED, outputDevices));
        EXPECT_EQ(OK, AudioSystem::getDevicesForRoleAndStrategy(mediaStrategy.getId(),
@@ -425,8 +428,13 @@ TEST_F(AudioSystemTest, DevicesForRoleAndStrategy) {
}

TEST_F(AudioSystemTest, VolumeIndexForAttributes) {
    std::optional<audio_port_v7> speakerPort = audio_port_v7{};
    if (getPortByAttributes(AUDIO_PORT_ROLE_SINK, AUDIO_PORT_TYPE_DEVICE, AUDIO_DEVICE_OUT_SPEAKER,
                            "", *speakerPort) != OK) {
        speakerPort.reset();
    }
    AudioVolumeGroupVector groups;
    EXPECT_EQ(OK, AudioSystem::listAudioVolumeGroups(groups));
    ASSERT_EQ(OK, AudioSystem::listAudioVolumeGroups(groups));
    for (const auto& group : groups) {
        if (group.getAudioAttributes().empty()) continue;
        const audio_attributes_t attr = group.getAudioAttributes()[0];
@@ -438,16 +446,17 @@ TEST_F(AudioSystemTest, VolumeIndexForAttributes) {
        EXPECT_EQ(OK, AudioSystem::getVolumeGroupFromAudioAttributes(attr, vg));
        EXPECT_EQ(group.getId(), vg);

        if (speakerPort.has_value()) {
            int index;
        EXPECT_EQ(OK,
                  AudioSystem::getVolumeIndexForAttributes(attr, index, AUDIO_DEVICE_OUT_SPEAKER));

            EXPECT_EQ(OK, AudioSystem::getVolumeIndexForAttributes(attr, index,
                                                                   speakerPort->ext.device.type));
            int indexTest;
            EXPECT_EQ(OK, AudioSystem::getStreamVolumeIndex(streamType, &indexTest,
                                                        AUDIO_DEVICE_OUT_SPEAKER));
                                                            speakerPort->ext.device.type));
            EXPECT_EQ(index, indexTest);
        }
    }
}

TEST_F(AudioSystemTest, DevicesRoleForCapturePreset) {
    std::vector<struct audio_port_v7> ports;
Loading