Base: Improve QuickSettings and bugfix

since im going to rewrite the QS but need more time, so i upload another commit
to fix some bugs and also improve the QS :)

based from
https://gerrit.paranoidandroid.co/#/c/3569/ and https://gerrit.paranoidandroid.co/#/c/3594/
thanks @BigBrother1984

slimroms patch (forgot the commit xD)
thanks @kufikugel

and small changes in our QS implementation

fix http://jira.omnirom.org/browse/OMNI-515
fix http://jira.omnirom.org/browse/OMNI-568
fix http://jira.omnirom.org/browse/OMNI-569

merged https://gerrit.omnirom.org/#/c/5164/
       https://gerrit.omnirom.org/#/c/5163/
into this since this commit now works :)

add longpress SleepTile toggle powermenu
fix bluetooth icon back tile
fix sleeptimeout mode
make sure invalidate all tiles views are called
remove unneeded animation listener (thanks @BigBrother1984)
fix Tiles background color
only auto arrange if dynamic mode enable on landscape

Change-Id: I0445e2018b1d0e4242850c7989b4285a3a7114c7
[1/2] Base: ActiveDisplay (rework interface)

really fix AD buggy stuff
tested with Music play
tested with No lockscreen
tested with faster screen turn off
check all sensor going off if AD not Showing or Disabled
fix notification posted/removed
make AD using System Window so it will covered all screen
fix Navbar translucent if Lockscreen Blur merged :P
now using Rounded Image
also introduce new RoundedImageView widget
 courtesy of @vinc3m1 (thanks)
fix build
fix sometimes screen turn off after unlock because screen timeout (hopefully)
now using new parser to get Notification data (thanks @Achep for the parser)
rework lightsensor manager
add NotificationUtils
fix brightness sometimes not changing

add support applications privacy mode (will not show content message if enable on each app)
see http://jira.omnirom.org/browse/OMNI-600

allow bypass AD if no notification and lockscreen is secure
see http://jira.omnirom.org/browse/OMNI-594

fix proximity always enable after adding new feature allow bypass AD
fix parsing notification data from app with targetSDK < 17

fix excluded app value (no body notice this broken since AD merged into OmniRom xD )

add option to allow bypass AD
make AD multiuser support

Conflicts:
	packages/SystemUI/res/values/custom_dimens.xml
	packages/SystemUI/res/values/custom_styles.xml

Change-Id: I1fc3047496cce71cefc1718b8ef3f4c4fc1605eb
Merge "[1/2] Base: ActiveDisplay (rework interface)" into android-4.4
Base: fix ClockView ActiveDisplay

why no body report this bug?

this happen since AD merger into omnirom for the first time
i found this bug after using 24 time format LOL

Change-Id: I85be84914cc8210d9b0612994a4c25a5c6bfdeb6
ActiveDisplay: Fix for flo and other devices

The changes made to layout/active_display_content.xml were not
made to its layout-land and layout-sw600dp counterparts

Make them here too to stop flo from crashlooping in systemui.

These values may need to be tweaked later, but preventing crashloops
is top priority.

Change-Id: If137eaabad735539cc9d50c107a1733bef71538d
Frameworks/base: FR translation

PS2-7: rebase and add new translation

Change-Id: I0a268fe4b5c23b3d73936f077cbff4b1acb95c1e
bootanimation: performance/speedup enhancements

squashed from CyanogenMod 10

bootanim: Don't cache textures if they're expected to use a lot of VRAM (rmcc)
https://github.com/CyanogenMod/android_frameworks_base/commit/14f9eecd3f543a25c4a2053d6155a9396a777a3a#cmds/bootanimation

bootanimation: performance enhancements (turl)
https://github.com/CyanogenMod/android_frameworks_base/commit/e6b54405aa70d7503a114d9c90ef7518abdd7133#cmds/bootanimation

bootanimation: fix usage of LOGW (intervigilium)
https://github.com/CyanogenMod/android_frameworks_base/commit/e45cf7d232490f44aecf8f2447220a8b5ace4c10#cmds/bootanimation

