Settings: Do not rely on isRotationLockToggleVisible

on special situations it happens that the entry gets removed due that isRotationLockToggleVisible returns false.

Fix it with checking if we have general rotation support (isRotationSupported(Activity))

Change-Id: I05913352dfea764a7242d1c6d49cdee1779f4880
AppOps: Clean up AppOps settings.

Remove unused operations

Change-Id: I20b3cd3eae5a8e669ced9767b9a9602848ab65a1
AppOps: Show only operations that are allowed to be modified.

Not all the operations of packages are allowed to be modified.
Just show operations of all pacakges that are allowed to be modified.

Change-Id: I86097acf038c044c97124e581b2806d921dc4a1d
AppOps: Add more operations in app ops settings.

Add following operations in app ops settings.

-- Wifi enable/disable
-- Bluetooth enable/disable

Change-Id: I32183d77b88c326168557444a445765b5a69de6f
AppOps: Add support for MMS operations.

Add support  for following MMS operations:

-- Send MMS
-- Read MMS
-- Write MMS

Change-Id: Icc823b9bcb446f962927ac0b50fbdae2f3ed3b02
AppOps: Add bootup tempelate

This tempelate lists all the sevices and apps that auto start on bootup.

User can use this tempelate to control list of auto start applications.

Change-Id: Ibf03d7df0037c87eb2ef3ca48a34ef46a103b4d7
AppOps: Add support for nfc operation

Add support for nfc operation

Change-Id: I0ca617b11d3f65f80cc49c3f629312e2fee1ba91
AppOPs: add delete ops in appops Settings

Delete operation is required to be seprated from modify
operation. Add delete ops for sms, mms, contacts, and
call log.

Change-Id: I704d436f2f42ae614ad430463488507d1dcdf2fd
AppOps: Add mobile data-on permission control.

Add mobile data-on permission control.

Change-Id: I0956fb1575addb5f4e522e664a80442120190b86
Settings: Accessibility - We want consistence...change from CheckBoxPreference to SwitchPreference

Google changed it on all main settings. It does not make sense that on system settings
the old CheckBoxes are still used.

This commit changes all CheckBoxes in accessibility settings to Switches

Same needs to be done for Date and Time and Developer Settings

Change-Id: I335285270bcb8fa5e6e86f32a099f901e6d44d29
    Settings: Date and Time - We want consistence...change from CheckBoxPreference to SwitchPreference

    Google changed it on all main settings. It does not make sense that on system settings
    the old CheckBoxes are still used.

    This commit changes all CheckBoxes in Date and Time settings to Switches

    Same needs to be done for Developer Settings

    Change-Id: I5c1f34b813ede998e4fb9dab2a1184a6db51bf79

Change-Id: I1eecfa0e10054e3acf1d4afd58a31f2f35ab476f
Settings: Add per app controls for LP keyguard notifications (2/2)

Nice done by google but the UX is a problem especially for ppl who are using a lot apps and just want
to see from important apps the notifications on the lockscreen.

This commit adds the ability to

- enable/disable per app the keyguard notification at all
- enable/disable per app ongoing notifications on the keyguard

We handle this over the app policy conf file like the other per app notification options

Change-Id: Ie4966f9048718c080571935796258625413f7344
Settings: AppOps - move all arrays and strings into slim files

2 reasons

 - this way we can translate it easier with crowdin
 - and which is more important right now it breaks on other languages due that the aosp arrays
   are not addapted to our new permissions.

So moving all to our own files gives us the freedom and flexibility we need and want

Change-Id: If0e7aada60501c5edf5e6a54ef68a1a761a113a8
Settings: Add ability to control default value of DOZE_ENABLED

Devices can enable the doze feature. Devices without AMODLED screens can use it
but it will use then of course more battery. This devices should disable this f$
by default and let the user decide to turn it on.

to change the default behaviour add into device overlay

config_doze_enabled_by_default and set it to false

Change-Id: Id567cc08b16bdbdbf28f39045f95b2e6c8f06e7b
[2/2] Settings: Battery and Notification Lights

PS2: *) Move menu options to sounds and notification
     *) Remove samm debug cruft

PS5: *) Update UI

changes by kufikugel:

- move battery light options to battery stats screen
- remove battery and notification light entry if device does not support it
- small cleanups and addaptions for LP

Put together from:

