Explictly add Yes/No commands to "Open xxx" dialog to ensure that both options show on all platforms

git-svn-id: https://zxing.googlecode.com/svn/trunk@154 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2008-01-22 23:38:25 +00:00
parent eb68422111
commit f242e266e8

View file

@ -114,8 +114,10 @@ public final class ZXingMIDlet extends MIDlet {
private void showOpenURL(String title, final String display, final String uri) {
Alert alert = new Alert(title, display, null, AlertType.CONFIRMATION);
alert.setTimeout(Alert.FOREVER);
final Command cancel = new Command("Cancel", Command.CANCEL, 1);
alert.addCommand(cancel);
Command yes = new Command("Yes", Command.OK, 1);
alert.addCommand(yes);
Command no = new Command("No", Command.CANCEL, 1);
alert.addCommand(no);
CommandListener listener = new CommandListener() {
public void commandAction(Command command, Displayable displayable) {
if (command.getCommandType() == Command.OK) {