Frameworks: slimrecents fixes

Frameworks: slimrecents: allow closing recents in middle of the open

Frameworks: slimrecents: call app details screen correctly
Signed-off-by: hany <hany.alsamman@gmail.com>
Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter

Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present.

https://code.google.com/p/android/issues/detail?id=18316

Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246
Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
Check ProcessesReady before broadcast

Most of the time testIsSystemReady is used to know if we are allowed to broadcast intents.
But in broadcast intent method we check mProcessesReady flag (not mSystemReady).
If we broadcast after systemReady flag but before ProcessesReady flag, system will crash

Adding condition to check if system & processes are ready fix that race condition

Change-Id: I17e42bff957164b139f85ee92ace1c5867e7265a
Signed-off-by: Fabien DUVOUX <fabien.duvoux@gmail.com>
Fragment animations are not being saved across configuration changes

As per comment #5 in issue #25994:

The problem here is not that the state isn't saved and restored, the problem is how the BackStackRecord is rebuilt.  The ops themselves do save and restore the state, the problem is in BackStackRecord#addOp.

    void addOp(Op op) {
        if (mHead == null) {
            mHead = mTail = op;
        } else {
            op.prev = mTail;
            mTail.next = op;
            mTail = op;
        }
        op.enterAnim = mEnterAnim;
        op.exitAnim = mExitAnim;
        op.popEnterAnim = mPopEnterAnim;
        op.popExitAnim = mPopExitAnim;
        mNumOp++;
    }

The enter, exit, popEnter and popExit animations are overwritten with whatever is currently in the record, which during the restoration process these are 0 so the values which were saved in the ops is lost.

Change-Id: I095cc7ff4ae65581d728f34217fb873ad2f0c574
Session: Add a shortcut in detecting if a window that contains the wallpaper is null or not

originally, a null window would be detected in WindowManagerService, an exception would be thrown, and then that would be caught in Session

Change-Id: Ib937d029bb7a27dac15ff38ecf3b4fbb51bc417c
NotificationManagerService: notifications with icon==0 are FINE WITH US

This warning reminds me of that saying about squeaky wheels... "the squeaky wheel gets PUNCHED IN THE HEAD"

Change-Id: I3e1a1e55ce3ce1f70c7b187a237625257bdbd591
Signed-off-by: pcarenza <pcarenza@gmail.com>
Frameworks: slimrecents fixes part 2

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

Frameworks: keep IME keyboard alive due recent is showing

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: Ieae1d8ee2b71597bcb2025222c22d4514220ecc3
Signed-off-by: hany <hany.alsamman@gmail.com>
Refactor
fb: change default value of lid controll to enabled

Change-Id: I7173d2f8e575a67647b706beebbe1cb9b4d7af7c