mi_settings.setCommand(new Command(new SettingsCommand()));
addMenuItem(mi_settings);
try {
if(nfc_service.isNfcEnabled()) {
nfc_led = new BitmapField(bmp_nfc_led_on);
} else {
nfc_led = new BitmapField(bmp_nfc_led_off);
}
} catch(NFCException e2) {
Utilities.log("XXXX " + Thread.currentThread().getName() + " from isNfcEnabled()");
nfc_led = new BitmapField(bmp_nfc_led_err);
}
nfc_led.setPadding(7, 0, 0, 0);
try {
ce.initCe(ce.getCurrentSecureElement());
if(!ce.isSe_obtained()) {
Utilities.log("XXXX " + Thread.currentThread().getName() + " SecureElement(SIM) not available");
setUserMessage("Error: could not acquire SE");
cem_led_err = true;
} else {
try {
ce_enabled = ce.isCeEnabled(SecureElement.BATTERY_ON_MODE);
if(ce_enabled) {
cem_led = new BitmapField(bmp_ce_led_on);
} else {
cem_led = new BitmapField(bmp_ce_led_off);
}
} catch(Exception e) {
Utilities.log("XXXX " + Thread.currentThread().getName() + " exception when enabling CE: " + e.getClass().getName() + ":" + e.getMessage());
cem_led = new BitmapField(bmp_ce_led_err);
}
}
} catch(NFCException e1) {
Utilities.log("XXXX " + Thread.currentThread().getName() + " exception when getting SE: " + e1.getClass().getName() + ":" + e1.getMessage());
setUserMessage("Error: could not acquire SE");