Adjust Clear all button margin

Change-Id: I64e3652dbb41da42453177beb6b4c9f24d77b1c8
Frameworks: Advanced low battery indicator options (1/2)

Based on a idea I saw on Liquid and from CR3C0 (thanks guys) which we
modified to an extended version

This commit introduces following new SlimBean modes to indicate low battery

     * 0 = show dialog + play sound (default)
     * 1 = fire notification + play sound
     * 2 = show dialog only
     * 3 = fire notification only
     * 4 = play sound only
     * 5 = none

Due that notification is a unique SlimBean feature some words on it. Notification
behaviour is the same as Pop-up. User can dismiss it manually or it is
dismissed automatically if charger is connected, click on notification opens
PowerUsageSummary. Also you get a status bar ticker message about the notification
and notification is always on first place of list. And last if vibration is enabled
notification vibrates.

Patchsets:
 - codestyle corrections

Patchst
 - add PowerUsageSummary intent

cheers

Change-Id: I2097afad8a090d2557a1e545cf978c87ca77d6c1
Frameworks: LockBeforeUnlock the new way (1/2)

Due that aosp removed the whole LockBeforeUnlock controll (show slider
lockscreen before an unsecure internal lockscreen) we must try to find another way
without touching the security system itself. Long guess short solution, lmao

here it is, next SlimKat feature

cheers

PatchSet:
- bring eca button to front in lockbeforeunlock mode to make
  it clickable on slider lockscreen

adapted our 4.3 version to 4.4 and smaller fixes/code improvements

Change-Id: Ifa25896b60878c15a464a199f00d8144ea336b54
Fix for Lock before unlock (read description)
- Using lock before unlock combined with patterm pin or password when try to unlock using any app or activity instead of normal lock (padlock shortcut) the unlock process only work if we enter the method two times and not in first attempt.

Change-Id: I60c0ec22d7b0278fd0e3b69c42fad6e2afdd5b92
Keyguard: do not show maximized on simpin and several fixes

- to show a maximzed widget container on first boot when simpin
  or puk is requested does not make any sense. In this case
  show it as normal view
- fix sometimes unresponsive unlock handle on maximized widgets
  and bring it to front (happened only in combination with
  lock before unlock)
- a bit codecleanup and centralize
- fix animation was visible on screnn turn on. Now it is directly
  maximized visible

Change-Id: Id4dce13efee29ce44def60b4de9200a4680e2007
fb: follow on seekbars new UI guideline for 4.4

Google forgot some things.....seekbar is one example

Change-Id: I996062a978322c93694e360dff1e4f42dc589062
[1/2] Base: Omniswitch as default recents

OmniSwitch provides broadcast events for showing
and hiding the overlay

We need to make sure that OmniSwitch service is really
running else we will get no recents at all. Also on startup
it will take some time until the OmnISwitch service
has been started.

OmniSwitch will send a service start and stop broadcast
that will guard the usage of OmnSwitch

Change-Id: I5197060326c4997dc63c44339407dd2c52e59ab6
[1/2] base: fix OmniSwitch recents integration for multi-user

we must receive service start broadcasts with the user and send
the overlay broadcasts to the correct user

Change-Id: I0ae350adcd45d99f2c2a835b94de5d86b71e6031
Base: simplify OmniSwitch recents

The handshake between SystemUI and OmniSwitch is nice
but causes issues if one of the parts gets restarted
thanks to android. So simplify it and only use the
settings value. Worst thing that can happen is that
OmniSwitch recents is enabled but OmniSwitch is not running
then nothing will happen if recents is triggered

Change-Id: I43d93ea475f72e55fbc767c65b5050acaf4977eb
Advanced reboot enabled by default (1/2)

Change-Id: Ie8ab34ecc532d14d296e33fa568e6cf3ebc681e8
[1/2] SystemUI: Add time-context headers to the notification header

This commit adds image headers to the notification panel header,
based on the date/time. There are pictures for morning, afternoon
and night, as well as special events like Christmas and new
year's eve.
More will be coming, with eventually a way to use an external
(as in, Internet) provider for those pictures.

Change-Id: Ie3321e9a3e0637d6ba8094dd46aee36c41354713
Add evening time to header

Change-Id: I5d9a41d92803d64f67cf2fb9dd2c4294a947efc3
SystemUI: Cleanup and enhance notification drawer header

- Crop properly images on tablets and landscale
- Use a separate layer instead of breaking header background
- Fix bug where you couldn't turn header back on after turning it off
- Added a gradient overlay

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml

Change-Id: Ife399b82a3f272fb2ecc8e738c5f274f7682a556
Frameworks: Z-recent app screen

One of the parts on AOSP google missed to update/improve in the last
couple of releases is the recent app screen to allow better and faster
multitasking. I had always a special vision how it could/should look
and gives the user a faster workflow.

This commit is now our new recent screen. It is a complete new implementation
and replaces googles AOSP recent app screen. The code changes in the base itself
are quiet miniml to call the new recent screen.

Some notes:

1. This patch needs a new repo: frameworks_opt_cards which is a central repo
   to get any kind of googles cards style. Thanks Gabrielle Mariotti a ton who
   made the base for this library and hellped a lot out.  We just fixed together with him some parts
   and mad it useable as AOSP central library. So we can use it later for other
   changes as well

