Loading services/inputflinger/InputDispatcher.cpp +0 −12 Original line number Original line Diff line number Diff line Loading @@ -3814,18 +3814,6 @@ void InputDispatcher::monitor() { } } // --- InputDispatcher::Queue --- template <typename T> uint32_t InputDispatcher::Queue<T>::count() const { uint32_t result = 0; for (const T* entry = head; entry; entry = entry->next) { result += 1; } return result; } // --- InputDispatcher::InjectionState --- // --- InputDispatcher::InjectionState --- InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) : InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) : Loading services/inputflinger/InputDispatcher.h +9 −2 Original line number Original line Diff line number Diff line Loading @@ -606,8 +606,9 @@ private: struct Queue { struct Queue { T* head; T* head; T* tail; T* tail; uint32_t entryCount; inline Queue() : head(NULL), tail(NULL) { inline Queue() : head(NULL), tail(NULL), entryCount(0) { } } inline bool isEmpty() const { inline bool isEmpty() const { Loading @@ -615,6 +616,7 @@ private: } } inline void enqueueAtTail(T* entry) { inline void enqueueAtTail(T* entry) { entryCount++; entry->prev = tail; entry->prev = tail; if (tail) { if (tail) { tail->next = entry; tail->next = entry; Loading @@ -626,6 +628,7 @@ private: } } inline void enqueueAtHead(T* entry) { inline void enqueueAtHead(T* entry) { entryCount++; entry->next = head; entry->next = head; if (head) { if (head) { head->prev = entry; head->prev = entry; Loading @@ -637,6 +640,7 @@ private: } } inline void dequeue(T* entry) { inline void dequeue(T* entry) { entryCount--; if (entry->prev) { if (entry->prev) { entry->prev->next = entry->next; entry->prev->next = entry->next; } else { } else { Loading @@ -650,6 +654,7 @@ private: } } inline T* dequeueAtHead() { inline T* dequeueAtHead() { entryCount--; T* entry = head; T* entry = head; head = entry->next; head = entry->next; if (head) { if (head) { Loading @@ -660,7 +665,9 @@ private: return entry; return entry; } } uint32_t count() const; uint32_t count() const { return entryCount; } }; }; /* Specifies which events are to be canceled and why. */ /* Specifies which events are to be canceled and why. */ Loading Loading
services/inputflinger/InputDispatcher.cpp +0 −12 Original line number Original line Diff line number Diff line Loading @@ -3814,18 +3814,6 @@ void InputDispatcher::monitor() { } } // --- InputDispatcher::Queue --- template <typename T> uint32_t InputDispatcher::Queue<T>::count() const { uint32_t result = 0; for (const T* entry = head; entry; entry = entry->next) { result += 1; } return result; } // --- InputDispatcher::InjectionState --- // --- InputDispatcher::InjectionState --- InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) : InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) : Loading
services/inputflinger/InputDispatcher.h +9 −2 Original line number Original line Diff line number Diff line Loading @@ -606,8 +606,9 @@ private: struct Queue { struct Queue { T* head; T* head; T* tail; T* tail; uint32_t entryCount; inline Queue() : head(NULL), tail(NULL) { inline Queue() : head(NULL), tail(NULL), entryCount(0) { } } inline bool isEmpty() const { inline bool isEmpty() const { Loading @@ -615,6 +616,7 @@ private: } } inline void enqueueAtTail(T* entry) { inline void enqueueAtTail(T* entry) { entryCount++; entry->prev = tail; entry->prev = tail; if (tail) { if (tail) { tail->next = entry; tail->next = entry; Loading @@ -626,6 +628,7 @@ private: } } inline void enqueueAtHead(T* entry) { inline void enqueueAtHead(T* entry) { entryCount++; entry->next = head; entry->next = head; if (head) { if (head) { head->prev = entry; head->prev = entry; Loading @@ -637,6 +640,7 @@ private: } } inline void dequeue(T* entry) { inline void dequeue(T* entry) { entryCount--; if (entry->prev) { if (entry->prev) { entry->prev->next = entry->next; entry->prev->next = entry->next; } else { } else { Loading @@ -650,6 +654,7 @@ private: } } inline T* dequeueAtHead() { inline T* dequeueAtHead() { entryCount--; T* entry = head; T* entry = head; head = entry->next; head = entry->next; if (head) { if (head) { Loading @@ -660,7 +665,9 @@ private: return entry; return entry; } } uint32_t count() const; uint32_t count() const { return entryCount; } }; }; /* Specifies which events are to be canceled and why. */ /* Specifies which events are to be canceled and why. */ Loading