base: Add a key combo to start/stop video recording

Press volume up and power to start recording a video of your screen.
Press this key combo again to stop it.

PS2: rebased

Change-Id: Id0b13ba1092a1d6e0bf7bff5f14d89764cdf370c
Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/cm_strings.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Screenrecord: Create the Screenshots directory if it doesn't exist

Change-Id: I2b0458eed024dbda97e9e1ea3426c12d29add781
Power Menu: Add Screen record Option

Adding Screen Record menu entry and Functionality to Power Menu

Change-Id: I715cd91f2db7688ed2ebea18d219090aab4aebcd
Note: Screenrecord is broken on exynos based devices. Trying to record screen will result in device freeze

PS1: Adding Drawable resources for displaying in power menu. Courtesy: ChameleonOS
Change-Id: Ia34f68827576c5bc982f0377929376fa0d9b404d

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
SystemUI: Add RECORD_AUDIO permission

Change-Id: I5af3cbe31f182c8b5cf1633aaf8a16db2856a425
SystemUI: Add missing sound permissions for screen recording

Change-Id: If948aabfd5c2e09f192f12aa02830d39346d2c6c
Power menu: standarize capitalization for Screen record

Change "Screen Record" to "Screen record" to match the standard menu
styling.

Change-Id: I61c7adfe06c1d5ebc53c1c0b15b76e6d28a749f4
base: screenrecord: update notification

Update show/hide pointer button for actual state

Change-Id: I02090f05b06896248483f3f9ff2eb22924a22476

Conflicts:
	packages/SystemUI/res/values/custom_strings.xml
screenrecord: Fix SystemUI loop-crash

Change-Id: I25045820465d21b7d1f0e933e5e4f3324cb044b6
Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/simpleaosp/screenrecord/TakeScreenrecordService.java
[1/3] QuickBoot: Squashed commit of QuickBoot feature from CM

QuickBoot: don't log boot events when in QuickBoot mode.

Don't need log boot events when booting from QuickBoot mode.

Change-Id: Id381530418c09ac1d650f45e7a368dbd7945aff3

QuickBoot: don't wake up screen when usb connected

Don't wake up screen in QuickBoot mode when usb connected.

Change-Id: If65936a0edbbc3b36a0768294e5c3bd7d741018a

QuickBoot: filt out alarms that for non-system users

Don't allow alarms for non-system users when under QUickBoot
mode.

Change-Id: I322d08f7236b6895462c4cd3304326c66f67ddd2

QuickBoot: restrict app's auto start under Quickboot mode

Don't let broadcast trigger apps auto start when in Quickboot mode.

Change-Id: I5d156cbea4ef18397ce4569cb74f73a446a6e49b

QuickBoot: remove alarms for killed apps

Device may be woken up by WAKEUP alarms, which have been set
by those killed apps before. Here to get the killed apps list
and remove the alarms from AlarmManagerService.

Change-Id: Ib34f5fc234b834b2fe4528229c267c8693fc76cb

SyncManager: Fix SyncManager null pointer issue under QuickBoot

BOOT_COMPLETED broadcast will cause mBootQueue null pointer issue.
Then system_server will crash. Add protection here to avoid
system_server crash.

Change-Id: I78029dfa90709455e4c2220e06b95640383655f8

QuickBoot: add execption restore mechanism

There may be some exceptions like battery unplugged When device
is put into QuickBoot mode. Then device will be in airplane
mode after next boot. We don't want such kind of things happen.
So start restore task to check if need restore before main
screen shows.

Change-Id: I3d0967c2f446fd71eca87ff085617edca549c984

QuickBoot: switch normal power off to quickboot

Handle power off button when quickboot mode enabled.

Change-Id: I6a668cbe823018b5e508633a76202d0df0381694

QuickBoot: support QuickBoot power on

Support long press power key to power on when in QuickBoot mode.

Change-Id: Id493d352bce73683b9696a2685a6c902f1195799

QuickBoot: Don't handle SHUTDOWN broadcast from QuickBoot

Don't process the ACTION_SHUTDOWN broadcast sent by QuickBoot.
It is only for apps.
Change-Id: I73d1a7b8edda0a898dd052831033806e18b37c99

QuickBoot: rename some intents and broadcasts

Modify some improper names for intents or broadcasts of QuickBoot.

Change-Id: I92357b0110643bb425199452cb03bd75248a5d83

QuickBoot: Support poweroff alarm under QuickBoot mode

Add white list in QuickBoot mode to support poweroff alarm.
    1. Allow original deskclock app and quickboot app to be launched.
    2. Don't filter out deskclock's alarms.

Change-Id: Ie4254e3da45837d3185d3daba625a42c50fd7f52

QuickBoot: enable poweroff charging under QuickBoot mode

control native charger's enable/disable under QuickBoot
mode.

Change-Id: I4f80c74b042e03bddc9f7fe419f4ed1f8b1409d5

QuickBoot: Add wakeup check under QuickBoot mode

We only want QuickBoot application to wakeup screen in QuickBoot
mode. Add wakeup check to filter out other wakeup callers.

Change-Id: Id82a0938003d2a776efda0e39a57877f41fc1ee4

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	services/java/com/android/server/AlarmManagerService.java
	services/java/com/android/server/power/PowerManagerService.java

quickboot: Only enable QuickBoot if package is installed

 * Also move to Settings.Global

Change-Id: I87e1464d717b41437072523c0ecab52227d7888b

quickboot: Disable quickboot by default

* We probably don't want to enable this by default on devices that have
  it because it is confusing to users attempting to shut down their
  phones.

Change-Id: I80eb946f93509cb3b32f6c790611597921b9c54a

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