bootanimation: allow using RGB565 instead of ARGB8888 (tpruvot)
https://github.com/CyanogenMod/android_frameworks_base/commit/204282870a9c69b04ad5ddecd73fafbd7996cbc0#cmds/bootanimation

Change-Id: I203fa23f77d1349fb822a7662e2cd3998ba4c814

bootanim: Don't cache textures if they're expected to use a lot of VRAM

bootanimation cached all the textures generated until the animation
was completed.
For Hi-res animations with lots of frames (like the new CM9 anim on
xhdpi devices), this implied using large amounts of video RAM, more
than most devices actually have available, causing the animation to
stall (and in some cases, gralloc to lock up); so if an animation is
expected to use a lot of RAM (rough estimation based on frame size
and number of frames), disable cache entirely and generate the textures
on demand

Change-Id: I157e5cdde2aab1d82d980d77cbedd9f127c83a1d

bootanimation: performance enhancements

This patch implements two simple performance enhancements, which
might benefit devices. They are completely opt-in by setting
the following variables.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

  * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to
    force texture cache on/off.

Also fixes the sign warnings related to int / size_t comparison

Change-Id: Ie92d1b0aa90b43ba39c368a2a33657a60c3a64b5

Conflicts:

	cmds/bootanimation/BootAnimation.cpp

bootanimation: fix usage of LOGW

Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701

bootanimation: allow using RGB565 instead of ARGB8888

RGB565 uses considerably less memory, and together with texture
cache, it allows us to offer a really smooth bootanimation on
not so powerful devices.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I9da8fd7e6a587b5895519dd0983ec9b8f676771b
Correct executable bit for source files

Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
Base: Factor out preference-in-storage check to overridable method.

taken from
https://github.com/CyanogenMod/android_frameworks_base/commit/e262881de4fd813bf876ff0b3f2a476d30a1b74d

need by
https://gerrit.omnirom.org/#/c/5759/

Change-Id: I64966e15e0e92a2058809ead2c694a9badae881b
[1/2] Base: Add an option to change the device hostname

This adds an option to modify the device hostname used
in ip resolution. This is useful when connecting to the
android device in a dynamic dhcp environment.

Change-Id: I56da8b49899e2a8c1a34bf8eee618e048ba7d82d
Merge "Correct executable bit for source files" into android-4.4
[1/2] Base: fix ActiveDisplay for WifiOnly Devices

fix http://jira.omnirom.org/browse/OMNI-637
also fix for devices with unsupported Proximity sensor and Light sensor

Change-Id: I346d4ed0ca02c6f8a6da1f3bf1de59ac9179d7b7
Merge "bootanimation: performance/speedup enhancements" into android-4.4
Merge "[1/2] Base: fix ActiveDisplay for WifiOnly Devices" into android-4.4
Merge "Frameworks/base: FR translation" into android-4.4
Base: fix Clock showing on lockscreen after reboot

how to reproduce

try enable center clock, and then reboot, you will see, clock is showing on lockscreen, and need to lock/unlock to hide again

user will not report this issue until they enabled center clock, and watch device reboot

Change-Id: I1a038bb258ad03bacfa4b528c2acbb030ab8b024
[1/2] Keyguard: Fix Pin-Layout on Galaxy Tab 2

Fix a long standing lockscreen layout problem that was introduced in 4.2
e.g. on P3100 and P5100

Before: http://i.imgur.com/NETsfBy.png
After: http://i.imgur.com/8ghV2aG.png

Original commit: review.cyanogenmod.org/#/c/57557

Change-Id: Ia3cdc0d10217a0a2504a7287f480d9f036e66eee
base: fix volume default settings for wifi only devices

http://jira.omnirom.org/browse/OMNI-661

Change-Id: I23081d99291d88ee33484fca87eb0f530b7d6cfe
base; added natiional roaming for Simyo in Spain

http://jira.omnirom.org/browse/OMNI-655

Users of Simyo (MCC 214 MNC 19) can roam on Orange (MNC03)

Change-Id: I39b0a3b933ad5a24c82ef33715bc0507c482574b
[1/2] Base: Option to enable Notification Light when screen is on

This makes it possible to let the Notification LED flash even when the screen is on

Change-Id: I58be9646cdc84d4765342a5ab45b4641c3d5daba