Disable Google's home-key handling code

This might be temporary. Upstream now includes multi-behavior key
handling for HOME, which conflicts with our own code when running
in parallel, resulting in funky behaviors. Since the CM implementation
is more flexible, let's keep that for the time being and disable
Google's; It might be a good idea to rewrite our version so that it's
an extension of theirs, though.

Change-Id: I5d55301772607315b410880c1194a0076e21cb80
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54
Add back backlight brightness curve adjustment.

Change-Id: I58408111d6366a281303afb469d78588ae88d275

Conflicts:
	services/java/com/android/server/power/DisplayPowerController.java

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/BrightnessButton.java
Fix race condition in backlight adjustment.

When configuring the automatic backlight levels, there's a race
condition in setting the lux and brightness settings as the settings
provider doesn't allow storing multiple settings atomically. When
deleting rows, there's quite a high chance of DisplayPowerController
picking up a state where the lux values already have the lower number of
rows, but the brightness values do not, effectively leading to an
ArrayIndexOutOfBoundsException.

Fix that by
- waiting a second of cool-down time until applying the settings and
- adding a sanity check for the very unlikely case that the delay
  between writing both values is > 1 second

Change-Id: I44e41530fc5334aaefc4ab7d3a90542f78fabe0c
JIRA:CYAN-755
Improve auto-brightness handling

- Add a setting to control the auto-brightness algorithm responsitivity
- Make the algorithm react much faster when the ambient brightness
  increases quickly, e.g. when receiving a call in bright sunlight.

Change-Id: Ic608901c476609dde69cae982228c09567140a83

Conflicts:

	core/java/android/provider/Settings.java
Re-add auto brightness configuration UI (1/2)

- Add a button into the new brightness dialog that allows opening the
  auto brightness setup
- Enable auto-brightness adjustment (setting for general brighter/darker
  adjustment) and twilight adjustment

Change-Id: I7fd11ddaa112396dcb7508692aacb93bfe3da256

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/quicksettings/BrightnessTile.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
Fix brightness dialog layout.

This reverts part of change I83e8f7eae65d5f40dd7aeb2b663bc1fc3d5324d2.

Change-Id: I1f685357776dcac9c93e592e274acdf0497f4161
Fix hardware home key behavior on wake-up

Change-Id: Ib489e4b8bb1d10591afc96c680c7865d61c959a0
Factor out preference-in-storage check to overridable method.

Change-Id: I2fff3192802f8a180330fda66388eda394334a5a
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7
Add PowerManager integration for button and keyboard backlight.

Allows setting button and keyboard backlight brightness as well as
button timeout.

Change-Id: I550cccafc0a8f90d6347de9261adb26b75955cc4

Conflicts:

	core/java/android/provider/Settings.java