/**
* Shows the test screen to allow the user to exercise the application
* permissions capabilities.
*/
private void showTestScreen() {
final MainScreen screen = new MainScreen();
screen.setTitle("Application Permissions Demo");
if (_eventInjectorButton == null) {
_eventInjectorButton =
new ButtonField("Event Injector", ButtonField.NEVER_DIRTY
| ButtonField.CONSUME_CLICK);
_eventInjectorButton.setChangeListener(this);
}
if (_phoneButton == null) {
_phoneButton =
new ButtonField("Phone", ButtonField.NEVER_DIRTY
| ButtonField.CONSUME_CLICK);
_phoneButton.setChangeListener(this);
}
if (_deviceSettingsButton == null) {
_deviceSettingsButton =
new ButtonField("Device Settings", ButtonField.NEVER_DIRTY
| ButtonField.CONSUME_CLICK);
_deviceSettingsButton.setChangeListener(this);
}
if (_emailButton == null) {
_emailButton =
new ButtonField("Email", ButtonField.NEVER_DIRTY
| ButtonField.CONSUME_CLICK);
_emailButton.setChangeListener(this);
}
screen.add(_eventInjectorButton);
screen.add(_phoneButton);
screen.add(_deviceSettingsButton);
screen.add(_emailButton);
pushScreen(screen);
}