Fix the visibility timeout change from never timeout to undiscoverable.

Open bluetooth setting UI, set timeout to 120s. Before achieving timeout,
change timeout to never-timeout, then 120s later, the visibility will
change to only visible to paired devices.
Root cause is if change the visibility timeout to never timeout, the
timeout = 0, so no setDiscoverableAlarm() is called, and the previous
alarm is not canceled(it cancels old alarm in setDiscoverableAlarm).
Solution is call cancelDiscoverableAlarm() when timeout == 0.

Change-Id: I32ad4c11db7a68ff39e88ce3bde6f9e454cb9d41
Signed-off-by: yuwan@marvell.com <yuwang19860130@gmail.com>
Settings: Glowpad Torch (3/3)

Change-Id: Ide6fae8d35afb7f031aefcf6f5703ba57cf1f51d

Conflicts:
	res/values/slim_strings.xml
	res/xml/lockscreen_interface_settings.xml
	src/com/android/settings/slim/LockscreenInterface.java
Revert "put ActiveDisplay in the correct place"

This reverts commit b49a3e92d52704ae693ac65948b931b7039584f7.

Conflicts:
	res/xml/settings_headers.xml

Change-Id: I01e97e1919bdd427e2c8cb4a53aa09717da12615
[2/3] Settings: Remove Active display

Change-Id: I0f2960249fbad02fdab437a59fd84a8b6bf3c86b

Conflicts:
	AndroidManifest.xml
	res/drawable-hdpi/ic_settings_actived.png
	res/drawable-mdpi/ic_settings_actived.png
	res/drawable-xhdpi/ic_settings_actived.png
	res/drawable-xxhdpi/ic_settings_actived.png
	res/xml/settings_headers.xml

Conflicts:
	res/xml/settings_headers.xml
fix misspelling derps

Change-Id: I24edcf3aaec7349f0cbb6cfef5e35a1c9323faf6
genericise excluded app item layout

Change-Id: Id337d3b63e6cf33a1411a85a69a15823dbf38886
[2/4] Settings: TRDS 3.0 and new theme engine preparation

Additional Information:

these packages needs to be tracked by OMNIROM directly (not the case atm) to get
Dialer correctly viewed and other other apps darked out

packages/apps/Contacts
packages/apps/ContactsCommon
abdroid/development
packages/apps/Calculator

the related patches can be found at the repos of SlimRoms:

https://github.com/SlimRoms

PS2:
-rename TRDS to Dark Omni
-move menu entry above "more"

PS3:
- remove slim logo
- bring in omni logo

PS4:
- added Screenshots

http://forum.xda-developers.com/showpost.php?p=49430058&postcount=1446

================= ORIGINAL COMMIT MESSAGE ===============

For the one who do not know this feature see as reference
the first two versions here:

https://github.com/SlimRoms/frameworks_base/commit/b330fde28306286572ba390e451a72539c0c3576

https://github.com/SlimRoms/frameworks_base/commit/3194015737b7944b4185fca007b8d167a0675cd8

we got now over a year now a lot experience how to handle the qualifier fallback
as well how to theme it and how to handle other apps. Based on this knowledge we
redid some parts of TRDS engine with following new features/additions and fixes
to have now a final perfect working TRDS

- compared to the old versions where it was needed on some apps to restart them
  in background this is not needed any more. All is handled about the internal
  AOSP resource handling and on qualifier change the caches are cleared
  and the apps get an onconfigurationchanged to restart the activity
  like it is doing on orientation change eg
- inverted folder is now depreciated and the new folders are holodark
  and hololight which allows on the one hand a dark theme (at least
  how TRDS started) and a light based theme hololight
- This name change is mainly because of the new theme engine which
  will come which uses this as base to add 2 external themes at the same
  time and give the user the ability to switch between them. But this is
  still in early stages and this commit is just the preparation for it
- Two new automodes are now integrated. User can enable the twilight modus
  which enables/disables holodark/hololight depending on the daytime...means
  on the evening it switches to holodark on normal day it is hololight.
  The other automode is based on light conditions....means that if it is
  dark outside it switches to holodark....if we have bright light conditions
  it switches immediatelly to hololight. Due of the resource cache handling now
  this happens immediatelly for the user and feels completly system integrated
  and happens without delay. A bit comparable to some navigation tool for cars
  which can switch automatically from dark to light and back
- currently the auto modes as well the manual mode switches between holodark
  and hololight. Due that we do not have currently anything hololight themed
  in the source hololight = stock theme. We will give the user the ability
  later when done to choose between which modes the user want to switch
  (stock/holodark/hololight). But this does not make sense at the moment.
  As soon as we have done the light theme or theme engine (lets see what
  comes first) we will open the ability to choose it. This is only a small code change
- a lot small tweaks and fixes went as well into the new version

Whatever this commit as usual adds the support for it. The themeing is done in the
other commits by kroz which is as well way more extended then on the older versions

cheers

PatchSet:
- derp
PatchSet3:
- tired me derp again
PatchSet:
- adapt to new qualifier structure

- listen to onconfigurationchange and mode settings value
  and let the switch
  switch if the uiThemeMode has changed. As well permit
  manual switching if automatic light mode is enabled
  and inform the user about

Change-Id: Ie0cbc16dc8b2736e77f194676e99eb7fcfd5ddd2

Conflicts:
	res/values/custom_arrays.xml
	src/com/android/settings/Settings.java
Add the themes configuration entry point

Change-Id: I0eb669956d9e89bb92cd43487b14b4246454a400

Conflicts:
	res/values/strings.xml
Launch SuperSU from Settings

If SuperSU is installed, show an entry in Settings below
"Developer options", which launches SuperSU when tapped.
At boot time SuperSU will detect if com.android.settings
contains the resources from this patch, and if so it
will hide itself from the launcher. This was implemented
in v1.85, so we only show the entry if the installed
SuperSU version is at least that.

Change-Id: I1796d92458587b9e961d5d8e6d58099e8367834d

Conflicts:
	res/values/strings.xml
	src/com/android/settings/Settings.java
Take out ROM Updates and ROM Stats, at least for now.

Change-Id: Id3b9d889a0f0084a2b2503a5c76b9f119b7bf722
Show memory full text only for internal storage

When the internal memory is full, a warning text is shown
in Settings/Storage. This warning was displayed for all
types of memory (internal/primary, sd card and usb storage)
even though it was only referring to the primary memory.
With this fix, it is only shown for the primary memory.

Change-Id: I35ad4b0b45c6752ddc9d7166495435b27fd4a170
dedupe Halo setting

Change-Id: I78ccbc13d45bb454d7a667ae412f672afce62dab