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
Return: Listanimation Views and Interpolator [1/2]

PatchSet:
    - optimize more:
    - call provider values only when needed and do not fire them permanently.
      so just do it if scroll state changed.
    - as well go out of the setAnimation method as soon as possible. We
      handle here methods which get called 10000 times during scrolling
      so we need to be as fast as possible.

PS:
- initialize the animation modes default to off just to be sure

PS:
- move state change out of OnScrollListener
- reduce the provider value call to only one call

Change-Id: I5e49d858318420e76101fa6334ff766bd9496c83
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54
[1/3] Base: Flip to Mute/Reject Call

Saving flip action value to settings container

Telephony: https://gerrit.omnirom.org/#/c/4670/
InCallUI: https://gerrit.omnirom.org/#/c/4669/

Change-Id: Ie72dda49d78b23b9bc7d8a886f6916f678c918d1
Lockscreen transparency, blur and rotation

ps2: i spelled if incorrectly
ps3: fix blur disable
ps4: smooth background change
ps5: fix transparency

Change-Id: I247bf8ae1fd637d70183c40b83d6bb486e3cfcf9
lockscreen: update lockscreen blur only when keyguard is not locked

handle with try/finally to make sure bitmap gets recycled if keyguard somehow
shits the bed.

-VanirAOSP

Change-Id: Iae119bd577505926aaa6d457a52e84bc9856290a
DisplayPowerController: reorder conditions for keyguard blur

Check the value of the blur setting LAST. If either of the two other conditions are false, then we save having to do a settings get.

Change-Id: I8cb2862bdf9349ec18a1486d374db543f347d0c5
Lockscreen blur: after the screenshot is taken, handle the rest of the bitmap preparation async with display state change

Change-Id: Ieade432a561a012f442d8cde2f2f11f5e52f749a
Frameworks: Policy: implement a pin keypad shuffler [1/2]

    this is to further prevent people using the tablet guessing your pin based on fingerprints left on the screen
    example of the expected outcome - https://www.dropbox.com/sh/r3xb2q53ksaqni9/Oz1Eu8Dm7O

    - correct coding style
    - added reload button

     PS1: use strings_custom
     PS2: Fix compile problem

kufi

    Ported to new keyguard package on 4.4

Change-Id: Ic19ae2482b5b4562c7c72d97aabd6238a047f0a2
Revert "Continue synthesizing data even after brightness adjustment"

This reverts commit 65031a29132e50a7e233d61c1fedc99b88604c6e.

Change-Id: Ic4731af96ea70b98698d7021a2dc0f3670517994
Re-add auto brightness configuration UI (1/2)

- Add a button into the new brightness dialog that allows opening the
  auto brightness setup
- Enable auto-brightness adjustment (setting for general brighter/darker
  adjustment) and twilight adjustment

- this commit adds as well the complete auto brightness ehancements we had
  on 4.3

Change-Id: I7fd11ddaa112396dcb7508692aacb93bfe3da256
fix remaining blue dialog dividers

Change-Id: I0b4d2d0706f3393933e40d9c70b62aa3c9b68ed5
fb: correct seeker fb style for 4.4

based on this commit https://github.com/SlimRoms/frameworks_base/commit/a845169c128c19825a69a0ebdf2e4d366fdd67ad

the idea was good but bad done. A middle in the night action lol.
Problem is that holo light themed app cannot handle the white seekbar of course
So add the complete seekbar into the Holo.Light switch to support both cases

Holo: white seekbar
Holo.Light: drak gray seekbar

Change-Id: I82252d0cb30cd4af47d624a37ccc904cb7e9c1e6
fb: global menu follow new 4.4 UI

the sound indicator is still ICS blue...change it to white
In general we should consider to change all tab_selected
files into a Holo.Light switch due it is already defined in styles.xml

but thats work for our themer :p

Change-Id: I02b5331e223319517c5536522cd6bc419745ce3f
Smoother Upload and Download Animation

Change-Id: I6e6409cc85ad951019dbac10156d4aed92f4c5bc
fb: change alert dialog to new 4.4 UI guidelines and add

Holo / Holo.Light switch to reflect it proper on the
different app styles

Change-Id: I0fb7cd06d19a8eef66551e9f0281d60f33b2efe6
BatteryService: fix FC on boot until battery stat is present

updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.

I/SystemServer(  502): Battery Service
E/System  (  502): ******************************************
E/System  (  502): ************ Failure starting core service
E/System  (  502): java.lang.NullPointerException
E/System  (  502): 	at com.android.server.BatteryService$Led.updateLightsLocked(BatteryService.java:735)
E/System  (  502): 	at com.android.server.BatteryService.updateLedPulse(BatteryService.java:709)
E/System  (  502): 	at com.android.server.BatteryService.access$1600(BatteryService.java:86)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.update(BatteryService.java:860)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.observe(BatteryService.java:822)
E/System  (  502): 	at com.android.server.BatteryService.<init>(BatteryService.java:187)
E/System  (  502): 	at com.android.server.ServerThread.initAndLoop(SystemServer.java:328)
E/System  (  502): 	at com.android.server.SystemServer.main(SystemServer.java:1309)
E/System  (  502): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/System  (  502): 	at java.lang.reflect.Method.invoke(Method.java:515)
E/System  (  502): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
E/System  (  502): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/System  (  502): 	at dalvik.system.NativeStart.main(Native Method)

Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f
Revert "fb: global menu follow new 4.4 UI"

This reverts commit 9607d25eb34f3c7141ca23aaffcdea0134aeadfe.

Change-Id: I8cf09f4dc2deafc428e77e356bce1ce1cc6b2412
Revert "fb: correct seeker fb style for 4.4"

This reverts commit 363b71616a8e03059ecef5b48883fbf615d42efc.

Change-Id: Ida0bef5d6a2a5feac4f21018c2fde327b0144b6e
Revert "FW: Revert all recent white UI changes"

This reverts commit 910f52fdee9840e933e022761ae5137968e8560b.

Change-Id: I2c79b71d66aa33836c5320c658cadee93381de92