BatteryService: add option to disable charging indicatior led

Change-Id: I9e0f770f3fa3117c8e45ab5c2f3eef5384649105
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Switch to revolt settings table
StorageManager: only register MountService listener when needed

When other service get StorageManager, StorageManager will register a
listener in MountService, which won't be unregistered.

So change the policy to be:
1. when other service needs to register listener in StorageManager,
StorageManager will register listener in MountService.
2. When other service needs to unreg0ster listener in StorageManager,
if there is no more other listeners in StorageManager, StorageManager
will unregister listener in MountService

Change-Id: Ie59ad96279ac3b51f7a606fcfbbde0c130cf61dc
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Bing Deng <bingx.deng@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: 30943
Show live wallpapers in the recents view on high-end devices

Change-Id: Iefbf4f292b6a9bfdb516f154cc2976db2ba86cde
Bluetooth: Add SDK apis for Wipower and Peripheral feature

changes needed for Wipower and Periferal features.

CRs-fixed: 587811

Change-Id: Ibe73124daf78c79498fd1a6cbbcd75a88006c688
Bluetooth: Handle exceptions for bluetoot socket read

Handled IO exception in read function of BluetootSocket,
and also introduced a null check for mSocketIS.

CRs-Fixed: 605606
Change-Id: Ic948c72269e0de486a8f49163830528b002198ff
Bluetooth: Add Power apply enable event handling

Add Wipower Power apply enable related event handling
in frameworks

CRs-fixed: 612628

Change-Id: Iceb0cf8297ad0ab7080c0c494c1404127ff0258a
Add 2 APIs (suspend/resume) in MediaPlayer

- API:suspend() will just pause the player and release all the decoders
  to replace release() which will release the whole player
- API:resume() will just init the decoders again,
  then start() will be called to start to play the streaming

Change-Id: I3e2ffeb50dfe6d156b18416fa8964ff4a3d56a2c
VideoView: Implement the suspend/resume operation in VideoView

- To use the new APIs (suspend/resume) of MediaPlayer
- Add a new status "SUSPENDED"

Change-Id: I7a829b116e5df698fd4b0a5708f06927571d198c
MediaRecorder: Add pause interface

- add pause in java level
- add pause in jni level

Change-Id: I19372d496870f3729aa28464326995a71aa72299
CRs-Fixed: 587051
Fix graphics corruption caused by HWUI caches

Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix AOSP build - DO NOT MERGE

Change-Id: I42b420c2ce89ce364a2809b28b827964e6923fa1
SystemUI: handle contact not found and close inputstream

If the favorite contact is deleted, SystemUI would crash trying
to get the information for it.

Additionally create the BitmapDrawable directly from the inputstream
and close it afterwards.

Change-Id: Ic83df9adcc3e3a4c8ea493811838755dc69c1931
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/toggles/FavoriteUserToggle.java
[Navigation bar] Allow "right to left" gesture to launch search panel

Symptom: "Bottom to up" gesture can launch search panel in portrait, but "right to left" gesture CANNOT in landscape.
Root Cause: Not handled.
Solution: Set swapXY to handle this in landscape case.

Change-Id: I1793280b3656af6912e6b4583b08e80a0a38e44a
Fix the issue that the top of fullscreen dialog is clipped away

The visibility of status bar comes from the top fullscreen window,
not from the focused window.
That has to be taken into account during the calculation of the
decor rect. You can use mTopIsFullscreen for this purpose.

Change-Id: I6159eb2ee389885cf5ab507157f9451841364d2f
Revert "Fix google backup/restore functionality"

This reverts commit dc2b13c3065750988b926270cd9ee8ea3a3207a3.

This actualy break google restore functionality.

Change-Id: I0befd88588176c4387b49e80299a311f3a5cf5aa
Revert "[Navigation bar] Allow "right to left" gesture to launch search panel"

This reverts commit b58fe410103fe9c3d061ae97b8956009e9c0d526.

Change-Id: I7095ca66e00c3d8a638e5b9187a20e11f3920969
Tethering: fix NPE when retrieving active interfaces

When in airplane mode getActiveNetworkInfo() may return null.

Change-Id: Icba37abb51b9378c8af73d9f6587e04c588dd85e
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Add option to enable/disable navring (1/2)

This will add an option to toggle navigation ring.

If the navigation bar is disabled then a standalone
navigation ring is added.

Change-Id: I527c25b11bcb2c5f4b70799055f97bab65ed2cec
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Prevent wakeup when receiving AVRCP media KeyEvents

Devices connected via AVRCP use different codes.
Added playback events to the filter.

Change-Id: I359a5c34a29ef524d5781f9ab35bd2c4f2ae8be1
Signed-off-by: sethyx <sethyx@gmail.com>