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

Commit ffc67455 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 128f1a87: am 6024ca5c: Fix bug 2185026 - back button in context menu now...

am 128f1a87: am 6024ca5c: Fix bug 2185026 - back button in context menu now calls onContextMenuClosed()

Merge commit '128f1a87' into kraken

* commit '128f1a87':
  Fix bug 2185026 - back button in context menu now calls onContextMenuClosed()
parents e47009aa 128f1a87
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -101,13 +101,21 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogIn
                        }
                    }
                }
            } else if (event.getAction() == KeyEvent.ACTION_UP
                    && event.isTracking() && !event.isCanceled()) {
            } else if (event.getAction() == KeyEvent.ACTION_UP && !event.isCanceled()) {
                Window win = mDialog.getWindow();
                if (win != null) {
                    View decor = win.getDecorView();
                    if (decor != null) {
                        KeyEvent.DispatcherState ds = decor.getKeyDispatcherState();
                        if (ds != null && ds.isTracking(event)) {
                            mMenu.close(true);
                            dialog.dismiss();
                            return true;
                        }
                    }
                }
            }
        }

        // Menu shortcut matching
        return mMenu.performShortcut(keyCode, event, 0);