Strict Aliasing
frameworks/base: Fix aliasing violations

Fix violations of strict aliasing rules

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Clear all recents drawable by Rush25
ColorFade: Fix memory leak when screen turns on/off

See https://code.google.com/p/android/issues/detail?id=79729#c177

Signed-off-by: Andre Saddler <ayysir@aospal.com>
Change-Id: I88c2366c8a10b074b58169ee5fc05c12e8d05a9b
SystemUI: Materialize volume panel in/out animation

* Thanks to @David96 that had the original idea, material
  oriented, already during kitkat times.

Signed-off-by: BigBrother1984 <carlosavignano@aospa.co>
Change-Id: Ic79d404c4a0d5bc0a83d20cd4e0d7d5ad7b7c90f

Conflicts:
	packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
fwb: Tweak a few Animation Speeds

* Some of these items below are a little bit slow in my opinion.  If you don't like this revert it.

Speed Up Recents Menu

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Speed up Statusbar and Activity Manager

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

SwipeHelper: Let's cut Max Excape Animation in Half too

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Forward Port: Smoother Upload and Download Animation

Change-Id: I6e6409cc85ad951019dbac10156d4aed92f4c5bc

Conflicts:
	core/res/res/drawable-hdpi/stat_sys_download_anim0.png
	core/res/res/drawable-hdpi/stat_sys_download_anim1.png
	core/res/res/drawable-hdpi/stat_sys_download_anim2.png
	core/res/res/drawable-hdpi/stat_sys_download_anim3.png
	core/res/res/drawable-hdpi/stat_sys_download_anim4.png
	core/res/res/drawable-hdpi/stat_sys_download_anim5.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
	core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
	core/res/res/drawable-mdpi/stat_sys_download_anim0.png
	core/res/res/drawable-mdpi/stat_sys_download_anim1.png
	core/res/res/drawable-mdpi/stat_sys_download_anim2.png
	core/res/res/drawable-mdpi/stat_sys_download_anim3.png
	core/res/res/drawable-mdpi/stat_sys_download_anim4.png
	core/res/res/drawable-mdpi/stat_sys_download_anim5.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
	core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim0.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim1.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim2.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim3.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim4.png
	core/res/res/drawable-xhdpi/stat_sys_download_anim5.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim0.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim1.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim2.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim3.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim4.png
	core/res/res/drawable-xhdpi/stat_sys_upload_anim5.png
	core/res/res/drawable-xxhdpi/stat_sys_download_anim1.png
	core/res/res/drawable-xxhdpi/stat_sys_download_anim2.png
	core/res/res/drawable-xxhdpi/stat_sys_download_anim3.png
	core/res/res/drawable-xxhdpi/stat_sys_download_anim4.png
	core/res/res/drawable-xxhdpi/stat_sys_download_anim5.png
	core/res/res/drawable-xxhdpi/stat_sys_upload_anim1.png
	core/res/res/drawable-xxhdpi/stat_sys_upload_anim2.png
	core/res/res/drawable-xxhdpi/stat_sys_upload_anim3.png
	core/res/res/drawable-xxhdpi/stat_sys_upload_anim4.png
	core/res/res/drawable-xxhdpi/stat_sys_upload_anim5.png
Statusbar clock and date customizations

Some things changed on kitkat + our old code needed in general a bit
rework. All done with this patchset.

This commit add support for:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- color
- Date format
- Date style

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Conflicts:
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
Framework: safe headset volume option (1 of 2)

thanks DvTonder

Change-Id: I5355820a24d48c1d8f54ea17a7022d891ad07857

Conflicts:
	media/java/android/media/AudioService.java

Conflicts:
	core/java/android/provider/Settings.java
SystemUI: fix double tap to sleep not working with secure lock screen

Double tap to sleep on status bar would only work on secure lockscreens if the
slider brightness control was enabled.
Revert "Statusbar clock and date customizations"

This reverts commit 078d53d048903df9110c84a3837db0588ec3e73c.
 Frameworks: Statusbar clock and date customizations

Some things changed on kitkat + our old code needed in general a bit
rework. All done with this patchset.

This commit add support for:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- color
- Date format
- Date style

Originally by kufikugel. I only ported it to 5.0

PS2:
- several fixes and optimizations and code cleanup

PS3:
- more adaptions to LP

PS4:
- cleanup

PS5:
- animate hiding correctly on center clock mode

Change-Id: I456bc81c0c981c04467c9908c164e7c3b6cb75d3

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

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/PhoneStatusBarTransitions.java
Systemui: Recents - do not add search widget on recents if widget is lost.

We have reports that sometimes under special circumstances the widget gets lost
and the view is added nevertheless

Ensure that if the widget loading fails that the id is set back to -1 to remove
the view.

Change-Id: I62f8dcea19817a243a001c80b6a4ab7b1e31a990
SystemUI: Status bar clock - fixes

This commit fixes:

- no overlapping more from status bar icons on center clock.
  The width depending on what the user has setuped (date and clock) is exactly meassured now
- do not start animations if they are not needed
- reduce settings provider calls
- a bit cleanup

Change-Id: I7a37a6ae8f9bad0f265119af05dc20cf21cd6890
[1/2] Base: Hide power menu on lockscreen

Adds an option to enable/disable power menu on lockscreen.
policy: only disable power menu on secure lock screen
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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Forward Port: Swap volume buttons when the screen is rotated by 90 or 180 degrees

Change to default behaviour not configurable due that it is now
more natural

Change-Id: I323b647066e8c73fac60067141d1add7b2f9962d

Conflicts:
	media/java/android/media/AudioManager.java
AudioManager: make swap volume buttons RTL aware

The layout of the volume panel is already RTL aware...the problem is
if it is in landscape and the buttons are swapped they go into opposite
direction then the volume panel.

So this swap should only happen on LTR languages and RTL should be left
like it is.

So both LTR and RTL have it logical.

Change-Id: Ie5fbe3085b40ad35814f53ed19736d7800dad78e
SystemUI: Ensure that the Clock is actually enabled in IconMerger

to device if we need to calculate

Change-Id: If12b0e26b32f044f1a82cf8b539283194d1d0b4c