Methods Summary |
---|
public void | commandAction(Command command, Displayable displayable)
if(command == backCommand) {
destroyApp(false);
notifyDestroyed();
} else if (command == Alert.DISMISS_COMMAND) {
// goto back to the manager midlet
exit(false);
}
|
private Form | createProgressForm()Create main form for suite classes verification
progressForm = new Form(null);
progressForm.setTitle(Resource.getString(
ResourceConstants.AMS_CLASS_VERIFIER_TITLE));
Gauge progressGauge = new Gauge(
Resource.getString(
ResourceConstants.AMS_CLASS_VERIFIER_GAUGE_LABEL),
false, Gauge.INDEFINITE,
Gauge.CONTINUOUS_RUNNING);
progressGaugeIndex = progressForm.append(progressGauge);
backCommand = new Command(Resource.getString(
ResourceConstants.BACK), Command.BACK, 1);
progressForm.addCommand(backCommand);
progressForm.setCommandListener(this);
display.setCurrent(progressForm);
return progressForm;
|
public void | destroyApp(boolean unconditional)Destroy cleans up.
|
private void | displaySuccessMessage(java.lang.String successMessage)Alert the user that an action was successful.
Image icon;
Alert successAlert;
icon = GraphicalInstaller.getImageFromInternalStorage("_dukeok8");
successAlert = new Alert(null, successMessage, icon, null);
successAlert.setTimeout(GraphicalInstaller.ALERT_TIMEOUT);
// Provide a listener to disable the advance-to-next-displayable
// feature of Alert.
successAlert.setCommandListener(
new CommandListener() {
public void commandAction(Command c, Displayable d) { }
}
);
display.setCurrent(successAlert);
|
private void | displayWarning(java.lang.String title, java.lang.String message)Display a warning to the user, with a done command.
Alert a = new Alert(title, message, null, AlertType.WARNING);
a.setTimeout(Alert.FOREVER);
a.setCommandListener(this);
display.setCurrent(a);
|
void | exit(boolean status)Exit the SuiteVerifier with the status supplied.
It will perform any remaining cleanup and call notifyDestroyed.
/* TBD: Handle the status */
notifyDestroyed();
|
public void | pauseApp()Pause; there are no resources that need to be released.
|
public void | startApp()Start.
|
private void | storeSuiteHash()Store hash value of the suite JAR after all classes
in the package are successfully verified
try {
// Evaluate suite hash value and store it
byte []verifyHash = MIDletSuiteVerifier.getJarHash(jarPath);
suiteStorage.storeSuiteVerifyHash(suiteId, verifyHash);
} catch (IOException ioe) {
displayWarning(
Resource.getString(
ResourceConstants.AMS_CLASS_VERIFIER_WARNING),
Resource.getString(
ResourceConstants.AMS_CLASS_VERIFIER_CANT_STORE_HASH));
}
|