This was asked some time ago, but simply in order to expand the dummy answer:
settings.screenBrightness will return -1 if it has not already been overwritten in code. This is the correct behavior, as setting the Brightness screen to -1 sets the brightness to the current system brightness level.
This brightness of the system can be changed by the user at any time, so there is probably not much use in maintaining the actual value if you are just trying to restore the brightness to its original value, since the actual value may be "out of date".
Hamiora
source share