diff options
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/InputDispatcher.cpp | 4 | ||||
-rw-r--r-- | services/input/InputDispatcher.h | 4 | ||||
-rw-r--r-- | services/input/tests/InputDispatcher_test.cpp | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 795ab47..9e7a15d 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -3405,6 +3405,7 @@ void InputDispatcher::onANRLocked( & InputDispatcher::doNotifyANRLockedInterruptible); commandEntry->inputApplicationHandle = applicationHandle; commandEntry->inputWindowHandle = windowHandle; + commandEntry->reason = reason; } void InputDispatcher::doNotifyConfigurationChangedInterruptible( @@ -3434,7 +3435,8 @@ void InputDispatcher::doNotifyANRLockedInterruptible( mLock.unlock(); nsecs_t newTimeout = mPolicy->notifyANR( - commandEntry->inputApplicationHandle, commandEntry->inputWindowHandle); + commandEntry->inputApplicationHandle, commandEntry->inputWindowHandle, + commandEntry->reason); mLock.lock(); diff --git a/services/input/InputDispatcher.h b/services/input/InputDispatcher.h index 0273dc4..190e7b2 100644 --- a/services/input/InputDispatcher.h +++ b/services/input/InputDispatcher.h @@ -202,7 +202,8 @@ public: /* Notifies the system that an application is not responding. * Returns a new timeout to continue waiting, or 0 to abort dispatch. */ virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle, - const sp<InputWindowHandle>& inputWindowHandle) = 0; + const sp<InputWindowHandle>& inputWindowHandle, + const String8& reason) = 0; /* Notifies the system that an input channel is unrecoverably broken. */ virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) = 0; @@ -596,6 +597,7 @@ private: KeyEntry* keyEntry; sp<InputApplicationHandle> inputApplicationHandle; sp<InputWindowHandle> inputWindowHandle; + String8 reason; int32_t userActivityEventType; uint32_t seq; bool handled; diff --git a/services/input/tests/InputDispatcher_test.cpp b/services/input/tests/InputDispatcher_test.cpp index ed2b4a5..26b4fab 100644 --- a/services/input/tests/InputDispatcher_test.cpp +++ b/services/input/tests/InputDispatcher_test.cpp @@ -50,7 +50,8 @@ private: } virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle, - const sp<InputWindowHandle>& inputWindowHandle) { + const sp<InputWindowHandle>& inputWindowHandle, + const String8& reason) { return 0; } |