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

Commit 56b19d49 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ignore only internal volume keys when in VR mode."

parents a7a2a054 0a7e2ea7
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -3627,11 +3627,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                return -1;
            }

            // If the device is in Vr mode, drop the volume keys and don't
            // forward it to the application/dispatch the audio event.
            // If the device is in VR mode and keys are "internal" (e.g. on the side of the
            // device), then drop the volume keys and don't forward it to the application/dispatch
            // the audio event.
            if (mPersistentVrModeEnabled) {
                final InputDevice d = event.getDevice();
                if (d != null && !d.isExternal()) {
                    return -1;
                }
            }
        } else if (keyCode == KeyEvent.KEYCODE_TAB && event.isMetaPressed()) {
            // Pass through keyboard navigation keys.
            return 0;