display.setCurrent(null);
To check if the cal was succesfull, we can use the isShown() method of the class displayable. So if m_disp is your displayable you can use:
if ( m_disp.isShown() ) { // method didn't work } else { // app is in background }
display.setCurrent(null);
if ( m_disp.isShown() ) { // method didn't work } else { // app is in background }