What steps will reproduce the problem?
1. Create a menu with left and right buttons.
2. Add acceptNotify and declineNotify methods
3. Display the menu and verify that the accept/declineNotify methods aren't
invoked.
Please provide any additional information below.
The reason for this is that getGameAction(key) returns Canvas.FIRE for the
left and right menu buttons (clear is also mapped to FIRE). I worked
around the issue with the following code changes in the translateKeyCode
method of DeviceScreen
try {
action = getGameAction(key);
// Special handling for Samsung where both menu buttons
// map to FIRE!
if (action == Canvas.FIRE) {
if ((Canvas.FIRE == getGameAction(-6))
&& (Canvas.FIRE == getGameAction(-7))
&& ((key == -6) || (key == -7))) {
return key == -6 ? DeviceScreen.MENU_LEFT : DeviceScreen.MENU_RIGHT;
}
}
} catch (Exception e) {
// Some phones throw an exception for unsupported keys.
// For example the Sony Ericsson K700.
return key;
}
Original issue reported on code.google.com by hammingweight on 17 Oct 2008 at 1:52
Original issue reported on code.google.com by
hammingweight
on 17 Oct 2008 at 1:52