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

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

Snap for 11648291 from d1c156be to 24Q3-release

Change-Id: I6df8163a0be164fe1aafee0769d15af748bc1c5e
parents 3cf0e0db d1c156be
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -174,6 +174,12 @@ constexpr U makeBitPositionFlagMask(std::initializer_list<E> flags) {
    return result;
}

template <typename E, typename U = std::underlying_type_t<E>,
          typename = std::enable_if_t<is_bit_position_enum<E>::value>>
constexpr bool isAnyBitPositionFlagSet(U mask, std::initializer_list<E> flags) {
    return (mask & makeBitPositionFlagMask<E>(flags)) != 0;
}

constexpr int32_t frameCountFromDurationUs(long durationUs, int32_t sampleRateHz) {
    return (static_cast<long long>(durationUs) * sampleRateHz) / 1000000LL;
}
+21 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
using namespace android;
using aidl::android::hardware::audio::common::AudioOffloadMetadata;
using aidl::android::hardware::audio::common::getChannelCount;
using aidl::android::hardware::audio::common::isAnyBitPositionFlagSet;
using aidl::android::hardware::audio::common::isBitPositionFlagSet;
using aidl::android::hardware::audio::common::isTelephonyDeviceType;
using aidl::android::hardware::audio::common::isValidAudioMode;
@@ -85,6 +86,7 @@ using aidl::android::media::audio::common::AudioDeviceDescription;
using aidl::android::media::audio::common::AudioDeviceType;
using aidl::android::media::audio::common::AudioDualMonoMode;
using aidl::android::media::audio::common::AudioFormatType;
using aidl::android::media::audio::common::AudioInputFlags;
using aidl::android::media::audio::common::AudioIoFlags;
using aidl::android::media::audio::common::AudioLatencyMode;
using aidl::android::media::audio::common::AudioMMapPolicy;
@@ -1749,8 +1751,13 @@ TEST_P(AudioCoreModule, TryConnectMissingDevice) {
    for (const auto& port : ports) {
        // Virtual devices may not require external hardware and thus can always be connected.
        if (port.ext.get<AudioPortExt::device>().device.type.connection ==
            AudioDeviceDescription::CONNECTION_VIRTUAL)
                    AudioDeviceDescription::CONNECTION_VIRTUAL ||
            // SCO devices are handled at low level by DSP, may not be able to check actual
            // connection.
            port.ext.get<AudioPortExt::device>().device.type.connection ==
                    AudioDeviceDescription::CONNECTION_BT_SCO) {
            continue;
        }
        AudioPort portWithData = GenerateUniqueDeviceAddress(port), connectedPort;
        ScopedAStatus status = module->connectExternalDevice(portWithData, &connectedPort);
        EXPECT_STATUS(EX_ILLEGAL_STATE, status) << "static port " << portWithData.toString();
@@ -3780,6 +3787,19 @@ class AudioStreamIo : public AudioCoreModuleBase,
        }
        for (const auto& portConfig : allPortConfigs) {
            SCOPED_TRACE(portConfig.toString());
            // Certain types of ports can not be used without special preconditions.
            if ((IOTraits<Stream>::is_input &&
                 isAnyBitPositionFlagSet(
                         portConfig.flags.value().template get<AudioIoFlags::Tag::input>(),
                         {AudioInputFlags::MMAP_NOIRQ, AudioInputFlags::VOIP_TX,
                          AudioInputFlags::HW_HOTWORD})) ||
                (!IOTraits<Stream>::is_input &&
                 isAnyBitPositionFlagSet(
                         portConfig.flags.value().template get<AudioIoFlags::Tag::output>(),
                         {AudioOutputFlags::MMAP_NOIRQ, AudioOutputFlags::VOIP_RX,
                          AudioOutputFlags::COMPRESS_OFFLOAD, AudioOutputFlags::INCALL_MUSIC}))) {
                continue;
            }
            const bool isNonBlocking =
                    IOTraits<Stream>::is_input
                            ? false
+8 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ enum VehicleIgnitionState {
     * Steering wheel is not locked, engine and all accessories are OFF. If
     * car can be in LOCK and OFF state at the same time than HAL must report
     * LOCK state.
     *
     * If IGNITION_STATE is implemented on a BEV, then this state must
     * communicate that the BEV's High Voltage battery is disconnected and thus
     * the vehicle is OFF.
     */
    OFF,
    /**
@@ -38,6 +42,10 @@ enum VehicleIgnitionState {
    /**
     * Ignition is in state ON. Accessories and instrument cluster available,
     * engine might be running or ready to be started.
     *
     * If IGNITION_STATE is implemented on a BEV, then this state must
     * communicate that the BEV's High Voltage battery is connected and thus the
     * vehicle is ON.
     */
    ON,
    /**
+3 −8
Original line number Diff line number Diff line
@@ -81,14 +81,9 @@ interface ISharedSecret {
     *           defined in the standard.  The counter is prefixed and length L appended, as shown
     *           in the construction on page 12 of the standard.  The label string is UTF-8 encoded.
     *
     *     ``K'' is a pre-established shared secret, set up during factory reset.  The mechanism for
     *           establishing this shared secret is implementation-defined.Any method of securely
     *           establishing K that ensures that an attacker cannot obtain or derive its value is
     *           acceptable.
     *
     *           CRITICAL SECURITY REQUIREMENT: All keys created by a IKeymintDevice instance must
     *           be cryptographically bound to the value of K, such that establishing a new K
     *           permanently destroys them.
     *     ``K'' is a pre-established shared secret.  The mechanism for establishing this shared
     *           secret is implementation-defined.  Any method of securely establishing K that
     *           ensures that an attacker cannot obtain or derive its value is acceptable.
     *
     *     ``||'' represents concatenation.
     *