Merge "fwb: Introduce constant for assist hw button." into udc-dev

This commit is contained in:
Adnan Begovic
2023-04-21 06:12:11 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ public class AssistUtils {
public static final int INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS = 5;
/** value for INVOCATION_TYPE_KEY: long press on physical power button */
public static final int INVOCATION_TYPE_POWER_BUTTON_LONG_PRESS = 6;
/** value for INVOCATION_TYPE_KEY: press on physcial assistant button */
public static final int INVOCATION_TYPE_ASSIST_BUTTON = 7;
private final Context mContext;
private final IVoiceInteractionManagerService mVoiceInteractionManagerService;

View File

@@ -710,7 +710,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final int deviceId = msg.arg1;
final Long eventTime = (Long) msg.obj;
launchAssistAction(null /* hint */, deviceId, eventTime,
AssistUtils.INVOCATION_TYPE_UNKNOWN);
AssistUtils.INVOCATION_TYPE_ASSIST_BUTTON);
break;
case MSG_LAUNCH_VOICE_ASSIST_WITH_WAKE_LOCK:
launchVoiceAssistWithWakeLock();