Fix null pointer exceptions in NetworkPolicyEditor

This upload fixes a null pointer exception issue.
After this fix the modified methods return
their corresponding default values instead of null.

Change-Id: Idb94f8b808b8dd18be5e3fc92cc5560ce0f81c4f
Fix elapsed time formatting.

We should extend DateUtils to provide this kind of elapsed time
formatting via icu4c, but for now let's at least fix our
arithmetic.

Bug: https://code.google.com/p/android/issues/detail?id=61479
Change-Id: I6c087dbb9fdbff0a21d9243d239126fee180454c
[2/2] Settings: Slim IME options

- settings: add back all keyboard IME features back (2/2)
from; https://github.com/SlimRoms/packages_apps_Settings/commit/dfea82c32a5a32e8f26d081b9662b76ed34ce3a8

 this commit adds:

 - ime switcher notification - thanks cm
 - slims fullscreen disable on landscape
 - slims force autorotation on IME
 - slims force to show always enter key

 some fixes to the 4.2/4.3 implementations + added full multiuser
 support for all this features

 cheers

- use better dialog handling on IME settings
from: https://github.com/SlimRoms/packages_apps_Settings/commit/6bbe59f2899f56c15fa75d04a14bbef71e555853

 sorry did not saw that crap from 4.3 implementation. use a better
 dialog handling as well prepare it for future other dialogs
 we may need here

PS3: fixes

Change-Id: I567e09840d1b1b88f387ebfc99bf77bd031ab63e

Conflicts:

	res/values/bam_arrays.xml
	res/values/bam_strings.xml
[2/2] Losckscreen Notifications fixes

- Lockscreen Notifications: fix removal of pocketmode setting
from: https://github.com/AOSPAL/android_packages_apps_Settings/commit/b2ff326f86c6641486dc92de9e02c36a727f5040

Change-Id: Ic371e2b409de9c77c7b33aa1eead14cd0a0df563
[2/2] LS Notifications dinamic width & blacklist options

- [2/2] Settings: Lockscreen notifications: Option to disable dynamic width
from; https://github.com/OmniKang/android_packages_apps_Settings/commit/0f99a1103b03ba0b8c5ca8d03286a3bf52f19c7d

- [2/2] Settings: Lockscreen notifications: Allow apps to be excluded from being displayed
from; https://github.com/OmniKang/android_packages_apps_Settings/commit/76bb8d1476da952d05c79f860160928345f73014

 Credits to 0xD34D / ChameleonOS for the original implementation for Active Display

PS3: fixes
PS4: derp

PS7: Moved arrays dimens and string to correct files

Change-Id: Ic93e1d26705a6eeac73bd5316605a169150eb421
White-ify tab colors

Make things consistent in KitKat

Change-Id: I4e03d488471f746a2f878ed7248730eac9d672ea
Signed-off-by: Tianrui Guo <tianrui@pac-rom.com>
Settings : Update gesture preference check

Move the gesture outside the stylus dependency check and remove the
preference category if no children are found

Change-Id: I05ecf71dc84f5244200e3030b5ee524944339145
(cherry picked from commit f6a43a4bc50f6fba64f55c08adff16f8bdcb1c44)
Allow modification of the camera widget option on insecure lock screens

Change-Id: I56352a670eca52d51fb4fc7cf1527affc43bbc5c
settings: quicksettings: allow flip animation on clicking a tile (1/2)
fix building
more fixes, thanks to Dave Kessler
ported from https://github.com/BeerGang/android_packages_apps_Settings/commit/e0968963d1260d6b7497d301cc2caa2df540eb93

Change-Id: I754b6194312bc93b8c876db4edf94fd4310363a5
fix quicksettings flip preference not sticking

Change-Id: I91f78f0413ebb8a7c5a1e617113dec1e54b82e8e
Quicktile row option:set 3,4,5 tiles per row (2/2)

Change-Id: If7b81570460a85ad61f9a19e3ac9f4687e5ad68a
PS2: remove extra classes
PS3: most errors fixed
PS4: remove duplicate cyanogenmod/QuickSettingsTiles.java and fixes
Add Music Tile (2/2)

Change-Id: I30442d9464747dd8895733f05db7943d94b52f61
Author: kufikugel
quickrecord tile

the original quickrecord tile i saw was written by michelle primavera from CFX using
the AOKP qs.  this one was written for CM's qs tiles by Jubakuba?

Change-Id: Ic01c155b4ec5135138d2a2e9e65a7d600941b11f
Fix up quicksettings 2/2

revisit tile colors

Change-Id: I836bcf68d000fd146264abd7cbb164e4285d9680
Settings: use CMHW serial number

See http://review.cyanogenmod.org/57164

Change-Id: If328ca7b487435b88246d1f8c47b04770183f09e
Settings: Day and week on data usage cycle (2/2)

Adds the ability to set day and week on when the data usage
graph resets, instead of just month.

Change-Id: I5974e1b7143d09ffd6fcd6db113c3f7511346bfa
Fix expanded desktop options

Change-Id: I4d6d96d27fed89e4ea0d44c847fe9a8fc8007103
Bluetooth: GAP: Avoid adding device to cached device list

Change will ensure that devices will not be added to the cached
device list if profile connection state is STATE_DISCONNECTED
or STATE_DISCONNECTING. Otherwise, devices will be added to cached
list and while inquring device will not be listed in available
device list.

CRs-Fixed: 586975
Change-Id: I60bc01c0f2cb5ea87f3c633bcec2f04c90939d67
Bluetooth: HID: Use proper values of connection status

This patch fixes issue in retrieving correct connection status when
more than one hid device was connected to DUT. In such situation
current implementation was sending STATE_DISCONNECTED as connection
state because of wrong check of matching device as 1st device in
connected device list. Instead of this now actual connection state
device is retrieved from HidService.

Change-Id: I2c766e9fc6eb9e97c3745016e38fa5c374c16539
CRs-Fixed: 593065
Minor grammar fixes

Change-Id: I6ccac6ab3739dd186ea63d9af12694c86c6da0ec