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

Unverified Commit f5684edd authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
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 33fd8a5d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -5052,7 +5052,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        final boolean isNavBarVirtKey = ((event.getFlags() & KeyEvent.FLAG_VIRTUAL_HARD_KEY) != 0);
        final boolean isNavBarVirtKey = ((event.getFlags() & KeyEvent.FLAG_VIRTUAL_HARD_KEY) != 0);
        boolean useHapticFeedback = down
        boolean useHapticFeedback = down
                && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0
                && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0
                && (!isNavBarVirtKey || mNavBarVirtualKeyHapticFeedbackEnabled)
                && (!isNavBarVirtKey || mNavBarVirtualKeyHapticFeedbackEnabled ||
                        event.getDeviceId() > 0)
                && event.getRepeatCount() == 0;
                && event.getRepeatCount() == 0;


        // Specific device key handling
        // Specific device key handling