Set TaskSnapshotWindow no InputChannel.
TaskSnapshotWindow has no need to process any input events. If it has a valid InputChannel but no InputEventReceiver, it won't receive events sent by InputDispatcher like TouchModeEvent. This may cause an ANR. Test: when TaskSnapshotWindow is showing, verify that touch on Notification shade won't trigger ANR on TaskSnapshotWindow. Bug: 271552817 Change-Id: I9595b15fa277ebff4be375eed220cb57533a1a2c
This commit is contained in:
@@ -34,6 +34,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
|
||||
import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
|
||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
|
||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
|
||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST;
|
||||
@@ -410,6 +411,7 @@ public class SnapshotDrawerUtils {
|
||||
layoutParams.setFitInsetsIgnoringVisibility(attrs.isFitInsetsIgnoringVisibility());
|
||||
|
||||
layoutParams.setTitle(title);
|
||||
layoutParams.inputFeatures |= INPUT_FEATURE_NO_INPUT_CHANNEL;
|
||||
return layoutParams;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user