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

Unverified Commit 28368fcb authored by LuK1337's avatar LuK1337
Browse files

PhoneWindowManager: Restore haptic feedback for physical nav keys

From docs: Gets the id for the device that this event came from. An id
of zero indicates that the event didn't come from a physical device and
maps to the default keymap. The other numbers are arbitrary and you
shouldn't depend on the values.

Change-Id: I730954c2e9787498b845128ea95d4f062d154562
parent 2541e83b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5901,7 +5901,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        final boolean isNavBarVirtKey = ((event.getFlags() & KeyEvent.FLAG_VIRTUAL_HARD_KEY) != 0);
        boolean useHapticFeedback = down
                && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0
                && (!isNavBarVirtKey || mNavBarVirtualKeyHapticFeedbackEnabled)
                && (!isNavBarVirtKey || mNavBarVirtualKeyHapticFeedbackEnabled ||
                        event.getDeviceId() > 0)
                && event.getRepeatCount() == 0;

        // Specific device key handling