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

Commit fcf7bfc3 authored by Arthur Hung's avatar Arthur Hung Committed by Automerger Merge Worker
Browse files

Merge "Prevent NPE for onKeyDown and onKeyUp" into tm-dev am: b1c7853e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17130385

Change-Id: Ida011e7f03211d9952df7347bf41e3caad8658c0
parents 0910e14b b1c7853e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -15616,7 +15616,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @param event the KeyEvent object that defines the button action
     */
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (event.hasNoModifiers() && KeyEvent.isConfirmKey(keyCode)) {
        if (KeyEvent.isConfirmKey(keyCode) && event.hasNoModifiers()) {
            if ((mViewFlags & ENABLED_MASK) == DISABLED) {
                return true;
            }
@@ -15673,7 +15673,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @param event   The KeyEvent object that defines the button action.
     */
    public boolean onKeyUp(int keyCode, KeyEvent event) {
        if (event.hasNoModifiers() && KeyEvent.isConfirmKey(keyCode)) {
        if (KeyEvent.isConfirmKey(keyCode) && event.hasNoModifiers()) {
            if ((mViewFlags & ENABLED_MASK) == DISABLED) {
                return true;
            }