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

Commit a55decab authored by Adnan Begovic's avatar Adnan Begovic
Browse files

fwb: Introduce constant for assist hw button.

Since there's a dedicated KEYCODE associated with
the invocation, don't utilize UNKNOWN to represent it.

Test: manual
Bug: 277271303
Change-Id: Ie743180d10b9c68309784aa623036dbbb574ac54
parent b7abd253
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -57,6 +57,8 @@ public class AssistUtils {
    public static final int INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS = 5;
    public static final int INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS = 5;
    /** value for INVOCATION_TYPE_KEY: long press on physical power button */
    /** value for INVOCATION_TYPE_KEY: long press on physical power button */
    public static final int INVOCATION_TYPE_POWER_BUTTON_LONG_PRESS = 6;
    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 Context mContext;
    private final IVoiceInteractionManagerService mVoiceInteractionManagerService;
    private final IVoiceInteractionManagerService mVoiceInteractionManagerService;
+1 −1
Original line number Original line Diff line number Diff line
@@ -710,7 +710,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    final int deviceId = msg.arg1;
                    final int deviceId = msg.arg1;
                    final Long eventTime = (Long) msg.obj;
                    final Long eventTime = (Long) msg.obj;
                    launchAssistAction(null /* hint */, deviceId, eventTime,
                    launchAssistAction(null /* hint */, deviceId, eventTime,
                            AssistUtils.INVOCATION_TYPE_UNKNOWN);
                            AssistUtils.INVOCATION_TYPE_ASSIST_BUTTON);
                    break;
                    break;
                case MSG_LAUNCH_VOICE_ASSIST_WITH_WAKE_LOCK:
                case MSG_LAUNCH_VOICE_ASSIST_WITH_WAKE_LOCK:
                    launchVoiceAssistWithWakeLock();
                    launchVoiceAssistWithWakeLock();