Loading core/java/android/app/ActivityManagerNative.java +5 −2 Original line number Diff line number Diff line Loading @@ -1917,7 +1917,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM data.enforceInterface(IActivityManager.descriptor); int pid = data.readInt(); boolean aboveSystem = data.readInt() != 0; long res = inputDispatchingTimedOut(pid, aboveSystem); String reason = data.readString(); long res = inputDispatchingTimedOut(pid, aboveSystem, reason); reply.writeNoException(); reply.writeLong(res); return true; Loading Loading @@ -4462,12 +4463,14 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public long inputDispatchingTimedOut(int pid, boolean aboveSystem) throws RemoteException { public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(pid); data.writeInt(aboveSystem ? 1 : 0); data.writeString(reason); mRemote.transact(INPUT_DISPATCHING_TIMED_OUT_TRANSACTION, data, reply, 0); reply.readException(); long res = reply.readInt(); Loading core/java/android/app/IActivityManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,8 @@ public interface IActivityManager extends IInterface { public void requestBugReport() throws RemoteException; public long inputDispatchingTimedOut(int pid, boolean aboveSystem) throws RemoteException; public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason) throws RemoteException; public Bundle getAssistContextExtras(int requestType) throws RemoteException; Loading core/java/android/view/IApplicationToken.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ interface IApplicationToken void windowsDrawn(); void windowsVisible(); void windowsGone(); boolean keyDispatchingTimedOut(); boolean keyDispatchingTimedOut(String reason); long getKeyDispatchingTimeout(); } services/input/InputDispatcher.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -3405,6 +3405,7 @@ void InputDispatcher::onANRLocked( & InputDispatcher::doNotifyANRLockedInterruptible); commandEntry->inputApplicationHandle = applicationHandle; commandEntry->inputWindowHandle = windowHandle; commandEntry->reason = reason; } void InputDispatcher::doNotifyConfigurationChangedInterruptible( Loading Loading @@ -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(); Loading services/input/InputDispatcher.h +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -596,6 +597,7 @@ private: KeyEntry* keyEntry; sp<InputApplicationHandle> inputApplicationHandle; sp<InputWindowHandle> inputWindowHandle; String8 reason; int32_t userActivityEventType; uint32_t seq; bool handled; Loading Loading
core/java/android/app/ActivityManagerNative.java +5 −2 Original line number Diff line number Diff line Loading @@ -1917,7 +1917,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM data.enforceInterface(IActivityManager.descriptor); int pid = data.readInt(); boolean aboveSystem = data.readInt() != 0; long res = inputDispatchingTimedOut(pid, aboveSystem); String reason = data.readString(); long res = inputDispatchingTimedOut(pid, aboveSystem, reason); reply.writeNoException(); reply.writeLong(res); return true; Loading Loading @@ -4462,12 +4463,14 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public long inputDispatchingTimedOut(int pid, boolean aboveSystem) throws RemoteException { public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(pid); data.writeInt(aboveSystem ? 1 : 0); data.writeString(reason); mRemote.transact(INPUT_DISPATCHING_TIMED_OUT_TRANSACTION, data, reply, 0); reply.readException(); long res = reply.readInt(); Loading
core/java/android/app/IActivityManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,8 @@ public interface IActivityManager extends IInterface { public void requestBugReport() throws RemoteException; public long inputDispatchingTimedOut(int pid, boolean aboveSystem) throws RemoteException; public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason) throws RemoteException; public Bundle getAssistContextExtras(int requestType) throws RemoteException; Loading
core/java/android/view/IApplicationToken.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ interface IApplicationToken void windowsDrawn(); void windowsVisible(); void windowsGone(); boolean keyDispatchingTimedOut(); boolean keyDispatchingTimedOut(String reason); long getKeyDispatchingTimeout(); }
services/input/InputDispatcher.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -3405,6 +3405,7 @@ void InputDispatcher::onANRLocked( & InputDispatcher::doNotifyANRLockedInterruptible); commandEntry->inputApplicationHandle = applicationHandle; commandEntry->inputWindowHandle = windowHandle; commandEntry->reason = reason; } void InputDispatcher::doNotifyConfigurationChangedInterruptible( Loading Loading @@ -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(); Loading
services/input/InputDispatcher.h +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -596,6 +597,7 @@ private: KeyEntry* keyEntry; sp<InputApplicationHandle> inputApplicationHandle; sp<InputWindowHandle> inputWindowHandle; String8 reason; int32_t userActivityEventType; uint32_t seq; bool handled; Loading