Frameworks: Make sleep tile emulate power button (1/2)

Thanks to Slim Roms
Change-Id: I3247be6e7ecfc5f414a4b882bf85e445f69f2780
SystemUI: do not collapse panels if keyevent was canceled.

Change-Id: I9af82e9fa2305142521075938dfd05521adeb9f4
Fix status bar brightness control when on secure lock screen

When the notifications panel is disabled no views are handling touch events
on the status bar, so we see nothing beyond each ACTION_DOWN. Intercept touch
events when needed specifically for brightness control.

Also recycle VelocityTracker when we're not using it, as per its documentation.

Change-Id: I84d4c788bcdb1e05244710aca933d97e3e60d1b5
Fix up 'launch player on headset connection' option.

- don't crash system_server if no music player can be found
- use the active user's setting instead of the owner's setting

Change-Id: I38a07fe5c8c3d67ececd0768e1fcc01a6cf7fa5a
SystemUI: fix SearchPanel gesture in landscape mode.

Change-Id: I8f98b30e9f66f1ae96c85363a8a4af679e1173d6
Fix formatting in clearApplicationUserData exception message.

Before:
  4539 does not have permission:android.permission.CLEAR_APP_USER_DATA to clear datafor process:com.android.chrome
After:
  PID 4539 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.android.chrome

Change-Id: Ic466decb050e4fa7f3fee4098c4f2abdc6cedf5c
Make MeasuredText.sCached field final

Change-Id: Id3be64c48be1bcf55ac1a4b00b76a40861bf2f61
464xlat: use a gatewayed route, not point-to-point

Various applications such as Skype and our legacy VPN code
do not understand routes pointed directly at point-to-point
interfaces and require a default gateway IPv4 address in
order to function.

Grudgingly accept that routes without default gateways Are Hard
and use gatewayed routes instead. This causes routing to go from:

default dev clat4  scope link

to:

default via 192.0.0.4 dev clat4  scope link
192.0.0.4 dev clat4  scope link

and those apps now work.

Bug: 9597256
Bug: 9597516
Change-Id: I7b7890873802d3cb99affd6eb70b8ab75e7a2cf6
Add support for MNC=00

This adds support for operators with MNC (Mobile Network Code) zero
to add customized resources. For example, it makes it possible to
add a folder called "/res/values-mnc00/" in an application. This will
cause resources in that folder to be used when MNC is zero.
(There is a total of 14 countries that have an operator with MNC
zero.)

Without this fix, the resource framework gets confused, because MNC 0
is normally used when the MNC is undefined (not set).

Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter.

This fix ensures that onFinished() is always called in a syncClient
even if the application lacks the READ_SYNC_SETTINGS permission.

Change-Id: I944717e71ceae06a665f8a3b1199b41d73e12da4
Fix NullpointerException in MediaMetadataRetriever

According to the API documentation and the ICS implementation
the setDataSource(String) method throws an
IllegalArgumentException if path is null. In JB a
NullpointerException is thrown instead. This fix restores
the earlier behaviour.

Change-Id: Ic47baadf91076acc227d92d84f6b8d1d6ecd0c03
MediaFormat: Fix the documentation link to the AAC profile constants

Change-Id: If1780436baa2884cea05ccd8ab74745af790eb17
Return the actual interpolator of the ViewPropertyAnimator

The implementation of getInterpolator() was always returning null
(probably a quick copy-paste from the default Animator implementation).
This patch fixes the problem by returning the interpolator set by
setInterpolator(TimeInterpolator) or the default one if none has been
set yet.

This patch also avoid creating multiple instances of ValueAnimator in
order to retrieve some default values.

Change-Id: I8880f419f021a8b980fb32bebe927915fde19bf7
add back Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

Thanks Winner00...I am an idiot lol merge in native broke it due it got lost

This reverts commit e93b821209613952e34b181b8544ff8304e72e39.

Change-Id: I3e2b6ba209a894f7fd467f682dc0d922f4a661fc
2 line layout fro status bar date.
frameworks/base: Fix to remove exception in tonegenerator

- Framework reboot happens, if tonegenerator fails to create
  a track in audioflinger.
- The cause for framework reboot is, an exception thrown by
  tonegenerator if fails to init.
- Fix is to remove the exception and delete the tonegenerator
  instance.
CRs-fixed:466491

Change-Id: Ie7b87f787d8a885cc70be9af4ba9d04ecd691cc2
framework: packageinstaller :fix logical error in size calculation

fix logical error in available size calculation.

Change-Id: Ic6ce312cf1c146030a20187fcb27b24fbe4c321a