Frameworks: add abillity to use quick settings pulldown on the left side

This commit gives the ability to use quick settings pulldown on the left
or right edge of the statusbar. As well this respects still RTL layouts
where it logically should change to the oposite side.

Change-Id: Ibdf0894347e1ed3871f685afd5a29f47efe23a4b

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

(cherry picked from commit d4c8c36a990432646af8dfd811fceb8112bd6c56)

(cherry picked from commit c1968d6682b604b322f076205a686991e1138f28)
Frameworks: Do not allow to access quick settings on secure lockscreen - option (1/2)

We have a lot security guys as user due of using the phones as business phones...that
said a lot complains go into the direction of google how it is possible to have
access to quick settings on a secure lockscreen which is absolutely understandable
due that you are able to control Wifi BT AirplaneMode data etc.

This patch takes care on this problem and adds an option to control this behaviour.

ATTENTION: Due that this is really an UX derp for an average user this feature is
enabled by default now. User need to disable it explicit in settings to get on secure
locksreen the original android behaviour back.

PS2:
- fix derp

Change-Id: Ib437802ae8687dc8e99122a40e285bdd2df3e04c
(cherry picked from commit d3bbd092c835d1a676cb84d0255ea8942b94d8d3)

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

(cherry picked from commit 44d47cd5d9591dbdb9f0423a72fc6f1a9f5444f0)
[2/2] AppOps: Add alarm wakeup op

Port from cm-10.2 / cm-11.0

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Fri Sep 27 21:30:34 2013 -0700
[2/2] AppOps: Add alarm wakeup op
When alarm wakeups are denied/ignored,
the alarm types are remapped as follows:
RTC_WAKEUP -> RTC
ELAPSED_REALTIME_WAKEUP -> ELAPSED_REALTIME
Change-Id: I3a5023e1f6260004319290e776bdb2daf73e9fdf

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu May 22 19:54:01 2014 +0100
AppOps: Don't apply OP_ALARM_WAKEUP to system components
System can freely invoke and manage alarms. Preventing it from doing
so interferes with remote components like the backupmanager (backing up alarms)
due to the mismatched uids between the invoking app and the running
service that takes the action.
Change-Id: I079df8d2522642d6d9194781207df7dd67b715b2

Change-Id: I399a7f0d0b20c562b94ec978976d5d8ebff12eac

Patchset: 1
http://review.cyanogenmod.org/#/c/80210/

(cherry picked from commit be0c0b14476fb94a99abb1f0c39a80538a0626df)

(cherry picked from commit ee0fd4c5faae86cd018dc1a6896d7a3e26e56f35)

(cherry picked from commit d9b40ecc3990f03ac59e307eec3e4785f23d0134)
[2/2] Framework AppOps: Add per Op allowed and ignored counters

Port from cm-10.2 and cm-11.0

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Wed Oct 2 22:06:42 2013 -0700
[2/2] AppOps: Add per Op allowed and ignored counters
Change-Id: Ifb3d25e17dbab082b816a0a655b4796a83af336b

Change-Id: Ifb3d25e17dbab082b816a0a655b4796a83af336b

Patchset: 2
http://review.cyanogenmod.org/#/c/79395/

(cherry picked from commit 05220085f34a1bf9fe9f26afd210558a8341db75)

(cherry picked from commit ad7a51b3b5b67b53bbf20742687b5d4d564d59ac)

(cherry picked from commit 2b549725a89cf5d7d46a212058eb3230382bd4f5)
Profiles: Add a profile picker activity

Patchset 2: Add CM Copyright
Patchset 3+4: Rebase
Patchset 5: Some optimizations

Change-Id: Ic8281e4c6fef6d2f4c56fc01acfe6e54b4c8f51c
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

(cherry picked from commit 86f21d14d8afd1c991f7c35184971616b36d8131)

(cherry picked from commit c15d30fa249cc653b90d83ecaf4ac3e75534bc28)

(cherry picked from commit 3385ff487dcc9d34edab47e5d0687b61c0e777d4)
Return: Smart Pulldown [1/2]

Adds the ability to directly open the QS panel when there are
no notifications present in the notification panel.
This commit combines the enhancement by HardCorePawn for detectin
notification types for the same.

Credits: kufikugel, HardCorePawn

PS 2-4 : Cleanup

Adapted to LP

Added Jubakubas commit

SystemUI: Smart Pull-Down - Any Notification (1/2)

PS
- fixed logic to go inline with all mode in settings - should be fixed on kk as well

Change-Id: I3c9b048f2616d2b8950930cc5bfac27c2364e826
(cherry picked from commit 956a2e01bbddfdb898dbcdc1c2dc6172722e5ff4)

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

(cherry picked from commit e0c530885061fffeae7b344502d362e1731979b4)

(cherry picked from commit 00ed2ecb4c13dedf4c24612f5c989ececa52ac22)
Revert: Navigation bar custom height

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

(cherry picked from commit 02d475dbd8f404a81c0fd19e347de412df80ba51)
move slim helper classes and constants to cmremix resoure

(cherry picked from commit b1a1445d896b88b5f1b5665f564a1c659dc4c699)
SystemUI: Reduce activation area a bit of quick pulldown

Change-Id: I06b3a50982930491c6fd4e70ceda3b1ceee28f87

(cherry picked from commit 1c82c4a4548763aa0397f6bc452ed05ebb46df9f)

(cherry picked from commit da6bb51288e8eca4478196afd7eef27409934b1f)
[Base] Nav bar tweaks

    - Toggle on/off (CyanogenMod alredy did but only for hw keys devices). crDroid allow all devices to do that for those using PIE apps.
    - Nav bar dimensions (height and width)
    - Here we also automatically reverts CyanogenMod navbar toggle: https://github.com/crdroidandroid/android_frameworks_base/commit/b70cda7d0d9b5142f54d390275b5e2ffa64ae9b4

    PS: THIS COMMIT IS A SQUASHED PORTED FROM crDroid KK and 99% od the codes are from SlimRoms. I want to say a HUGE thanks to @kufikugel

(cherry picked from commit 539ffe5ea18583f142d5cf6ba4fd60a70ffb9da5)

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

(cherry picked from commit 6b16dc1c0c1739388d3e00e8409fe486b76d2f57)