The brightness of a mobile device display changes depending on the level of ambient light. For example, if you are using the device in a darkened movie theater, then walk into the medium light of the theater lobby, and then walk outside into bright sunshine, the brightness adjusts to the different light levels. The transition can be smooth or coarse depending on the capabilities of the brightness hardware. You can specify the light levels at which the brightness changes, the brightness for each of the levels, and the length of the transition period.
By design, the brightness is initially set when the brightness transitions from the OFF to ON state. From this initial setting, the brightness can be increased depending on the level of ambient light, but cannot be decreased. This helps to avoid the perceived flickering on the device as it moves through regions of both high and low ambient light levels. Brightness is reset at the next brightness OFF to ON transition.
The adaptive brightness service monitors ambient light levels by reading the ambient light sensor (ALS). Based on the user’s configuration for manual or automatic brightness settings, adaptive brightness adjusts the display brightness as needed. Adaptive brightness is disabled when the service is idle, by reaching maximum brightness, or by being in manual brightness mode.
The device also monitors the user’s activity from regular input to the device. If that activity stops in a period of time, the device will warn the user that the screen is about to turn off. It does so by changing the brightness of the screen to the value of
DimBrightness a few seconds ahead of time. If the user touches any button or the screen then the screen brightness is restored and active monitoring resets. If no input is received, the device turns off. The time of activity monitoring can be configured in the Screen times out after option in the lock screen settings screen.
This customization allows partners to customize the brightness by specifying:
The value of brightness when dimming the screen.
The ABS millilux range mapping.
The ABS intensity percent mapping.
The brightness state transition delay (in seconds).
The value for
ABSRangeMilliLuxMapping is a list of values, separated by semicolons, that represent the upper bound in the range of ambient light readings measured by the light sensor. The upper bound value is measured in millilux. For example, if
ABSRangeMilliLuxMapping is set to 100000;500000;MAX, then the three brightness levels for the phone will be 100000 millilux, 500000 millilux, and maximum brightness. Specifying "MAX" in the list of values means that there is no upper bound to the range.
The ABS millilux range mapping and ABS intensity percent mapping are used together to make a table of brightness values. They must have the same number of elements as each other. For example if
ABSRangeMilliLuxMapping = 100000;500000;MAX and ABSPercentIntensityMapping = 33;66;100, the table will look like the following.
|Range of ambient light readings in millilux||0-100000||100001-500000||500001 or greater|
Create a customization answer file using the contents shown in the following code sample.
<?xml version="1.0" encoding="utf-8" ?> <ImageCustomizations xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate" Name="AutoBrightness" Description="Use to customize how the device screen adapts to brightness." Owner="" OwnerType="OEM"> <Static> <Settings Path="AutoBrightness"> <!-- The value of brightness used when dimming the screen. The value must be an integer between 0 and 50 inclusive. --> <Setting Name="DimBrightness" Value="" /> <!-- The ABS millilux range mapping. Set the value to a range, for example: "100000;500000;MAX". --> <Setting Name="ABSRangeMilliLuxMapping" Value="" /> <!-- The ABS intensity percent mapping. Sample value: "11;68;100". --> <Setting Name="ABSPercentIntensityMapping" Value="" /> <!-- The brightness state transition delay in seconds. The value must not be less than 2 seconds. Sample value: "5". --> <Setting Name="TransitionDelay" Value="" /> </Settings> </Static> </ImageCustomizations>
Ownervalue in the customization answer file.
Valuefor the following settings:
Setting name Description
The dim brightness, in percent. The default value is 10.
The ALS mapping values in millilux.
The ALS mapping values in percent.
Delay, in seconds, from when the ambient light changes until the brightness begins its transition. This value has to be greater than or equal to 2. The default value is 5.