Permalink
Browse files

Added event thread lock.

  • Loading branch information...
1 parent 2cfb636 commit 235d6526d4efcad59351dc8c0a2593da4ef685f9 @jachoi jachoi committed Jan 31, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 api/system.event/src/main/java/blackberry/system/event/KeyPressHandler.java
@@ -120,8 +120,10 @@ public boolean keyDown( int keycode, int time ) {
* Checks to see if the current active screen is a Dialog.
*/
private boolean isDialogUp() {
- if( UiApplication.getUiApplication().getActiveScreen().getScreenBelow() == null ) {
- return false;
+ synchronized( Application.getEventLock() ) {
+ if( UiApplication.getUiApplication().getActiveScreen().getScreenBelow() == null ) {
+ return false;
+ }
}
return true;
}

1 comment on commit 235d652

tohman commented on 235d652 Jan 31, 2012

In that case the app will freeze if called from UI Event Dispatch Thread, since there is no checking condition for that. (isEventThread).

Please sign in to comment.