2. Preload needs to work 100%. So it is needed to check that the calling parts
   (like hw key rebinding, pie, navigation bar) do a proper preload. If they do not
   recent screen will just not show up. To follow what they are doing you can enable
   debug in RecentController.java which exactly shows what was called.

Some notes to the patch itself:

- Recent app  screen slides from the right edge into the screen

- Show recent apps in new google card style. Most recent apps show
  expanded with the app screenshot. Other are collapsed. Of course
  the user can change expanded/collapse of each app during the session where the state
  will be restored on next access.

- Compared to AOSP recents we do a 3 stage loading
  1. step: preload the task list and build or update the cards (does not load any content at this point)
  2. step: User actually toggled the recent screen....icons, text and screenshot thumbnail which will get visible are loaded now
  3. step: Recent screen is fully animated in. All other non visible content at this time are loaded now.
  This allows a smooth experience for the user and a minimal load on the first 2 steps. Especially important due that we handle
  a lot animations which are very picky when it comes to background loads. last 2 steps are async multithreaded loading tasks.

- We are using for the app icons and thumbnails a bitmap LRU cache controller to have fast access to the bitmaps we need. This improves especially
  the scrolling and as well the loading time due that allready loaded app icons are holded in the LRU cache.

- Theme support is included as well for all items the recent screen has

- Most important point: Way faster workflow now. The recent screen neither freezes the underlaying app nor it does interrupt the current process the
  user is in. It just slides over the current app about 40% of the screen. Back button as well just an outside touch (which will be passed trough to the app)
  allows to immediatelly go ahead in your workflow.

- Normal click opens an app, longpress opens app detail screen (note: we have only one hidden action on our current recents. If we later decide there could be
  other actions as well...showing a google card menu button on the top right is a very easy task and allready provided from the frameworks_opt_cards lib)
  swipe left or right removes the app from the current tasks

- Pinch to zoom out gesture provides the ability to remove all tasks with a big red warning!!

- All above mentioned actions are animated.

- As usual it is multiDpi compatible

- A lot work went into the optimizing especially for low end non gfx devices where animations
  as well listview scrolling is not that easy. We got the maximum out of optimization here which
  gives acceptable results on low end devices and amazing one on the gfx capable devices.

- A small side note this patch contains as well a fix on navigation bar preload.

Thats the short description.....user need to see it to get the real benefits of this new way.

cheers

kufi

Change-Id: I1925cd9ea37f2239585445142bd37370f137eabd
[1/2] added Slim Recents as option

take reference add OmniSwitch as defaul recents by @Maxwen (Omnirom)

- make slim Recents as option between Aosp/OmniSwitch
- add a warning dialog when selecting

PS3: Rebase
PS4: Fix Settings.java derp
PS5: Set to private boolean as suggested by Tianrui
PS6: Rebase
PS7: Rebase
PS8: fix derp
PS9: Rebase && derp in a statement in BaseStatusBar.java
PS10: Another derp
PS11: Remove unneeded import from rebase
PS12: Derp fix
PS13: Another derp fix
PS14: Derp-o-rama
PS15: Rebase
PS16: Again another derp
PS17: rebase
PS18: fixed

Change-Id: I9d43f2e5a29ec9c29d172915a14a101907b93ac5
Frameworks: slimrecents: call app details screen correctly

So feedback shows that we only have 2 bugs. For the one patch is up. The other
one is fixed here.

two problems

1. Longpress opened the detail screen twice and wrong

2. It shows up in the task list which it should not. Going inline
   with the AOSP implementation of it.

use TaskStackBuilder to call it proper with our animation on top.

Change-Id: I18ba0a23ee91fe259143567d157bf24a72e1036a
Frameworks: slimrecents: allow closing recents in middle of the open animation

As reported by Tejus Kandachar steps to reproduce:

Press Recents button and very quicky tap on one of the apps in the recents list,
just as recents list is sliding in. If done fast, the app opens but recents screen does not close.
If done normally it slides away as expected.

Fix it with allowing to close the pannel as well on animation in state.

Change-Id: I4c52e6e6a4fd4b3a2a63bc364ead055f0e619faf
Frameworks: Slimrecents: cover bad 3rd party apps behaviour

Recent app screen as well the original AOSP one needs a proper preloading.
We discovered due of reports that a lot apps (launcher etc) just call over
the SystemUIService some even with reflection :/ just the toggle and no
preload at all.

Whatever we cover this behaviour due that we do not want to break 3rd party
apps. If someone calls the toggle without proper preload we preload them first before
the recent starts animating. Listener takes already care on it for low end devices. We
just use this now and let the taskloader in this case decide when the recent app screen
can be shown.

As well this commit disables the logcat spam lol. Forgot to disable debug on the relase
commit

PS:
- fixed code style issue
- go on out animation down in the runable delay. Not needed to be that long at all

PS:
- add another safety check

PS
- another one

Change-Id: I43a47185da446b9ecaec114c1835ecfd20c3ac73
Frameworks: keep IME keyboard alive due recent is showing

Change-Id: Ieae9b899afa99739cc5cfa536a03d6827567c24b
Frameworks: make recent multiuser compatible

wondering how it worked at all on AOSP recents. Whatever call the
list dependent on the user who is using it

Change-Id: Ieae1d8ee2b71597bcb2025222c22d4514220ecc3