[WIP] Multi-window SQUASHED

This is a big work in progress, which currently has some bugs,
but begins to look okay.

You can already multitask a little bit, by using the
app switcher and long-pressing an icon, then select "Add to
Split View".
Last window touched gets the key focus.

Still are some issues with rotation handling - touch an app
after rotation to make it relayout.

Enjoy :)

Patch Set 19

Change-Id: I4a03a84539fd3ac1273f0d3503fe8fafcd16be26

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/app/IActivityManager.java
	core/java/android/content/Intent.java
	core/java/android/view/IWindowManager.aidl
	packages/SystemUI/res/values/custom_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	services/java/com/android/server/am/ActivityStack.java

Conflicts:
	core/java/android/app/IActivityManager.java
	core/java/android/view/IWindowManager.aidl
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	services/java/com/android/server/am/ActivityStack.java

fix derps

Change-Id: I82d4d75ba0a5031bbb56a3c4583db4f48438f70e

[WIP] Multi-window

This is a big work in progress, which currently has some bugs,
but begins to look okay.

You can already multitask a little bit, by using the
app switcher and long-pressing an icon, then select "Add to
Split View".
Last window touched gets the key focus.

Still are some issues with rotation handling - touch an app
after rotation to make it relayout.

Enjoy :)

Patch Set 19

Change-Id: I4a03a84539fd3ac1273f0d3503fe8fafcd16be26

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/app/IActivityManager.java
	core/java/android/content/Intent.java
	core/java/android/view/IWindowManager.aidl
	packages/SystemUI/res/values/custom_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	services/java/com/android/server/am/ActivityStack.java

Conflicts:
	core/java/android/app/IActivityManager.java
	core/java/android/view/IWindowManager.aidl
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	services/java/com/android/server/am/ActivityStack.java

Conflicts:
	core/java/android/view/IWindowManager.aidl

Merge latest omnirom patches for multiwindow

Change-Id: I2116840552cfd9c01d6d0b8dd84021124997d97d
Display options: allow configuration of wake on plug behavior (2/2)

The PowerManager now checks Settings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED
to determine wake-on-plug behavior.  The configuration option
config_unplugTurnsOnScreen is used as the default value of the setting.

PS 2: Fix formatting of if statement

Cherry-picked from: I062794828831a2b6faf4293579103d2251f1bdd0

Change-Id: I7eefff468a64c04e536c377cff3c740a7e568ade
add string for multiscreen

Change-Id: I6214058b77423a13993a80dbd9b4d569c1da22f9
fb: change default value of lid controll to enabled

Change-Id: If8a91d3553344dc6efefe236323aad9b43e7dd50
Fix floating/split collision

Multiwindow split screen was replacing Halo and floating windows, because
the intents were the same.

Change-Id: I29e6e575a0b6a5a6ddf6b6abe593b7c0622a3b33
Remote display framework support.

Any app can use the remote display APIs to mirror to another device...
This can be used to implement AirPlay, Chromecast, or even screen recording.

Change-Id: I6f45b393afb2f9d438d4aa548e8149946741c928

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Fix checkapi

Change-Id: I231b2dbdb0ab2c59bf8f0ba96e9f0da1303b8c7e
BT: Fix memory leak when BT on & off done many times

Solves a memory leak in BatteryStatsService when Bluetooth
is turn on/off. Solution adds missing close of proxy then
Bluetooth is turned off.

Change-Id: I65f9db298459c7c15f6a10c752992f1d38469445
CRs-Fixed: 476145
This will allow us to use torch app from CM

Signed-off-by: iceandfire <arhamjamal@gmail.com>
Fix power menu config

Change-Id: I8fd2d799565bf3f486e15ae39b0d348b095ee4e0
Signed-off-by: iceandfire <arhamjamal@gmail.com>
Remove icon from empty recents panel
Fix reboot disabling in power menu

Change-Id: I8db504857d852ef0c18eb938934577032267ca0b
Signed-off-by: iceandfire <arhamjamal@gmail.com>
Add gesture based lockscreen security. [1/2]
This adds the ability to us a hand drawn gesture as
a means to unlock the device.

In the case that the gesture is forgotton or not
being recognized correctly, the fallback will be the
same as when using patterns.

PS2:
Return SecurityMode.Account as backup for gesture login.

PS3:
Poke the wakelock when a gesture is detected so the screen
will not timeout when an invalid gesture is entered.

PS4:
Clean things up a bit.

Change-Id: I4ca8d7edff0a8906220cf4561d8b90896520e0cd
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/gesture/Gesture.aidl
	core/java/android/gesture/GestureOverlayView.java
	core/java/com/android/internal/widget/LockPatternUtils.java
	core/java/com/android/internal/widget/LockSettingsService.java
Framwork: Add support for variable size pattern lockscreen (Part 1/2)

Part 2: http://review.cyanogenmod.org/#/c/28534/2

Forward port of: http://review.cyanogenmod.org/#/c/20613/

The default size has been replaced with a constant PATTERN_SIZE_DEFAULT=3
It now parses the longInt as a byte, no longer requiring a get/set Int function.
Negative numbers and sizes over 127 do not make sense, so a byte works well.
In addition the logging has been removed.

Patch Set 1-2: Initial port

Patch Set 3-5: New implementation using seperate file for non standard sizes

Patch Set 6: Use AOSP code style

Patch Set 7-9: Remove static code

Patch Set 10: Correct a comment

Change-Id: Ia06fc5a7dc2819f78843fddcf1470d85ebe2ad13
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java

Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/com/android/internal/widget/LockPatternUtils.java
	core/java/com/android/internal/widget/LockPatternView.java
	core/java/com/android/internal/widget/LockSettingsService.java
	policy/src/com/android/internal/policy/impl/keyguard_obsolete/PatternUnlockScreen.java
LockscreenPattern : Toggle dots/error pattern visibility (1/2)

Give user ability to hide error pattern / dots.

Part 2 : http://review.cyanogenmod.org/#/c/33004/

Patchset 2 : Minor formatting
Patchset 3 : Cleanup commit msg

Change-Id: I2af7403b0f72c72e13dd1dec73f8d335ff4029bf
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/widget/LockPatternView.java
	core/java/com/android/internal/widget/LockSettingsService.java
FW: Suspend actions (1/2) SQUASHED

Change-Id: Iea3716c21a367edc5989085e9623695fa12ad87d
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/src/com/android/systemui/BootReceiver.java
wakelock blocking (1/2)

Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	services/java/com/android/server/power/PowerManagerService.java

Change-Id: Id4fd1d8da6ed40517094a5a156f7c6fea622e985

Conflicts:
	core/java/android/provider/Settings.java
try to fix NPE

Change-Id: I0ca7ce4e37637cef3f4f57ff9c181f3617e42e24