Solving 'black screen' on android

Hi,

On Andorid there could be a case that an Activity is Destroyed but the JNI code still stays in memory. In such case OpenGL context is recreated and all currently active CCTexture2D objects (in running scene) which have texture names from the not anymore existing  OpenGL context are rendered in black or could render some other textures if the later were created in the mean time. 
The typical scenario is when user changes language configuration in his/her device.
To solve that problem the textures' names need to be rebind(reloaded) based on the initial input parameters and as far as I'm aware the only way is to set CC_ENABLE_CACHE_TEXTURE_DATA to 1 and when OpenGL context is reinitiaded then call CCTextureCache::reloadAllTextures(); That way all you textures are valid again. When you have i18n application it could be a good moment to re-init the FileUtils searchPaths and searchResolutionsOrder to enable load localized resources from new locations (based in current language).

Regards
Jaro

p.s. originally i created that patch for 2.1.4 version... but then realised that some work has been done... unfortunately it didn't solve all the cases (and the one most important for me i.e. changing the device locale).. so I hope that would be useful for you.