mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 04:07:27 -08:00
Reduce alert timeout in J2ME client to 5 seconds from forever
git-svn-id: https://zxing.googlecode.com/svn/trunk@760 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
4e5aa67970
commit
b300a0a4b4
|
@ -49,6 +49,8 @@ import java.io.IOException;
|
|||
*/
|
||||
public final class ZXingMIDlet extends MIDlet {
|
||||
|
||||
private static final int ALERT_TIMEOUT_MS = 5 * 1000;
|
||||
|
||||
private Canvas canvas;
|
||||
private Player player;
|
||||
private VideoControl videoControl;
|
||||
|
@ -144,7 +146,7 @@ public final class ZXingMIDlet extends MIDlet {
|
|||
|
||||
private void showOpenURL(String title, String display, final String uri) {
|
||||
Alert alert = new Alert(title, display, null, AlertType.CONFIRMATION);
|
||||
alert.setTimeout(Alert.FOREVER);
|
||||
alert.setTimeout(ALERT_TIMEOUT_MS);
|
||||
Command yes = new Command("Yes", Command.OK, 1);
|
||||
alert.addCommand(yes);
|
||||
Command no = new Command("No", Command.CANCEL, 1);
|
||||
|
@ -171,7 +173,7 @@ public final class ZXingMIDlet extends MIDlet {
|
|||
|
||||
private void showAlert(String title, String text) {
|
||||
Alert alert = new Alert(title, text, null, AlertType.INFO);
|
||||
alert.setTimeout(Alert.FOREVER);
|
||||
alert.setTimeout(ALERT_TIMEOUT_MS);
|
||||
showAlert(alert);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue