Remove Intent.ACSD from KEYCODE_SEARCH action in-app

Apps can't close system dialogs anymore due to abuse. If we branch to
launching the assistant, VoiceInteractionSession has the power to close
system dialogs (besides I suspect this code-path is unused).

Bug: 191131805
Test: In-app, adb shell input keycode KEYCODE_SEARCH, verify no crash
Change-Id: I2ef20e0a0d9f05c26747e4dfca5bdb6ec7bd1c1f
This commit is contained in:
Bernardo Rufino
2021-06-18 14:15:30 +01:00
parent 1dfd948440
commit 836cbc6693

View File

@@ -70,12 +70,12 @@ import android.transition.TransitionInflater;
import android.transition.TransitionManager;
import android.transition.TransitionSet;
import android.util.AndroidRuntimeException;
import android.view.AttachedSurfaceControl;
import android.util.EventLog;
import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.AttachedSurfaceControl;
import android.view.ContextThemeWrapper;
import android.view.CrossWindowBlurListeners;
import android.view.Gravity;
@@ -3148,7 +3148,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
if (cb == null || isDestroyed()) {
result = false;
} else {
sendCloseSystemWindows("search");
int deviceId = event.getDeviceId();
SearchEvent searchEvent = null;
if (deviceId != 0) {