Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b109d69f authored by wilsonshih's avatar wilsonshih
Browse files

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
parent 9f4c30c2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
    }