Fix home key long press to work when assigned to recent app switcher.

Change-Id: Ibd16ff07b9910605c95180b54040f3e2b78939cb
Fix rotation animation in expanded mode.

When expanded mode is enabled we never changing
value of mTopIsFullscreen but it should be updated so
selectRotationAnimationLw will choose correct animation.

Change-Id: I08906d4237696fe549b3799da38b58a0d56ac62c

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Freeze screen while changing expanded desktop mode.

Also animate from old to new state.

Change-Id: I2db8ec4d55f7b8b5e592cc1ef21b86ebdbd00eb0

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
PhoneWindowManager: Delay setting updates during window animation.

Change-Id: I90ee5d8f83176a38a32b5ff38c4b191f1b78532e
Fix dock intent lookup.

PackageManagerService doesn't support UserHandle.USER_CURRENT passed in,
so always pass in the real user ID.

Change-Id: I86ed3cc41ee52628da874500d280f722501233cf
Fix expanded desktop layout in landscape

Change-Id: I9292ff994c2b5b185d47222be98665f36e528068

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
PhoneWindowManager: Hardware key handling fixes and cleanup

-   Call cancelPreloadRecentApps for long presses and double taps of the home
    key at the right time based on the assigned actions.
    (Reverted Ibd16ff07b9910605c95180b54040f3e2b78939cb as the issue is fixed)
-   Do not allow any menu key events through to apps if
    mPressOnMenuBehavior is not KEY_ACTION_MENU.
-   Don't cancelPreloadRecentApps when menu key is released after a long press.
    (Reverted Idf1d27aa725547e0ddc44905e27da6c1b4540fab as the issue is fixed)
-   For the menu, app switch and assist keys don't cancelPreloadRecentApps on
    long press if the long press has no action assigned to it.

Patch Set 2: -  Fixed not cancelling preload on long press of home when double
                tap is bound to recent apps.
             -  Reduced delta against AOSP.
Patch Set 3: -  Do not perform long press action when key continues to be held
                down after a double tap on home.

Change-Id: I3cc8f9528e5dbd3e0b78308b03440abd9d9351f6
Camera button support (1/2)

Add new bitmask for Camera button and "hasCamera" boolean.
For those devices that have dedicated Camera key
(like Sony ZL/ZR/Z1/...)

Change-Id: I1a6681664f9f3fd3f30221ba10b082cb5f8cafca
Camera button support: make it actually work

Previous commits were merged so fast that I didn't even
added the code that actually DOES launch the camera.
Let me fix that.

Change-Id: I4fcb3c46e5fd50e273dcf19fd3eb35a3f9d979e0
Fix unresponsive home key after waking device with a long press

With the lockscreen disabled mHomeConsumed would not be properly set back to
false upon releasing the key, causing a subsequent press to perform no action.

Change-Id: I38eeba5850c2f0474cc4cca82a9dcbf17afa4665
Support displaying status bar and navbar in expanded desktop.

Change-Id: I961cfdc12efaa5120b6766caebabfe17f6bbed38
Clean up check for allowing transparent status bar.

Change-Id: I9f8339981dbaaa69e6494b822f42add6cce2a360