SettingsProvider: Initialize defaults for CM features

Add configuration defaults for:
- status bar notification count
- QuickSettings quick pulldown
- lockscreen targets

Change-Id: Ief4b97fcceea7e351a13d59136a2fb1823d97b04
fix build error

Change-Id: I1110af7a22f52e521725f1eddfa7def796819f90
Update date view in PIE expanded view.

The date was not visible in expanded PIE view. This commit fixes that.
Intial looks : http://postimg.org/image/6s61e2wxj/
Final looks : http://postimg.org/image/6xoyqt0wr/

Change-Id: I1e477d79539760f01872fc06b52d63da1c65aa53
Make d2's build-able again
This commits adds a dummy dimen to enable all d2's
to be buildable again. They were unbuildable due to this CM commit:
http://review.cyanogenmod.org/38030

Change-Id: Id9146d1f18be67fea614ffb324f5a41ea1f789c4
QuickSettings: Brightness Tile Correction

Brightness tile was not functioning correctly especially enabling/disabling Auto Brightness control.

This commit corrects the Brightness Tile so it functions correctly.

Change-Id: I5dbd51e3a0e7ee32f69deb54736ccdb974e107a5
gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab
FW: Fix Menu Overflow Disable Option

The three button Menu Overflow would display no matter what setting was seleted within ROMControl, this commit makes a slight change to correctly return a result that reflects the users selection through ROMControl.

I had to enable then disable the option for it to function correctly (no reboot required), screenshot is below showing the absence of the overflow menu:
http://img.tapatalk.com/d/13/05/26/ne6y2uny.jpg

Change-Id: Ib95da3f54a876da90d76833a9fc9bd2c86ecf498
Fix Date View in Tablet Mode.

Change-Id: I0abb165cdc54776705aff78521d94f33a14155fe
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
keyguard: enable magnetic target if no custom targets defined

When no custom target is defined (the "reset" button is pressed
in settings), the unlock target will always be at the right
regardless of the direction the user dragged to.

Change-Id: I0a2b1cd5dc7a2840c23d83a26593513cbc880c08
Fix duplicated "public void setMagneticTargets"

This is needed by the parent commit: "keyguard: enable magnetic target if no custom targets defined"

Partially same function was already there by AOKP ribbon commit

Change-Id: Idaaf7a2d12eec3a128b1d518d706c90627f3f69a
Keep keyboard lit until the screen is dimmed

Do not use button timeout for keyboard (which is intrusive on QWERTY
sliders). Keep it lit until the screen dims instead of turning it off
like the buttons after 5 seconds. Also consider setting keyboard
visibility as a user activity.

Conflicts:

	services/java/com/android/server/power/PowerManagerService.java

Change-Id: Ib0b6f8e86df65b9a88026c348d40c475cc871b46
Make character picker for QWERTY keyboards use HOLO theme

Also, removed the cancel button. Instead, touching outside will close
the dialog.

Change-Id: I20c1d22b131a92e2e2022d054b4141a2b61c7dd8
Fix layout of MultiWaveView and GlowPadView.

If the calculated size of the rings is much smaller than the measured
size (which is happening e.g. on mdpi 600x1024 tablets), the glow pad
appeared shifted to the right.
This happened due to the insets being calculated as difference of
available and needed size, and later on being added to the available
size. Example numbers (Nexus 4 with density forced to 160):
- computed size in onMeasure: 768x505
- scaled size in onMeasure: 505x505
- thus, insets are calculated as 131/0
- in onLayout, placementWidth (364) and max target width (108) are much
  smaller than width (768)
- thus, center is calculated as 131 + (768 / 2) = 515, thus shifted to
  the right

Fix that by not using width in the calculation, as the inset size
already takes it into consideration.

JIRA:CYAN-829
Change-Id: Ifc2a93214f812f554a8fed3243eed66aec9f00c9
NavigationBar : Only inflate once

Since the navbar now has updateResources(), there is no need to reinflate
it upon a theme change.

Change-Id: Ie4753a767a1cb45eb459ee692d16067f83cc7d23
Don't include flags in configuration change if their value hasn't changed.

This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
Fix up notification LED behaviour

- Commit 5713307e3d2eb457ba148df3683ad09733727506 (in ICS) attempted to
  fix the problem that the notification LED wasn't reenabled after
  turning off the screen again, but introduced another bug in the
  process: If another pending notification with LED at the time when the
  notification with the new magic flag introduced by that commit (which
  was used by phone and MMS apps) was active, the LED still wouldn't be
  turned on at screen off time. Also, this commit didn't handle locking
  correctly.
  This commit essentially reverts 5713307e and makes sure the LED is
  reevaluated when the screen is turned off again.

- This change also makes the assignment of the LED when multiple pending
  notifications want to use the LED more clear: The notification with
  highest priority gets the LED. If multiple notifications with same
  priority exist, the most recent one gets the LED.

JIRA:CYAN-652

Conflicts:

	services/java/com/android/server/NotificationManagerService.java

Change-Id: I86d62a795e1419b2ba3c44fb5bee0d7f639f5fdc
SystemUI: Clean up old H+ drawables causing issues on manta

These drawables seem to be adapted to fit the old combined
tablet status bar. They mistakenly gets used on manta with
an oversized H+ drawable as a result.

Change-Id: Iefc0e997e31508ea98f10e5b399ce6569a4a3a44