fb: TRDS 3.0 and new theme engine preparation (1/4)

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

SlimRoms/frameworks_base@b330fde

SlimRoms/frameworks_base@3194015

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

PatchSets:
- minor code cleanup

PatchSet5:
- use one value for auto modes

PatchSet6:
- kill resource caches on configuration change

PatchSet7:
- register settings observer lol

PatchSet8:
- fix not assigment of config mode change (typo lol)

PatchsSet 9 -11:
- playing around aosp qualifier is not that flexible then I thought
whatever back in most parts to original implementation handling

PatchSet 12:
- now no restarts of any application needed any more like it was on 4.3...yeaaah
- fix wrong shifting in native adapter
- fix wrong call of twilightmode
- disable debug
- cleanup

PatchSet 13:
- fix lightsensor

Patchset 14:
- no need currently to recreate the navbar we can do if a theme needs it

Patchset 16:
- synchronize on sending config change
- only send if system is ready
- fire first update when system is ready

-rebase

============================================

PS: Added two classes (part of SlimRoms)
TRDSConstant.java
TRDSActions.java

Those two will be used to control enable/disable TRDS

Change-Id: I5fb21c022ad507b6c49c2909d4897955311a9436

fb: TRDS dark base theme

PS : remove default wallpapers
Change-Id: Ie25abfbf5258ac479ca8bc91033f6892bbbc6741

trds:[framework] dark images adjustments

Change-Id: Ie038c4a1aa535708c23f099fb5e836407e3d1603

fb: TRDS some tweaks and fixes (1/2)

some smaller issues fixed and optimizations:

- fix twilightmode was wrong assigned to wrong value
- ligtsensor mode after first immediattely switch it does
  not allow for 5sec to switch again....after the 5sec it switches
  to current state if the sensor changed its state in this time.
  This prevends on the one hand on bad light conditions a permanent
  switch between dark/light as well it does not bring the system into
  troubles due of to much configuration changes at the same time
- get rid completly of the observe for the UI_THEME_MODE value and
  handle all over the UIModeManager
- adapt slimActions and settings to this new behaviour/method
- some cleanup and minor fixes

Change-Id: I4b2401bf7bef992ad3112ae5ccc852cd29b46bd0

fb: TRDS change auto detect light conditions method

Currently on critical light conditions it still switches to often between
on and off which results in bad UX and in worse cases to unusable phone
due that it is permanently switching. To prevend that slacken the light mode
level detection and set it when it goes to dark mode way more higher (LIGHT_CONDITION)
and when into light mode back to lower level (DARK_CONDITION)

PS
- 25 looks good

Change-Id: I665f3141fe31f26ca371d10593ff95174d68fc9e

Frameworks: TRDS fix possible UI freeze on auto mode change

- only call on theme mode change when auto mode changes. Under special conditions
  it can happen that it is called twice
- ensure that whenever a mode change is really done to close the notification shade
- minor cleanup

Change-Id: I2f5c7fbcdad71c8dcbf547f4bc5943a95416d7a3

Fix build errors

Change-Id: I3f1398a5753d1d3071c2877a2f2f997807e19b7c

Change-Id: I5fb21c022ad507b6c49c2909d4897955311a9436

Conflicts:
	core/res/res/values/cm_strings.xml
	core/res/res/values/cr_symbols.xml
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
[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

Conflicts:
	packages/SystemUI/res/values/custom_attrs.xml
	packages/SystemUI/res/values/custom_dimens.xml
	packages/SystemUI/res/values/custom_strings.xml
	packages/SystemUI/res/values/custom_styles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
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
SmoothProgressBar: Initial Commit

Change-Id: I83156f0bfcd3d8e3f5864976387e84ae515640b6

Conflicts:
	core/res/res/values/colors.xml
	core/res/res/values/symbols_custom.xml
Port SmoothProgressBar: User Custom ProgressBar Setting [2/2]
S
ample : https://github.com/castorflex/SmoothProgressBar
http://antoine-merle.com/images/smoothprogressbar_all.gif

thanks Dokdo Project

PS2: Rebase
PS3: rebase and whitespaces

Change-Id: I4ee2f3ad15113b47137bd72b1c35702d2200a092
Fix fwb derp for Progress bar

Change-Id: I7062c5b4639159bcd19739bdf31f8b736d8f14e0
SmoothProgressBar: Turn off mirror and reversed by default

Change-Id: If8dd267b1b47b55723f184e822beb2fad5c2be94
Fix build

Change-Id: I213845c044ff33cc3cf07379dfc3ed9305272ef1