cocos2d/cocos2d-x — pull request #695 by GermanMtz (2012-01-31 08:31:28+00:00)
Title: Implementation to detect when the application goes and return from background in QNX (Black Berry Playbook)

applicationWillEnterForeground will be called when the device returns from idle mode and when the application brings the application to fullscreen after being in the background.

And applicationDidEnterBackground will be called when the device goes to idle mode and when the OS send the application to the carousel of application displaying them with thumbnail size.