Remove notification pulse and light for devices without LED

PS2: if Light Options category is now empty, remove it

Change-Id: Ib42f792faeffe8c454a5e1dcf7ee0970254189b0

Conflicts:
	src/com/android/settings/DisplaySettings.java
Revert "Hardware keys and button backlight settings"

This reverts commit 473a7927bb639ebce3e9c95c959ad669ad1f59a1.

Conflicts:
	res/values/liquid_arrays.xml
	res/values/liquid_strings.xml
Revert "derp"

This reverts commit 5c59b72766c7811b6f8e34a227b32bf962fb0477.
Revert "Remove duplicate swap volume keys option"

This reverts commit bf3da60694f240cc31e08b3b02207828cf66b112.
Revert "Remove duplicate volume wake option"

This reverts commit 9c2461fa2761ed49ee52052ea565ab06c30d24f3.
Revert "Add Capacitive touchkey button light timout settings."

This reverts commit 7443d0d0777a1476b85b4770b3d1d884d850a6c4.

Conflicts:
	res/values/config.xml
	res/values/liquid_arrays.xml
	res/values/liquid_strings.xml
	src/com/android/settings/DisplaySettings.java
Revert "Remove duplicate volume button music option"

This reverts commit c61fd45f43d882d0471c866d0900904cb3628c47.
Revert "Display Settings: Better font size control"

This reverts commit c8948a958522394fa62344fde14d99b6013b6b51.

Conflicts:
	res/values/attrs.xml
	res/values/liquid_strings.xml
	src/com/android/settings/DisplaySettings.java
Remove some unwanted settings configs
Cleanup and organize settings arrays
Cleanup and organize settings strings
Remove unused file stream import
Fix animations derp and font scale
[2/2] Settings: Make menu unlock configurable

For devices with hardware menu keys, menu unlock is turned on by default
This can cause unintentional unlocks. This commit adds the ability to turn
Menu Unlock on or off as desired (Settings -> Security)

System Default is for menu unlock to be ON. This default value can be
overriden using a device overlay:

overlay/frameworks/base/packages/Keyguard/res/values/config.xml
<!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
    <bool name="config_disableMenuKeyInLockScreen">true</bool>

This commit requires the matching commit from frameworks_bases repo:
https://gerrit.slimroms.net/#/c/2394/

Based on: https://gerrit.omnirom.org/#/c/3318/

PS7: update overlay location
PS8: fix config value retrieval
PS9: rebase
PS10: catch NPE of mMenuUnlock if screen lock 'pattern' is used

Conflicts:
	res/values/slim_strings.xml

Change-Id: I8fc38b17315a050b10bb6d5fb13f6abf0f306e08

Conflicts:
	res/values/liquid_strings.xml
	res/xml/security_settings_chooser.xml
	src/com/android/settings/SecuritySettings.java
Fix usb mass storage setting derp
Settings: add better dialog handling for adb over network

thanks fusionjack for this

his fix was accidentally removed

Change-Id: Icc09585f719e743ba5bd8b830586f2ebc0018a71

Conflicts:
	src/com/android/settings/DevelopmentSettings.java
[2/2] Settings: Slims Hardware Key Rebinding

First thanks to CM team for the 2 years where we used their approach for our
custom hw key rebinding. This hardware key rebinding
patches did in the past a good job and we extended it prior 4.3 with a lot
Slim custom stuff.

But it is time to go new way and to do the complete
hardware key rebinding more flexible and more centralized. Especially due
that we have now all possible shorcutactions centralized in 4.4

Possible mapping are:
ACTION_HOME
ACTION_BACK
ACTION_SEARCH (in app search)
ACTION_VOICE_SEARCH
ACTION_MENU_BIG
ACTION_POWER
ACTION_NOTIFICATIONS
ACTION_QS
ACTION_RECENTS
ACTION_SCREENSHOT
ACTION_IME
ACTION_LAST_APP
ACTION_KILL
ACTION_ASSIST
ACTION_VIB
ACTION_SILENT
ACTION_VIB_SILENT
ACTION_POWER_MENU
ACTION_TORCH
ACTION_EXPANDED_DESKTOP
ACTION_THEME_SWITCH

and custom app/shorcut of course

Possible actions on all keys are:
normal tap / longpress / double tap

So to sumarize if it is in settings array enabled user can bind whatever of the above
actions to every hardware key action.

Main changes to prior solutions are:
- do not depend anymore on hardcoded integer values. We use now strings. This has
  the advantage that we can save whatever shorcut or intent URI we have into this
  value. And gives us the possibility in future without changing anything on the hw
  key rebinding code to get more options/or modify the options. Actions are holded
  like on all other of our features in ButtonsConstants.java
- All actions are peformed over our SlimActions like all other features. SlimActions
  takes care about all possible solutions the user can run into and sets the right
  open animation, keyguard handling etc etc. As well it is easier to maintain only
  one code base.
- Only observe and update the values on hardware key devices. On non hw key devices
  the complete code is non operational
- Removed in settings the not needed overlay due that we can use the fb one to
  check if it is a hw key device or not.
- Major cleanup of a lot old code.

This patch add as well one new SlimActions action....VOICE_SEARCH

To configure your device you need to add the device overlay as usual:

overlay/frameworks/base/core/res/res/values/config.xml
<!-- Hardware "softkeys" present on the device, stored as a bit field.
         This integer should equal the sum of the corresponding value for each
         of the following keys present:
            1 - Home
            2 - Back
            4 - Menu
            8 - Assistant (search)
           16 - App switch
        For example, a device with Home, Back and Menu keys would set this
        config to 7. -->
    <integer name="config_deviceHardwareKeys">7</integer>

Also requires fb commit.

Cheers HCP and kufi

Changes to prior patchsets:
- reflect fb changes
- simplify code
- code cleanup
- instance handling of error dialog
- some minor tweaks

PS:
- complete reworked....using now like on navbar etc custom dialogs to be
  consistent and pretty :D
- reset to default is not implemented yet...no idea if we want that or not. Any opinions on it?

PS:
- implement fb changes and use central HwKeyHelper class

PS:
- added reset button

PS:
- added double tap to all bindable keys

Change-Id: Ie4794073236f0b6fe308b931d7d6e9d02a1ddf02

Conflicts:
	res/xml/slim_navigation_settings.xml
	src/com/android/settings/slim/NavigationSettings.java
Bluetooth:GAP: Handle exception while unregistering the Receiver

Handle the IllegalArgumentException while unregistering the
Receiver.

Usually when user presses both cancel and okay for the disconnect
dialog, OnClickListener will be called twice for both options,
and for the second time it is expected that receiver would have
already unregistered.

Change-Id: I36e30d551df76b7cfd1754305a1087578fd4a275
CRs-Fixed: 595648
Fix settings package build derps