WindowManagerService: fix application transitions in expanded mode.

Change-Id: If7d3fc3ab566dedc3a5b38cd0a6dc3185f494e20
Fix profile lockscreen override.

KeyStore.isEmpty() needs to be called under the system UID (as it needs
KeyStore's P_ZERO permission), otherwise it'll always return false.
Achieve that by moving the requireSecureKeyguard() implementation into
the DPM service.

Also take the opportunity to clean up the code a bit.

Change-Id: Ice648f2050f22ee5f27332f23a850f1e90befb94
fb: fix pixelated results on picture resizing/coloring on features which use it

- turn on the filter for resizing
- use a Rect with the image dimesions and apply it
  for drawing the new colored or gray icons

this solves all issues we had on several fetures which allows
coloring/resizing

Change-Id: Icea4f20c06701f41b954406eaf67939d87310b87