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

Commit efc56a72 authored by Andy Hung's avatar Andy Hung
Browse files

MediaMetrics: Fix clang-tidy narrowing warning

Test: compiles
Bug: 182410845
Change-Id: I49d4362cccd49c5afc983ad03736607164d0195e
parent 25f406f9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -967,10 +967,10 @@ void AudioAnalytics::AAudioStreamInfo::endAAudioStream(
        if (channelMask != 0) {
            switch (direction) {
                case 1: // Output, keep sync with AudioTypes#getAAudioDirection()
                    channelCount = audio_channel_count_from_out_mask(channelMask);
                    channelCount = (int32_t)audio_channel_count_from_out_mask(channelMask);
                    break;
                case 2: // Input, keep sync with AudioTypes#getAAudioDirection()
                    channelCount = audio_channel_count_from_in_mask(channelMask);
                    channelCount = (int32_t)audio_channel_count_from_in_mask(channelMask);
                    break;
                default:
                    ALOGW("Invalid direction %d", direction);
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ std::vector<uint8_t> base64DecodeNoPad(std::string& str) {
    std::vector<uint8_t> buf(str.length() / 4 * 3, 0);
    size_t size = buf.size();
    if (decodeBase64(buf.data(), &size, str.c_str()) && size <= buf.size()) {
        buf.erase(buf.begin() + size, buf.end());
        buf.erase(buf.begin() + (ptrdiff_t)size, buf.end());
        return buf;
    }
    return {};