Author: DvTonder <david.vantonder@gmail.com>
Date:   Fri Apr 6 07:39:11 2012 -0400

    Settings: Notification light(LED) settings

    This commit adds the ability to configure the Notification light
    color and pulse rate both for the default and a custom applications
    list.

    This work was done in collaboration with Marko Mihovilić (m1h4) who
    wrote the initial implementation as a stand-alone application and
    helped with the fixes below.

    NOTE: Google Talk notifications originate from the "Google Services
    Framework" so in order to override their settings you need to add
    this package instead of the Google Talk package.

    Change-Id: I6837210367123bc02ea27a9b7b6b3cf80c738bf1

Author: Danny Baumann <dannybaumann@web.de>
Date:   Thu Nov 7 09:04:29 2013 +0100
Add back notification light settings.
Change-Id: I474a14a1b395407f5ca273a5d6a3a7f03f7e4698

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Sat Jan 4 15:52:47 2014 -0800
Settings: fix led pulsespeedoff disable behaviour
Keep led pulsespeedoff disabled if pulsespeedon is
disabled.  This ensures that pulsespeedoff stays
disabled if onOffChangeable was set to false.  Fixes
problem where charged led pulsespeed off looks to
be configurable in the ui and thereby creating user
confusion.
Change-Id: I6ac7f630544bf719b39e1ddcab435322975430c8

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Tue Dec 31 12:11:05 2013 -0800
[1/2] Settings: instant led test
Show LED color in realtime when configuring
notification colors.
Requires framework patch for notification
extra EXTRA_FORCE_SHOW_LIGHTS.
Change-Id: Ic7858d79cb2351c407afd547b33652a9e04ef1b9

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Sat Feb 1 18:36:15 2014 -0800
Settings LightSettingsDialog: update led on text change
Change-Id: I135f37829b9b4fb2166afac9d9531b76a62f3ef7

Author: Danny Baumann <dannybaumann@web.de>
Date:   Wed Jun 25 08:56:17 2014 +0200
Deduplicate adapter-of-installed-packages code.
Change-Id: I454ba79eddaaff86233a2cc341f4c8bebe94729e

Author: Michael Bestas <mikeioannina@gmail.com>
Date:   Fri Oct 17 00:48:17 2014 +0300
Fix copyright headers
Change-Id: I7934d01f89953e577c3cb074dce608d9bedd4027

Author: Michael Bestas <mikeioannina@gmail.com>
Date:   Wed Oct 22 02:23:15 2014 +0300
Add support for single color notification LED (2/2)
Change-Id: I4cf21dda3d9e311146149c2ec81fe2398f5f9f87

Change-Id: Ie1203c64484c7d9bed0a6bc0b2808e69ef4bfa35
Settings: Developer Settings - We want consistence...change from CheckBox…

Switch to SwitchPreference

Change-Id: I402b0e3cda4f8e2c49787a1455acabcfd4220ac5
 Settings: statusbar clock customization + initial interface + color
picker

- added slims clock and date customizations for status bar
- added our own modded marginov color picker which we use as default
- added initial interface settings. A bit empty currently but we are on
  alpha and it will be filled fast for sure. Added as well two empty
classes
  due that we need them later

Originally by kufikugel. I just ported to 5.0

PS:
- small cleanups and adaptions to LP
- add personalization category on dash board.
- go inline with new default values on fb patch
- add correct dialog handling
- use correct reset icon
etc.

Change-Id: I2fee223474b6c8772d6d5abe321fa310a5632794
Settings: add double tap to sleep option

yeah yeah ppl missed an option on kk....they have won xD

Change-Id: I2f74fed225c46df84b0e81072721b959cc66cd67
Status bar brightness control

+ added some fixes to original implementation (thanks mostly cm for that)
+ add multiuser support

Change-Id: I108086b07dea9cc6d59bfbdd9652b3aa33dcfe74
Fix FC when trying to adjust radio band via *#*#4636#*#* dialer code.

Fixes:

1. Add additional strings to BAND_NAMES array for additional bands from ril.h
2. Fix logic when adding band strings to selection list (for loop ends before entire array is read)

Change-Id: I5ff883a469f757a30c71d7d72c8f6ace19ce7a4d
Signed-off-by: Andrew Xie <andrew.w.xie@gmail.com>
(cherry picked from commit 4845045bb2dfd9b1a67f9f0c62bb44bfc5152284)