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
Revert "Fix google backup/restore functionality"

This reverts commit dc2b13c3065750988b926270cd9ee8ea3a3207a3.

This actualy break google restore functionality.

Change-Id: I0befd88588176c4387b49e80299a311f3a5cf5aa
Update Swedish translation

Change-Id: I9f1d533896397ba473c5ccedb95c5bae8eb02bb1
Merge "Revert "Fix google backup/restore functionality"" into kitkat
Revert "[Navigation bar] Allow "right to left" gesture to launch search panel"

This reverts commit b58fe410103fe9c3d061ae97b8956009e9c0d526.

Change-Id: I7095ca66e00c3d8a638e5b9187a20e11f3920969
Merge "Revert "[Navigation bar] Allow "right to left" gesture to launch search panel"" into kitkat
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>
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>
Add "Turn WiFi off" action to "Open networks" notification

Forward ported to kitkat

Squashed:
add "Turn Wi-Fi off" action to the "open networks available" notification
add missing xhdpi turn wifi off image
WiFi open network notification: fix potential crash

Change-Id: I416a129388074c616892f6266af7005b4da1a521
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>
Add implementation for Clock (Alarm) Toggle

PS1: Remove extra space
PS4: Complete revamp:
- Display alarm and its time if set
- Display analog clock with time and "alarm off" if no alarm set

Change-Id: I8d571082f5e264a1560e7e549bb555de45202866
Signed-off-by: sethyx <sethyx@gmail.com>
Prevent nullPointerException by updateBondedBluetoothDevices

In some very rare cases difficult to identify, it seems that the
IBluetooth.getBondedDevices() returns a Set with a null element.

This patch will prevent calling getBondState() if the device is null to
avoid a nullPointerException.

Change-Id: I9bcad60c37e03c77ec39227e5c947c002a3ae2c7
Orig-Change-Id: I8845f0e6b8fdcda679bc71e2b5c33fd4a52f3ac5
Signed-off-by: Patrick Combes <patrick.combes@intel.com>
Reviewed-on: http://android.intel.com:8080/116592
Reviewed-by: Bondier, CedricX <cedricx.bondier@intel.com>
Reviewed-by: Chen, HuaqiangX <huaqiangx.chen@intel.com>
Reviewed-by: Yao, Yong <yong.yao@intel.com>
Reviewed-by: Aquilone, RaffaeleX <raffaelex.aquilone@intel.com>
Tested-by: Lestienne, ChristopheX <christophex.lestienne@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 90085
Merge "Prevent wakeup when receiving AVRCP media KeyEvents" into kitkat
Merge "Add option to enable/disable navring (1/2)" into kitkat
Merge "Add implementation for Clock (Alarm) Toggle" into kitkat
Merge "Add "Turn WiFi off" action to "Open networks" notification" into kitkat
Add "Turn Tethering off" action to WiFi and USB tethering notifications

Change-Id: Ibfbc1fbd8f147b46a7a079511f93227b0687bd3e
Signed-off-by: sethyx <sethyx@gmail.com>
[1/2] Navigation bar width & height

Change-Id: I68d5b37e30733771a8db80329bf7a73c91b91d5b
Signed-off-by: kecinzer <kecinzer@gmail.com>
Merge "Add "Turn Tethering off" action to WiFi and USB tethering notifications" into kitkat