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

Commit 146f12c4 authored by Ben Kwa's avatar Ben Kwa Committed by Android (Google) Code Review
Browse files

Merge "Add support for dpads." into nyc-dev

parents ba7e43ca ee15bfe3
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1263,12 +1263,15 @@ public class DirectoryFragment extends Fragment
            }

            // Handle enter key events
            if (keyCode == KeyEvent.KEYCODE_ENTER) {
            switch (keyCode) {
                case KeyEvent.KEYCODE_ENTER:
                    if (event.isShiftPressed()) {
                        return onSelect(doc);
                } else {
                    return onActivate(doc);
                    }
                    // For non-shifted enter keypresses, fall through.
                case KeyEvent.KEYCODE_DPAD_CENTER:
                case KeyEvent.KEYCODE_BUTTON_A:
                    return onActivate(doc);
            }

            return false;