private void checkOrientationChanged(int w, int h) { // calculate current orientation based on width and height int isLandscape = w > h ? 1 : 0; if (isLandscape == isLandscapeScreen) { return; } if (!isUIWorkerInit) { // verify that UIWorker is initialized isUIWorkerInit = UIWorker.isInit(); if (!isUIWorkerInit) return; } isLandscapeScreen = isLandscape; try { if (c_on_orientation_change == 0) c_on_orientation_change = CibylCallTable.getAddressByName("rim_on_orientation_change"); } catch (Throwable t) { Logger.log("Exception in checkOrientationChanged: " + t); t.printStackTrace(); System.exit(0); } if (c_on_orientation_change != 0) { UIWorker.addUIEvent(c_on_orientation_change, isLandscape, 0, 0, 0, true); } }