Fix bug 2185026 - back button in context menu now calls onContextMenuClosed()
Change-Id: I6c16879a8ad8e4651d21f639a620a936bf991f8d
This commit is contained in:
@@ -101,11 +101,19 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogIn
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP
|
||||
&& event.isTracking() && !event.isCanceled()) {
|
||||
mMenu.close(true);
|
||||
dialog.dismiss();
|
||||
return true;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user