protected void unPauseAppBackground(boolean background) { final String METHOD_NAME = "unPauseAppBackground"; LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().START, this, METHOD_NAME)); // PreLogUtil.put(CommonStrings.getInstance().START, this, METHOD_NAME); AllBinarySensorManager.getInstance().init(); GameCanvasRunnableInterface gameCanvasRunnableInterface = this.allbinaryGameCanvasRunnableInterface; if (gameCanvasRunnableInterface != null) { gameCanvasRunnableInterface.unPause(); /* if (gameCanvasRunnableInterface.isPaused()) { gameCanvasRunnableInterface.unPause(); } */ } else { LogUtil.put(LogFactory.getInstance("<<<<<< Null", this, METHOD_NAME)); } }
protected void stopGameCanvasRunnableInterface() throws Exception { LogUtil.put( LogFactory.getInstance( CommonStrings.getInstance().START, this, "stopGameCanvasRunnableInterface")); GameNotificationEventHandler.getInstance().removeAllListeners(); ColorChangeEventHandler.getInstance().removeAllListeners(); GameEventHandlerUtil.removeAllListeners(); // TWB- Depends on the phone - emulators like it without but i think my // sprint phone needed a null canvas // this.setDisplay((Displayable) new ProgressCanvas(this)); GameCanvasRunnableInterface gameCanvasRunnableInterface = this.allbinaryGameCanvasRunnableInterface; if (gameCanvasRunnableInterface != null) { LogUtil.put( LogFactory.getInstance("Set Running False", this, "stopGameCanvasRunnableInterface")); gameCanvasRunnableInterface.setRunning(false); } else { LogUtil.put( LogFactory.getInstance( "StopGame - Could Not Stop", this, "stopGameCanvasRunnableInterface")); } // Wait for the thread to end then continue ThreadUtil.getInstance().join(this.thread); if (Features.getInstance().isFeature(MainFeatureFactory.getInstance().LOAD_ALL)) { ProgressCanvasFactory.getInstance().addPortion(50, "Stopped Game Runnable"); } else { ProgressCanvasFactory.getInstance().addPortion(50, "Stopped Main Runnable"); } LogUtil.put( LogFactory.getInstance( CommonStrings.getInstance().END, this, "stopGameCanvasRunnableInterface")); }
protected void pauseAppBackground(boolean background) { final String METHOD_NAME = "pauseAppBackground"; LogUtil.put(LogFactory.getInstance(CommonStrings.getInstance().START, this, METHOD_NAME)); // PreLogUtil.put(CommonStrings.getInstance().START, this, METHOD_NAME); if (allbinaryGameCanvasRunnableInterface != null) { allbinaryGameCanvasRunnableInterface.pause(); /* if (!allbinaryGameCanvasRunnableInterface.isPaused()) { allbinaryGameCanvasRunnableInterface.pause(); } */ } else { LogUtil.put(LogFactory.getInstance("<<<<<< Null", this, METHOD_NAME)); } AllBinarySensorManager.getInstance().shutdown(); }