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

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

Snap for 6462261 from 424c068d to mainline-release

Change-Id: I6a96758bd6663613b2ae345305716671bc4a461a
parents b1c826da 424c068d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ bool contains(std::map<T, std::set<U>> *mapOfSet, T key, U value) {
}

#ifdef __ANDROID_VNDK__
static constexpr uint32_t kSeqIdVndkBit = 1 << 31;
static constexpr uint32_t kSeqIdVndkBit = 1U << 31;
#else
static constexpr uint32_t kSeqIdVndkBit = 0;
#endif
+6 −1
Original line number Diff line number Diff line
@@ -339,7 +339,12 @@ void BlockIterator::advance() {
}

void BlockIterator::advance_l() {
    for (;;) {
    for (int i = 0;; i++) {
        if (i == 1000) {
            ALOGE("no block found after %d iterations, stopping", i);
            mCluster = NULL;
            break;
        }
        long res = mCluster->GetEntry(mBlockEntryIndex, mBlockEntry);
        ALOGV("GetEntry returned %ld", res);

+4 −2
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ public:
        data.writeInterfaceToken(BpMediaSource::getInterfaceDescriptor());
        status_t ret = remote()->transact(GETFORMAT, data, &reply);
        if (ret == NO_ERROR) {
            AutoMutex _l(mLock);
            AutoMutex _l(mBpLock);
            mMetaData = MetaData::createFromParcel(reply);
            return mMetaData;
        }
@@ -224,7 +224,7 @@ private:
    // XXX: could we use this for caching, or does metadata change on the fly?
    sp<MetaData> mMetaData;
    // ensure synchronize access to mMetaData
    Mutex mLock;
    Mutex mBpLock;

    // Cache all IMemory objects received from MediaExtractor.
    // We gc IMemory objects that are no longer active (referenced by a MediaBuffer).
@@ -301,6 +301,7 @@ status_t BnMediaSource::onTransact(
            CHECK_INTERFACE(IMediaSource, data, reply);
            mGroup->signalBufferReturned(nullptr);
            status_t status = stop();
            AutoMutex _l(mBnLock);
            mIndexCache.reset();
            mBuffersSinceStop = 0;
            return status;
@@ -340,6 +341,7 @@ status_t BnMediaSource::onTransact(
                    && len == sizeof(opts)
                    && data.read((void *)&opts, len) == NO_ERROR;

            AutoMutex _l(mBnLock);
            mGroup->signalBufferReturned(nullptr);
            mIndexCache.gc();
            size_t inlineTransferSize = 0;
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ protected:

private:
    uint32_t mBuffersSinceStop; // Buffer tracking variable
    Mutex mBnLock; // to guard readMultiple against concurrent access to the buffer cache

    std::unique_ptr<MediaBufferGroup> mGroup;

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_MODULE:= libaudiopolicyservice

LOCAL_CFLAGS += -fvisibility=hidden
LOCAL_CFLAGS += -Wall -Werror
LOCAL_CFLAGS += -Wall -Werror -Wthread-safety

include $(BUILD_SHARED_LIBRARY)
Loading