I've seen in the general section that the auto-brightness feature of Z2 is very controversial. I'm of those who find that the screen is a little too dim even with auto-brightness set at its max. Hoping that this will be fixed in a future firmware.
I've tested Lux Auto Brightness and it works very fine as a replacement as the built-in stock autobrightness. It is quite reactive and the brightness can be easily calibrated.
It is not free though.
For those of you who already have Tasker, this can be quite easily done using Tasker as well. For me, I set on auto-brightness but with slider to the max. This suits me for most occasions, except when it's really dark, in which case I find it too bright. So for me I just have 2 simple profiles on screen unlock if the light reading is less than 5, set brightness to 0, otherwise set brightness to 255.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?