Device overlays
Contents
Device specific overlay values
How to configure overlay values to enable device specific features This values must be placed in the overlay folder of the device tree
e.g. https://github.com/omnirom/android_device_oppo_find5/tree/android-4.4/overlay
LEDS
Enable
If the device has a LED
Notifications
Enable usage of LED for notification
frameworks/base - config.xml
<bool name="config_intrusiveNotificationLed">true</bool>
Charging
Enable charging LED
frameworks/base - config.xml
<bool name="config_intrusiveBatteryLed">true</bool>
If the LED has more then one color
<bool name="config_multiColorBatteryLed">true</bool>
Colors
OmniGears - config.xml
If device supports RGB colors on LEDs
<bool name="config_has_multi_color_led" translatable="false">true</bool>
Else a list of supported colors can be provided the default is red/green
OmniGears - arrays.xml
<string-array name="entries_led_colors" translatable="false"> <item>@string/led_color_green</item> <item>@string/led_color_red</item> </string-array>
<string-array name="values_led_colors" translatable="false"> <item>#FF00FF00</item> <item>#FFFF0000</item> </string-array>
Buttons and Keys
Config
Define the number of buttons available on the device
frameworks/base - config.xml
<integer name="config_deviceHardwareKeys">7</integer>
Enable custom button config in Settings
OmniGears - config.xml
<bool name="config_has_hardware_buttons">true</bool>
If kernel has volume wake support
<bool name="config_show_volumeRockerWake">true</bool>
Backlight
If the device has capacitive buttons with backlight that should be handled separate of the screen brightness.
Enable support of custom button backlight
frameworks/base - config.xml
<bool name="config_button_brightness_support">true</bool>
Define the default button brightness values for automatic brightness
<integer-array name="config_autoBrightnessButtonBacklightValues"> <item>14</item> <item>28</item> <item>37</item> <item>51</item> <item>71</item> <item>80</item> <item>96</item> <item>108</item> <item>144</item> <item>181</item> <item>255</item> </integer-array>
This also requires support of setting button backlight separate in liblights