I'm developing an application and at some point i'm catching a exception and i'm calling a method wich creates an alarm and displays it on the screen.The alarm has attached one command.(Quit) Now...it seems to work preety well on most of the phones but on Sony Ericsson k610i i get 2 command and the left one doesn't do anything. it is an OK command. What i need is...to remove the useless command but it wouldn't go away.
Here is some code if you could just taka a look at it
- Code: Select all
public synchronized void showAlertAndWaitForAction(String aMessage,
boolean isExitCmdEnabled) {
//----set title
Alert al;
al = new Alert(title, aMessage, null, AlertType.INFO);
al.setTimeout(Alert.FOREVER);
if (isExitCmdEnabled) {
al.addCommand(iCmdExit);
al.removeCommand(iCmdOK);
} else {
al.addCommand(iCmdOK);
al.removeCommand(iCmdExit);
}
al.removeCommand(Alert.DISMISS_COMMAND);
al.setCommandListener(this);
Display.getDisplay(iMIDletBoot).setCurrent(al);
if (!isExitCmdEnabled){
try {
this.wait();
} catch (InterruptedException e) {
//#mdebug error
System.out.println("SplashView:showAlertAndWaitForAction():" +
"InterruptedException was thrown");
//#enddebug
}
}
}
