Port: Wake on plug (1/2)

Change-Id: I5e50a7fd351857d76c1c2fd13c6e737d8902a2f3

(cherry picked from commit 3abebe2d4d433a029d7e8b7b847a4b982c4a61d3)

(cherry picked from commit 8c58f173366e2b00dd9252382a3ab8e4e7ab5f38)
SystemUI: improve brightness slider behavior

Mimic the brightness slider behavior in the statusbar.
This adds logic to make the statusbar slider also work with automatic
brightness mode enabled and it will instead adjust the temporary automatic
brightness overrride.

Change-Id: I78814a785decc83df94844fcc2f489c8cbec2b65
Signed-off-by: Roman Birg <roman@cyngn.com>

(cherry picked from commit c1bec36cd07f893965f72d284e7483bd3be73dca)
Merge tag 'android-5.0.1_r1' into HEAD

Android 5.0.1 release 1

Change-Id: Id44d5168fc8a77c4a30a86729c7fd7194e97bc1b

(cherry picked from commit 00c2018e7d8d7a5fe2767d5f57f1c23f4104e51c)