[E 2015 Original Android Development] IronTechmonkey:
Thanks for taking a look. It's not surprising to hear that the auto-brightness logic is complicated. It is a tough area in which to cover wide ranging circumstances user preferences, and efforts to mold it into something more useful have gone on for quite some time, all of which make for increasing complication.

Our usage scenarios are indeed different, and I know from experience that I'm in the minority. In addition to preferring low ambient light I use manually set brightness, and my preferred values 5/255, 10/255 and 15/255 are too tightly grouped to make the changes with the slider so I use tasker. (but have eliminated tasker as part of the problem*). I only use auto-brightness to provide a brightness boost when under bright light.

Behaviorally I see convincing evidence that the system is remembering previous brightness settings - one each for autobrightness enabled or disabled. Also, logically, that would be required in order for auto-brightness to work around a recent manual setting - a behavior which was quite evident some time ago but lost or made insignificant until now. Perhaps that additional factor (previous manually set value) is the factor that is making the average that you see in the coding less straight. To reproduce this:

PASS-1 = Reproduce the too dim situation.

- Set conditions: Set the brightness slider to the lowest value while auto-brightness is enabled, and again while auto-brightness is disabled, then disable auto-brightness.

- Enable auto-brightness

- Drag native brightness slider to minimum if it is not already there.

PASS-2 = Useful auto-brightness, with scaling seemingly based on value manually set while auto-brightness is enabled.

- Set conditions: Set the brightness slider to the lowest value while auto-brightness is enabled, and again while auto-brightness is disabled, then disable auto-brightness.

- Enable auto-brightness

- Drag native manual brightness slider to about 35%-50% and auto-brightness works OK as device is moved across different levels of ambient light.

- Disable auto-brightness. The screen returns to the minimum value previously set in manual mode, which is also reflected by the return of the native slider to the left.

- Enable auto-brightness. The slider returns to the aforementioned 35%-50% position and auto-brightness works OK.

PASS-3 = More indication of remembered settings.

- Starting with auto-brightness disabled and brightness slider at value other than lowest.

- Enable auto-brightness

- Drag native manual brightness slider to about 35%-50% and auto-brightness works OK as device is moved across different levels of ambient light.

- Disable auto-brightness. The screen returns to the value previously set in manual mode, which is also reflected by the native slider.

- Enable auto-brightness. The slider returns to the aforementioned 35%-50% position and auto-brightness works OK.

- Toggle auto-brightness on and off and the slider position for each setting is remembered.

Something that would make this more manageable and make testing comparisons easier would be to have the native auto-brightness toggle be part of the manual slider as it was in previous ROMs (CM11 and Moto stock KK if I remember correctly) where there was an auto-brightness button immediately to the left of the slider.

* As for Tasker; Tasker cannot change the brightness slider setting when auto-brightness is enabled as the native slider can but If I adjust the auto-brightness as described in Pass-2 or Pass-3 above I can use tasker to toggle auto-brightness on and off and, most importantly, set those specific low values that I cannot set with there slider without messing up auto-brighness. I did not use tasker at all in the tests above. Thanks again.