If a gesture monitor is unresponsive, today there will not be an ANR dialog. Since the input channel token for the gesture monitor is not provided to WindowManager, there is no way for the proper ANR to occur. That means, the user will not know that the gesture monitor isn't working. To fix the issue, we record the pid of the caller when first registering a gesture monitor. This will be stored in InputManagerService. Next, when an ANR for this gesture monitor occurs, we will provide this pid to the WM. WM will use this pid to properly blame that process. Bug: 161904619 Bug: 160903019 Test: atest AnrTest Test: adb shell input dump Change-Id: Ie1a16352a116914ba6550958ad41de07cff063be
36 lines
1.4 KiB
XML
36 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2020 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.android.test.input">
|
|
<uses-permission android:name="android.permission.MONITOR_INPUT"/>
|
|
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
|
|
<uses-permission android:name="android.permission.INJECT_EVENTS"/>
|
|
|
|
<application android:label="InputTest">
|
|
|
|
<activity android:name=".UnresponsiveGestureMonitorActivity"
|
|
android:label="Unresponsive gesture monitor"
|
|
android:process=":externalProcess">
|
|
</activity>
|
|
|
|
|
|
</application>
|
|
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
|
|
android:targetPackage="com.android.test.input"
|
|
android:label="Input Tests"/>
|
|
</manifest>
|