I use [[UIScreen mainScreen]setBrightness: ]
(in sdk 5.0) to change the system background light in my app.
The following steps work with my app
iOS is not meant to retain in-app brightness values. It should restore system value after the app resigns active, quits, crashes etc. So officially there is no need to do that in applicationWillResignActive.
But it does't work. It's a bug. In fact it works if you switch to another app (press home button twice and select another app)
Don't waste your time just file a bug report to Apple (I did well).
Unlock screen restores default system brightness. Just press the power button twice and unlock to restore original brightness.