Quicktoggles

Patchset 1: Invert actions
Patchset 2: Basic drag and drop handler (temporally stored, no animations)
Patchset 3: Animations and hover effect
Patchset 4: White color, better view swaping method, fixed bugs
Patchset 5: Edit mode (long press on user tile), Overshoot interpolator for scale animation (still temporal)
Patchset 6: Removed interpolator, added animation on entering/leaving edit mode, Stuff sticks through reboot
Patchset 7: Fixed view swapping for real
Patchset 8: Fixed jerky animations
Patchset 9: Fixes for phonestatusbar, preparing for activation method
Patchset 10: Airplane toggle -> Aint nobody got time for dat. Disable activation on user tile (waiting another method to come up to my mind)
Patchset 11: Better drag handler, edit mode on tablets only
Patchset 12: New icons, animations, back to hovering
Patchset 13: Fix behaviour with temporary tiles and slow animations
Patchset 14: Edit mode on phones (credits to Curtis Mayers: https://gerrit.paranoidandroid.co/#/c/241/)
Patchset 15: I'm not the only nitpicky here right?

Change-Id: I967f94428606f8f909cb428eaaa6d12e9d59808e

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTileView.java
Integrate remote display providers into Quick Settings.

This is a first pass at integrating new remote display functionality
into Quick Settings.  The Wireless Display card which previously
only supported Wifi Display is reimplemented to use the media router
to enumerate available remote display routes.  This ensures that the
user is presented with a consistent state regarding the currently
selected display route.

In this patch, the Wireless Display card still launches the old
Settings preference page for Wifi Display when clicked.  This will be
addressed in future patches.

As part of this change, it was necessary to derive some new lifecycle
information regarding the visibility of the Quick Settings model.
When Quick Settings is shown, an onPrepare event is delivered to
give the model a chance to update its state.  Likewise when Quick
Settings is hidden, an onUnprepare event is delivered.

These events allow the system to determine precisely when remote
display discovery is required to update the UI so as not to waste
power performing discovery in the background all of the time.

Bug: 11257292
Change-Id: Id802aa0983b625aeb972b5d123e4cc080dd6705f

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTileView.java
Fix quicksettings issues

Also add rotation tile

Change-Id: I315745ee60030eb8ead4ee1798940b45af91449a

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
Make quick settings show the standard media router icon.

Fixed a bug in ImageView where we failed to inform a newly updated
Drawable about the visibility state.  This caused AnimationDrawables
to not animate when attached to an existing ImageView *unless* that
ImageView happened to be attached to the window *later* or have
its visibility toggled for some other reason.

Bug: 11257292
Change-Id: Iba9e0db5ba0db2b022950aec0c6f60a435da8ad2

Conflicts:
	core/res/res/drawable-hdpi/ic_lock_screenshot.png
Immersive mode on quick settings

This adds the ability to toggle statusbar / navbar via quicksettings (former expanded desktop), but
using the new 4.4 APIs that allow a swipe-up, swipe-down gesture, to restore bars.

Credits to CM project for the implementation
http://review.cyanogenmod.org/#/c/53468/

Drawables by Arz Bhatia

Patchset 2: Rebase
Patchset 6: Fixes from CM

Change-Id: I1f694d87f0364aed7b6951714ea2bfbfd8555064

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/drawable/ic_notification_cast_connecting.xml
	packages/SystemUI/res/values-mdpi/dimens.xml
QuickSettings: Immersive: Collapse panels on click

Most of the time users will want to enable immersive mode and go right back to the app.  This simplifies this process by closing
the quicksettings panel after immersive is activated or deactivated.

Change-Id: I7bb154941405e8efb568cf5c3cce92e963539ff8
Signed-off-by: Evan Anderson <evan1124@gmail.com>
[1/2] Frameworks: Add Native Java Screen Recorder [WIP]

    * This is based on the screenrecorder binary found in frameworks/av.
      It has been converted to a native library with the necessary jni hooks
    * Use quicksetting tile to start recording
    * Use notification or quicksetting tile to stop recording

Credits to 0xD34D from ChameleonOS

Change-Id: I46ed7866e8860d7865feff6f2387175fa90fdae0

Conflicts:
	core/java/android/print/IPrintDocumentAdapterObserver.aidl
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Change-Id: If73d225e38d0a2f7c616c4aeb33f67bdaed390f1
Revert "[1/2] Frameworks: Add Native Java Screen Recorder [WIP]"

This reverts commit 0bb077f1774fc93e68839705cb6bd7f2d7606c0e.
[1/2] base: 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
	core/res/res/values/strings.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java
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.

Change-Id: Id0b13ba1092a1d6e0bf7bff5f14d89764cdf370c

Conflicts:
	packages/SystemUI/res/values/rf_strings.xml
Screenrecord: Create the Screenshots directory if it doesn't exist

Change-Id: I2b0458eed024dbda97e9e1ea3426c12d29add781
temporarily lower external sd security

Change-Id: I497eb6b502d8a9b9cb8d77d5884dd1f1306e4be2
Add native java screen recorder [1/2]

This is based on the screenrecorder binary found in frameworks/av.
It has been converted to a native library with the necessary jni
hooks for interfacing withit via a ScreenRecorder java class.

Volume up + power chord is used to start and stop recording by
binding to the service found in the ScreenRecorder app:
https://github.com/ChameleonOS/android_packages_apps_ScreenRecorder

PS1:
Clean up white space.

PS2:
Fix naming convention for state field.

PS3:
Rebase

PS4:
Post mScreenRecordTimeout with 1000 millisecond delay instead
of 10000.

PS5:
Send record screen broadcast instead of using the service
directly.

PS6:
SCREEN_RECORDER_FRAMERATE should be SCREEN_RECORDER_BITRATE

Change-Id: I5b7af9b4b4f24a8c54ac0f9dcb36ace16672e2cf

Conflicts:
	core/res/res/values/vendor_strings.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Revert "base: Add a key combo to start/stop video recording"

This reverts commit 3b0556ec4c2965dbcc24aa1992e84c8b30743219.

Conflicts:
	packages/SystemUI/src/com/android/systemui/omni/screenrecord/GlobalScreenrecord.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: Iff56f4d9995eaa0146f4e9768a1da9953e0e5a96
Revert "Screenrecord: Create the Screenshots directory if it doesn't exist"

This reverts commit 761a860276b3c348e64e11e391754335298f555a.
Revert "[1/2] base: Power Menu: Add Screen record Option"

This reverts commit 3115f8b7ed0c0f5732e91739ba8ca8268a3250df.
Add global action for screen recording. [1/2]

PS4:
Send record screen broadcast instead of using the service
directly.

Change-Id: Ie6d4655b074992075df0060d23c758f2af06387e

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/vendor_strings.xml
	core/res/res/values/vendor_symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java