Loading services/inputflinger/dispatcher/InputDispatcher.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -1297,7 +1297,7 @@ bool InputDispatcher::isAppSwitchKeyEvent(const KeyEntry& keyEntry) { (keyEntry.policyFlags & POLICY_FLAG_PASS_TO_USER); } bool InputDispatcher::isAppSwitchPendingLocked() { bool InputDispatcher::isAppSwitchPendingLocked() const { return mAppSwitchDueTime != LLONG_MAX; } Loading Loading @@ -5411,7 +5411,7 @@ void InputDispatcher::resetAndDropEverythingLocked(const char* reason) { mReplacedKeys.clear(); } void InputDispatcher::logDispatchStateLocked() { void InputDispatcher::logDispatchStateLocked() const { std::string dump; dumpDispatchStateLocked(dump); Loading @@ -5423,7 +5423,7 @@ void InputDispatcher::logDispatchStateLocked() { } } std::string InputDispatcher::dumpPointerCaptureStateLocked() { std::string InputDispatcher::dumpPointerCaptureStateLocked() const { std::string dump; dump += StringPrintf(INDENT "Pointer Capture Requested: %s\n", Loading @@ -5441,7 +5441,7 @@ std::string InputDispatcher::dumpPointerCaptureStateLocked() { return dump; } void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { void InputDispatcher::dumpDispatchStateLocked(std::string& dump) const { dump += StringPrintf(INDENT "DispatchEnabled: %s\n", toString(mDispatchEnabled)); dump += StringPrintf(INDENT "DispatchFrozen: %s\n", toString(mDispatchFrozen)); dump += StringPrintf(INDENT "InputFilterEnabled: %s\n", toString(mInputFilterEnabled)); Loading Loading @@ -5544,7 +5544,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { // Dump recently dispatched or dropped events from oldest to newest. if (!mRecentQueue.empty()) { dump += StringPrintf(INDENT "RecentQueue: length=%zu\n", mRecentQueue.size()); for (std::shared_ptr<EventEntry>& entry : mRecentQueue) { for (const std::shared_ptr<EventEntry>& entry : mRecentQueue) { dump += INDENT2; dump += entry->getDescription(); dump += StringPrintf(", age=%" PRId64 "ms\n", ns2ms(currentTime - entry->eventTime)); Loading @@ -5567,7 +5567,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { // Dump inbound events from oldest to newest. if (!mInboundQueue.empty()) { dump += StringPrintf(INDENT "InboundQueue: length=%zu\n", mInboundQueue.size()); for (std::shared_ptr<EventEntry>& entry : mInboundQueue) { for (const std::shared_ptr<EventEntry>& entry : mInboundQueue) { dump += INDENT2; dump += entry->getDescription(); dump += StringPrintf(", age=%" PRId64 "ms\n", ns2ms(currentTime - entry->eventTime)); Loading Loading @@ -5649,7 +5649,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { dump += mLatencyAggregator.dump(INDENT2); } void InputDispatcher::dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) { void InputDispatcher::dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) const { const size_t numMonitors = monitors.size(); for (size_t i = 0; i < numMonitors; i++) { const Monitor& monitor = monitors[i]; Loading services/inputflinger/dispatcher/InputDispatcher.h +5 −5 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ private: nsecs_t mAppSwitchDueTime GUARDED_BY(mLock); bool isAppSwitchKeyEvent(const KeyEntry& keyEntry); bool isAppSwitchPendingLocked() REQUIRES(mLock); bool isAppSwitchPendingLocked() const REQUIRES(mLock); void resetPendingAppSwitchLocked(bool handled) REQUIRES(mLock); // Blocked event latency optimization. Drops old events when the user intends Loading Loading @@ -647,10 +647,10 @@ private: void resetAndDropEverythingLocked(const char* reason) REQUIRES(mLock); // Dump state. void dumpDispatchStateLocked(std::string& dump) REQUIRES(mLock); void dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors); void logDispatchStateLocked() REQUIRES(mLock); std::string dumpPointerCaptureStateLocked() REQUIRES(mLock); void dumpDispatchStateLocked(std::string& dump) const REQUIRES(mLock); void dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) const; void logDispatchStateLocked() const REQUIRES(mLock); std::string dumpPointerCaptureStateLocked() const REQUIRES(mLock); // Registration. void removeMonitorChannelLocked(const sp<IBinder>& connectionToken) REQUIRES(mLock); Loading services/inputflinger/dispatcher/LatencyAggregator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ void LatencyAggregator::processSlowEvent(const InputEventTimeline& timeline) { } } std::string LatencyAggregator::dump(const char* prefix) { std::string LatencyAggregator::dump(const char* prefix) const { std::string sketchDump = StringPrintf("%s Sketches:\n", prefix); for (size_t i = 0; i < SketchIndex::SIZE; i++) { const int64_t numDown = mDownSketches[i]->num_values(); Loading services/inputflinger/dispatcher/LatencyAggregator.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public: */ void processTimeline(const InputEventTimeline& timeline) override; std::string dump(const char* prefix); std::string dump(const char* prefix) const; ~LatencyAggregator(); Loading services/inputflinger/dispatcher/LatencyTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ void LatencyTracker::reportAndPruneMatureRecords(nsecs_t newEventTime) { } } std::string LatencyTracker::dump(const char* prefix) { std::string LatencyTracker::dump(const char* prefix) const { return StringPrintf("%sLatencyTracker:\n", prefix) + StringPrintf("%s mTimelines.size() = %zu\n", prefix, mTimelines.size()) + StringPrintf("%s mEventTimes.size() = %zu\n", prefix, mEventTimes.size()); Loading Loading
services/inputflinger/dispatcher/InputDispatcher.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -1297,7 +1297,7 @@ bool InputDispatcher::isAppSwitchKeyEvent(const KeyEntry& keyEntry) { (keyEntry.policyFlags & POLICY_FLAG_PASS_TO_USER); } bool InputDispatcher::isAppSwitchPendingLocked() { bool InputDispatcher::isAppSwitchPendingLocked() const { return mAppSwitchDueTime != LLONG_MAX; } Loading Loading @@ -5411,7 +5411,7 @@ void InputDispatcher::resetAndDropEverythingLocked(const char* reason) { mReplacedKeys.clear(); } void InputDispatcher::logDispatchStateLocked() { void InputDispatcher::logDispatchStateLocked() const { std::string dump; dumpDispatchStateLocked(dump); Loading @@ -5423,7 +5423,7 @@ void InputDispatcher::logDispatchStateLocked() { } } std::string InputDispatcher::dumpPointerCaptureStateLocked() { std::string InputDispatcher::dumpPointerCaptureStateLocked() const { std::string dump; dump += StringPrintf(INDENT "Pointer Capture Requested: %s\n", Loading @@ -5441,7 +5441,7 @@ std::string InputDispatcher::dumpPointerCaptureStateLocked() { return dump; } void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { void InputDispatcher::dumpDispatchStateLocked(std::string& dump) const { dump += StringPrintf(INDENT "DispatchEnabled: %s\n", toString(mDispatchEnabled)); dump += StringPrintf(INDENT "DispatchFrozen: %s\n", toString(mDispatchFrozen)); dump += StringPrintf(INDENT "InputFilterEnabled: %s\n", toString(mInputFilterEnabled)); Loading Loading @@ -5544,7 +5544,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { // Dump recently dispatched or dropped events from oldest to newest. if (!mRecentQueue.empty()) { dump += StringPrintf(INDENT "RecentQueue: length=%zu\n", mRecentQueue.size()); for (std::shared_ptr<EventEntry>& entry : mRecentQueue) { for (const std::shared_ptr<EventEntry>& entry : mRecentQueue) { dump += INDENT2; dump += entry->getDescription(); dump += StringPrintf(", age=%" PRId64 "ms\n", ns2ms(currentTime - entry->eventTime)); Loading @@ -5567,7 +5567,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { // Dump inbound events from oldest to newest. if (!mInboundQueue.empty()) { dump += StringPrintf(INDENT "InboundQueue: length=%zu\n", mInboundQueue.size()); for (std::shared_ptr<EventEntry>& entry : mInboundQueue) { for (const std::shared_ptr<EventEntry>& entry : mInboundQueue) { dump += INDENT2; dump += entry->getDescription(); dump += StringPrintf(", age=%" PRId64 "ms\n", ns2ms(currentTime - entry->eventTime)); Loading Loading @@ -5649,7 +5649,7 @@ void InputDispatcher::dumpDispatchStateLocked(std::string& dump) { dump += mLatencyAggregator.dump(INDENT2); } void InputDispatcher::dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) { void InputDispatcher::dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) const { const size_t numMonitors = monitors.size(); for (size_t i = 0; i < numMonitors; i++) { const Monitor& monitor = monitors[i]; Loading
services/inputflinger/dispatcher/InputDispatcher.h +5 −5 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ private: nsecs_t mAppSwitchDueTime GUARDED_BY(mLock); bool isAppSwitchKeyEvent(const KeyEntry& keyEntry); bool isAppSwitchPendingLocked() REQUIRES(mLock); bool isAppSwitchPendingLocked() const REQUIRES(mLock); void resetPendingAppSwitchLocked(bool handled) REQUIRES(mLock); // Blocked event latency optimization. Drops old events when the user intends Loading Loading @@ -647,10 +647,10 @@ private: void resetAndDropEverythingLocked(const char* reason) REQUIRES(mLock); // Dump state. void dumpDispatchStateLocked(std::string& dump) REQUIRES(mLock); void dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors); void logDispatchStateLocked() REQUIRES(mLock); std::string dumpPointerCaptureStateLocked() REQUIRES(mLock); void dumpDispatchStateLocked(std::string& dump) const REQUIRES(mLock); void dumpMonitors(std::string& dump, const std::vector<Monitor>& monitors) const; void logDispatchStateLocked() const REQUIRES(mLock); std::string dumpPointerCaptureStateLocked() const REQUIRES(mLock); // Registration. void removeMonitorChannelLocked(const sp<IBinder>& connectionToken) REQUIRES(mLock); Loading
services/inputflinger/dispatcher/LatencyAggregator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ void LatencyAggregator::processSlowEvent(const InputEventTimeline& timeline) { } } std::string LatencyAggregator::dump(const char* prefix) { std::string LatencyAggregator::dump(const char* prefix) const { std::string sketchDump = StringPrintf("%s Sketches:\n", prefix); for (size_t i = 0; i < SketchIndex::SIZE; i++) { const int64_t numDown = mDownSketches[i]->num_values(); Loading
services/inputflinger/dispatcher/LatencyAggregator.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ public: */ void processTimeline(const InputEventTimeline& timeline) override; std::string dump(const char* prefix); std::string dump(const char* prefix) const; ~LatencyAggregator(); Loading
services/inputflinger/dispatcher/LatencyTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ void LatencyTracker::reportAndPruneMatureRecords(nsecs_t newEventTime) { } } std::string LatencyTracker::dump(const char* prefix) { std::string LatencyTracker::dump(const char* prefix) const { return StringPrintf("%sLatencyTracker:\n", prefix) + StringPrintf("%s mTimelines.size() = %zu\n", prefix, mTimelines.size()) + StringPrintf("%s mEventTimes.size() = %zu\n", prefix, mEventTimes.size()); Loading