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

Conflicts:
	services/java/com/android/server/VibratorService.java
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
SystemUI: Rework SearchPanelView calculations

Make isScreenLarge calculations match how the system calculates where to put the navigation
bar. This fixes certain cases where the quick launch buttons on the glowpad of the
navigation bar is improperly oriented.

Patch set 2: The eval should be greater OR EQUAL to 600, not just greater. Also cache result
into a boolean before returning it.

Patch set 3-4: Actually cache it this time.

Patch set 5-6: Make it final.

Change-Id: I5703578b4d49a6eeab100bb23167abd5cf9a326d
Left handed navbar: fix keyboard placement in immersive mode

when using immersive mode with left handed navbar in landscape the keyboard doesn't account for
the navbar appearing from the left and leaves an empty layer on the right, we need to use mStableLeft
so it takes its position accordingly.

Change-Id: I937e46661673b8560357afd4cbd7289bae87734f
SystemUI (MSIM): Add extra vaules for sim state ready

From: https://www.codeaurora.org/cgit/quic/la/platform/frameworks/base/commit/packages/SystemUI/src/com/android/systemui?h=LNX.LA.3.7.2.c5&id=8489b3de7da4efef624bacc6a1d5cf31bd922475

Change-Id: I14176d4cab14bc90198cefd3f4b4880b6d14f566
 MTU should be 1358 as per 3GPP standards, especially for LTE radio interfaces.

Change-Id: I5d3601b05a41d4c59cff3b39ddfb66d00cb23c45
Signed-off-by: Stacy Devino <swylie@oceusnetworks.com>

Patchset: 1
http://review.cyanogenmod.org/#/c/75075/
Screen Recorder: Increase max screen recording time to 30 minutes
Patch SysUI force close in Heads Up

Change-Id: Ifa58da1e85dfa96ecc23e203abcb964c7f41b092
Themes: Force recompiling common resources when scanning theme

If a theme is re-installed multiple times and in less time than
the 3 minute timout for common resources, it is possible for the
installation to fail because it does not compile the common resources.
This is not something an average user would encounter normally but
theme designers that are working on there theme and constantly
installing updates have a better chance of encountering this situation.
We simply remove the theme from mAvailableCommonResources which will
allow them to be recompiled.

Change-Id: I04b64645157dbb1d0c26fab95c851b34bfff3f42
SystemUI: Fix data activity arrows for MSIM

PS5: Fix CAFs bad camel case

Change-Id: I77d4ce6d9707d621f417afadf0063a61777bb0bb
Automatic translation import

Change-Id: I7924f25b6405d5a5fa626eb2ba33ea8bd34190ff
Call recording encoder/format choice 3/3

PS1: Adds a user option between WB AMR (the default) or HE-AAC for the encoding of call recording audio. Also changes the output format of the file appropriately (WB AMR now uses the WB_AMR output format and HE_AAC chooses the MPEG_4 output. File extensions are adjust accordingly as well).
This was in reponse to people complaining the quality of call recording audio is poor. It's noticibly better using HE-AAC, but filesizes are larger.

PS2: Removed Whitespace

Change-Id: Iffcdd3ba6f9aa80e238bbcc5db51809a4721711e

Patchset: 2
http://review.cyanogenmod.org/#/c/73450/
Hover master switch (1/2)

Remove hover icon from expanded status bar and with this add a check box in settings area for enable/disable.
This commit also open more space for notification reminder click area

Change-Id: I0d58a4d23a4e6e879cf3b8a305945e76d79e3505

Conflicts:
	packages/SystemUI/res/drawable-xxhdpi/ic_notify_hover_normal.png
	packages/SystemUI/res/drawable-xxhdpi/ic_notify_hover_pressed.png
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
explicitly close opened streams

Change-Id: I7584e822146e4ba9b88dbae77c635408f92c7591
Only start one WifiClientScanner

*) Fixes unexpected soft reboots.
E/AndroidRuntime(18586): *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiClientScanner
E/AndroidRuntime(18586): java.lang.IllegalStateException: Cannot execute task: the task is already running.
E/AndroidRuntime(18586):     at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:576)
E/AndroidRuntime(18586):     at android.os.AsyncTask.execute(AsyncTask.java:535)
E/AndroidRuntime(18586):     at com.android.server.connectivity.Tethering$WifiClientScanner.handleMessage(Tethering.java:596)
E/AndroidRuntime(18586):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(18586):     at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(18586):     at android.os.HandlerThread.run(HandlerThread.java:61)

*) Remove unnecessary mDoScan class member variable.

Change-Id: I17ab368366b9a3456a625974c461783c428efec2

Patchset: 1
http://review.cyanogenmod.org/#/c/75197/