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

Commit 4c766cce authored by Jeff Brown's avatar Jeff Brown
Browse files

resolved conflicts for merge of df3cccf3 to master

Change-Id: I425496a9fc4e9cbc50ad6938e9dccb14827d9558
parents 84915907 a3690d4f
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1046,6 +1046,9 @@ private:
    // Splitting motion events across windows.
    // Splitting motion events across windows.
    MotionEntry* splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet32 pointerIds);
    MotionEntry* splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet32 pointerIds);


    // Reset and drop everything the dispatcher is doing.
    void resetAndDropEverythingLocked(const char* reason);

    // Dump state.
    // Dump state.
    void dumpDispatchStateLocked(String8& dump);
    void dumpDispatchStateLocked(String8& dump);
    void logDispatchStateLocked();
    void logDispatchStateLocked();
+23 −1
Original line number Original line Diff line number Diff line
@@ -1305,6 +1305,9 @@ Failed:
    }
    }


Unresponsive:
Unresponsive:
    // Reset temporary touch state to ensure we release unnecessary references to input channels.
    mTempTouchState.reset();

    nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
    nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
    updateDispatchStatisticsLocked(currentTime, entry,
    updateDispatchStatisticsLocked(currentTime, entry,
            injectionResult, timeSpentWaitingForApplication);
            injectionResult, timeSpentWaitingForApplication);
@@ -2593,6 +2596,10 @@ void InputDispatcher::setInputDispatchMode(bool enabled, bool frozen) {
                resetANRTimeoutsLocked();
                resetANRTimeoutsLocked();
            }
            }


            if (mDispatchEnabled && !enabled) {
                resetAndDropEverythingLocked("dispatcher is being disabled");
            }

            mDispatchEnabled = enabled;
            mDispatchEnabled = enabled;
            mDispatchFrozen = frozen;
            mDispatchFrozen = frozen;
            changed = true;
            changed = true;
@@ -2687,6 +2694,21 @@ bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel,
    return true;
    return true;
}
}


void InputDispatcher::resetAndDropEverythingLocked(const char* reason) {
#if DEBUG_FOCUS
    LOGD("Resetting and dropping all events (%s).", reason);
#endif

    synthesizeCancelationEventsForAllConnectionsLocked(InputState::CANCEL_ALL_EVENTS, reason);

    resetKeyRepeatLocked();
    releasePendingEventLocked();
    drainInboundQueueLocked();
    resetTargetsLocked();

    mTouchState.reset();
}

void InputDispatcher::logDispatchStateLocked() {
void InputDispatcher::logDispatchStateLocked() {
    String8 dump;
    String8 dump;
    dumpDispatchStateLocked(dump);
    dumpDispatchStateLocked(dump);