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

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

Snap for 7202128 from 95650cfa to sc-release

Change-Id: I8df05c8a52caf608de342c9d197a22e777f02964
parents c9e3c9c1 95650cfa
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
#
# mainline files for frameworks/av
# this list used by tools/mainline_hook_*.sh to help separate
# mainline changes vs framework changes, which release at different paces.
#
#
# ignore comment (#) lines and blank lines
# rest are path prefixes starting at root of the project
@@ -24,4 +27,5 @@
media/codec2/components/
media/codecs/
media/extractors/
media/libstagefright/mpeg2ts
media/libstagefright/mpeg2ts/
media/libstagefright/flac/
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ bool JsonWebKey::extractKeysFromJsonWebKeySet(const String8& jsonWebKeySet,
    // all the base64 encoded keys. Each key is also stored separately as
    // a JSON object in mJsonObjects[1..n] where n is the total
    // number of keys in the set.
    if (!isJsonWebKeySet(mJsonObjects[0])) {
    if (mJsonObjects.size() == 0 || !isJsonWebKeySet(mJsonObjects[0])) {
        return false;
    }

+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ bool JsonWebKey::extractKeysFromJsonWebKeySet(const std::string& jsonWebKeySet,
    // all the base64 encoded keys. Each key is also stored separately as
    // a JSON object in mJsonObjects[1..n] where n is the total
    // number of keys in the set.
    if (!isJsonWebKeySet(mJsonObjects[0])) {
    if (mJsonObjects.size() == 0 || !isJsonWebKeySet(mJsonObjects[0])) {
        return false;
    }

+1 −4
Original line number Diff line number Diff line
@@ -42,11 +42,8 @@ cc_library {

    srcs: ["C2SoftFlacEnc.cpp"],

    shared_libs: [
        "libaudioutils",
    ],

    static_libs: [
        "libFLAC",
        "libaudioutils",
    ],
}
+26 −4
Original line number Diff line number Diff line
@@ -1839,8 +1839,7 @@ status_t AudioSystem::setAudioHalPids(const std::vector<pid_t>& pids) {

status_t AudioSystem::getSurroundFormats(unsigned int* numSurroundFormats,
                                         audio_format_t* surroundFormats,
                                         bool* surroundFormatsEnabled,
                                         bool reported) {
                                         bool* surroundFormatsEnabled) {
    if (numSurroundFormats == nullptr || (*numSurroundFormats != 0 &&
                                          (surroundFormats == nullptr ||
                                           surroundFormatsEnabled == nullptr))) {
@@ -1855,8 +1854,8 @@ status_t AudioSystem::getSurroundFormats(unsigned int* numSurroundFormats,
    std::vector<media::audio::common::AudioFormat> surroundFormatsAidl;
    std::vector<bool> surroundFormatsEnabledAidl;
    RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
            aps->getSurroundFormats(reported, &numSurroundFormatsAidl,
                                    &surroundFormatsAidl, &surroundFormatsEnabledAidl)));
            aps->getSurroundFormats(&numSurroundFormatsAidl, &surroundFormatsAidl,
                                    &surroundFormatsEnabledAidl)));

    *numSurroundFormats = VALUE_OR_RETURN_STATUS(
            convertIntegral<unsigned int>(numSurroundFormatsAidl.value));
@@ -1868,6 +1867,29 @@ status_t AudioSystem::getSurroundFormats(unsigned int* numSurroundFormats,
    return OK;
}

status_t AudioSystem::getReportedSurroundFormats(unsigned int* numSurroundFormats,
                                                 audio_format_t* surroundFormats) {
    if (numSurroundFormats == nullptr || (*numSurroundFormats != 0 && surroundFormats == nullptr)) {
        return BAD_VALUE;
    }

    const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
    if (aps == 0) return PERMISSION_DENIED;
    media::Int numSurroundFormatsAidl;
    numSurroundFormatsAidl.value =
            VALUE_OR_RETURN_STATUS(convertIntegral<int32_t>(*numSurroundFormats));
    std::vector<media::audio::common::AudioFormat> surroundFormatsAidl;
    RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
            aps->getReportedSurroundFormats(&numSurroundFormatsAidl, &surroundFormatsAidl)));

    *numSurroundFormats = VALUE_OR_RETURN_STATUS(
            convertIntegral<unsigned int>(numSurroundFormatsAidl.value));
    RETURN_STATUS_IF_ERROR(
            convertRange(surroundFormatsAidl.begin(), surroundFormatsAidl.end(), surroundFormats,
                         aidl2legacy_AudioFormat_audio_format_t));
    return OK;
}

status_t AudioSystem::setSurroundFormatEnabled(audio_format_t audioFormat, bool enabled) {
    const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
    if (aps == 0) return PERMISSION_DENIED;
Loading