Hang off call by power button while screen is on

Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
Round off when calculate next step in Seekbar

When the positions for the new step is calculated in
a Seekbar, a rounding error can appear.
This is fixed by round off before casting.

Change-Id: Ie2cf201ef670ccc2297e9bc4c7f415a826e44a41
take account of RotationVector's new extra parameter

Rotation vector has a new 5th parameter introduced in API 18. But the code classified the 5 parameter the same as it would be 3 and overriden the 4th parameter which is unnecessary and also caused an unexpected behavior.

Issue #63268:
https://code.google.com/p/android/issues/detail?id=63268
Signed-off-by: Balint Ureczky <ubalint@gmail.com>

Change-Id: I6f9a5fc401da655695ab03694b4a74dc5be936ed
[ScreentShot]: change the implementation of get image file size

Because File can't get permission to get file size of screenshot image.
So use InputStream to get file size correctly of screenshot image.

Change-Id: I1c3df40ddd526d3431bc899642d00f4021d7eeb3
Author: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: shi yang <yang.a.shi@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 30940

Conflicts:
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
Base: Fix for the race in Wallpaperservice

Wallpaperservice has a race among message handler of
DO_DETACH and service's onDestroy. In certain cases,
the engine kept track in mActiveEngines is removed by
message handler of DO_DETACH and service's onDestroy
doesn't get a entry in mActivieEngines and isn't able
to invoke detach. This keeps the broadcast receiver,
mReceiver active and is unregistered by the framework
and a corresponding leak is reported.

  Later, the message handler of DO_DETACH continues
and invokes detach on mEngine, which attempts to
unregister mReceiver and framework throws an exception
"Receiver not registered: android.service.wallpaper.
WallpaperService$Engine$1@40874580" and causes the
framework to reboot.

  In case of system_server, WindownManagerPolicy and
android.server.ServerThread contest for access of
shared members, mActiveEngines and mEgine. Fix is to
protect the critical section via synchronized block.

Change-Id: I2d96a45feb0eb356da2de1db53cfe2431f124388

Conflicts:
	core/java/android/service/wallpaper/WallpaperService.java
Frameworks: derp

well it does not effect us due that we proper preload etc. But if it is not
a cancel repload event should reset the mIsPreloaded flag

sorry

Change-Id: Icc531dcd6bae187473f65ec7da267c72f9edbcf6
Recycle previous background bitmap upon changing wallpaper

ImageWallpaper doesn't recycle old background bitmap before
setting it NULL.

Step to reproduce it on Nexus 10 with 4.4.2(KOT49H):
1. Long press on home screen.
2. Choose wallpaper from Wallpapers.
3. Select new wallpaper and set it.
4. Repeat step 1-3 several times.
See black background instead of the wallpaper.

Change-Id: I27f6971a3edd26472b69e59b542b27fd7c8e7b90
Signed-off-by: jshe32X<jianchunx.shen@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Frameworks: derp

well it does not effect us due that we proper preload etc. But if it is not
a cancel repload event should reset the mIsPreloaded flag

sorry

Change-Id: Icc531dcd6bae187473f65ec7da267c72f9edbcf6
add "Turn Wi-Fi off" action to the "open networks available" notification

Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	core/res/res/values/strings.xml
	services/java/com/android/server/WifiService.java

PS2: Adapt to 4.3 changes
PS3: Adapt more to 4.3

Change-Id: Idaed26320a2ff2e6ada448fa6deb95a76d2b86d2

Conflicts:
	core/res/res/values/strings.xml
Fix progress of VolumePanel never refresh

On some occasions when disconnecting a headset it is possible for
the volume slider to enter a state where it is no longer updates.

The cause was that ProgressBar enters a state where a call to
doRefreshProgress no longer updates the progress.

The solution was to make sure mRefreshIsPosted is set to false
when mRefreshProgressRunnable is removed.

Change-Id: I1929e4916a582d09a7ec4911eb4f0052ad7a51ba
Merge commit 'f26be8a' into kitkat
Revert "Base: Fix for the race in Wallpaperservice"

This reverts commit df8733545f8aee67658de7f1bba79f9ad773cb01.
Merge branch 'kitkat' of https://github.com/TeamHorizon/platform_frameworks_base into kitkat