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

Commit c739660f authored by The Android Open Source Project's avatar The Android Open Source Project Committed by Alex Ray
Browse files

auto import from //depot/cupcake/@137055

parent 3fec108e
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -1103,14 +1103,20 @@ struct ResTable_config
    
    // Return true if 'this' can be considered a match for the parameters in 
    // 'settings'.
    // Note this is asymetric.  A default piece of data will match every request
    // but a request for the default should not match odd specifics
    // (ie, request with no mcc should not match a particular mcc's data)
    // settings is the requested settings
    inline bool match(const ResTable_config& settings) const {
        if (imsi != 0) {
            if (settings.mcc != 0 && mcc != 0
                && mcc != settings.mcc) {
            if ((settings.mcc != 0 && mcc != 0
                 && mcc != settings.mcc) || 
                (settings.mcc == 0 && mcc != 0)) {
                return false;
            }
            if (settings.mnc != 0 && mnc != 0
                && mnc != settings.mnc) {
            if ((settings.mnc != 0 && mnc != 0
                 && mnc != settings.mnc) ||
                (settings.mnc == 0 && mnc != 0)) {
                return false;
            }
        }
+3 −1
Original line number Diff line number Diff line
@@ -896,6 +896,7 @@ void ReadWriteLock::unlockForRead()
{
    mLock.lock();
    if (mNumReaders == 0) {
        mLock.unlock();
        LOG(LOG_WARN, "thread",
            "WARNING: unlockForRead requested, but not locked\n");
        return;
@@ -961,6 +962,7 @@ void ReadWriteLock::unlockForWrite()
{
    mLock.lock();
    if (mNumWriters == 0) {
        mLock.unlock();
        LOG(LOG_WARN, "thread",
            "WARNING: unlockForWrite requested, but not locked\n");
        return;
@@ -972,7 +974,7 @@ void ReadWriteLock::unlockForWrite()
    //printf(" wrlk held %.3f msec\n",
    //    (double) mDebugTimer.durationUsecs() / 1000.0);
#endif
    // mWriteWaiter.signal();       // should other writers get first dibs?
    mWriteWaiter.signal();         // should other writers get first dibs?
    //printf("+++ signaling readers (if any)\n");
    mReadWaiter.broadcast();        // wake all readers (if any)
    mLock.unlock();