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

Commit b02c7c5c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Refactor requestRefreshConfiguration call"

parents 3e34a553 7507d7bc
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -826,18 +826,19 @@ void NativeInputManager::setInputWindows(JNIEnv* env, jobjectArray windowHandleO
        }
    }

    uint32_t changes = 0;
    bool pointerGesturesEnabledChanged = false;
    { // acquire lock
        AutoMutex _l(mLock);

        if (mLocked.pointerGesturesEnabled != newPointerGesturesEnabled) {
            mLocked.pointerGesturesEnabled = newPointerGesturesEnabled;
            changes |= InputReaderConfiguration::CHANGE_POINTER_GESTURE_ENABLEMENT;
            pointerGesturesEnabledChanged = true;
        }
    } // release lock

    if (changes) {
        mInputManager->getReader()->requestRefreshConfiguration(changes);
    if (pointerGesturesEnabledChanged) {
        mInputManager->getReader()->requestRefreshConfiguration(
                InputReaderConfiguration::CHANGE_POINTER_GESTURE_ENABLEMENT);
    }
}