Customisable location tile(2/2)

Change-Id: Id7a8a9522e8222ac990ebc13ae4b227c153d5ed1
quiethours: fix vibration logic

While QuietHours have different modes for haptic feedback and vibration, indeed
both uses the underlying VibratorService. This change adds some basic logic to
detect what quiethours mode should be applied to block access to vibrate calls
during quiethours.

This patch assumes:

1.- Single pattern vibrate calls are treated as haptic feedback if milliseconds
vibration is lower than 70 milliseconds
2.- Multiple pattern vibrate calls are treated as haptic feedback if the total
duration of the pattern is lower than 70 milliseconds and they doesn't need to
be repeated.

JIRA: NIGHTLIES-175
https://jira.cyanogenmod.org/browse/NIGHTLIES-175
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Change-Id: I0d090ca1189a5d132bf6a835e9921cf41e02d1fb
base: display live wallpaper settings instead of wallpaper picker

If the livewallpaper service declares and supports a settings activity, display it
instead of the wallparper picker in runnings apps details settings activity
(settings button)

Change-Id: I8db800cec4151ee5e6edddcea7a1bb5fb0528816
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
NetworkController: Extra WIMAX icon handling

- Fixes the dependency on 3g (or other mobile data)
  being connected for the wimax (4G) icon to show.
- Prevents the lack of mobile data (3g, 1x, etc) from
  removing the wimax icon if wimax is connected.
- Continue to show the network carrier type if
  phone is out of service but wimax is still connected.

Authored by: Matt Merhar

Change-Id: Ib1cf411cf4e7248248e093b6a7317fbe5d80f704
AudioService: Reduce volume to safe level when headset is connected (2/2)

This is a safety feature for users who opt to raise volume above the designated
safe level while using a headset.

Currently when a user does this they are provided with no protection against
dangerously high volume levels until the next time the headset volume warning
is displayed.

This patch adds an optional feature to ensure volume is no higher than the safe
level every time a headset is connected.

Change-Id: Idaa9cc9549bc3c6278e1e44490433c5366c29c16
ProximitySensor: check for correct MaxRange value

Use TYPICAL_PROXIMITY_THRESHOLD for devices that returns incorrect mProximitySensor.getMaximumRange() value;

Presto's proximity sensor returns values: 0.0f(near) or 5.0f(far).
mProximitySensor.getMaximumRange() must return proximity sensor's availible range, but it always return 0, so mProximityThreshold is also 0.

So boolean positive = distance >= 0.0f && distance < mProximityThreshold;  positive will never be
true.
The cause of this problem is proprietary sensor.msm8660.so, it must set proper Range and Resolution for proximity sensor.

Change-Id: I0cf81fd20f210115cbd6db10c0070b12f1c57336