Storage Settings: Allow user to trigger a volume rescan

This change allows to trigger a rescan of a volume with the next restrictions:
- Internal volumes if they are emulates
- Primary volumes
- Non-Removable volumes

rebase

Change-Id: I7e75a324938d8081fd715f702d50f1fdceabd96d
Settings: Fix Tile Index

If user deletes all tiles:
	Array string would dump an empty
	value for index zero.  Thus,
	changing individual tile settings
	would be off by one. Create a new
	array in this case as a fix.

rebase

Change-Id: I49b5940fc4e341313bde9087059babc5472417ad
Settings: recover last location state during on/off switch

based on the behaviour change on QS here:

https://gerrit.slimroms.net/#/c/1421

we go now same way in settings. Tbh not sure what the goal is to
force the user after switching off to enable always high accuracy
location. Whatever we use here same attempt like in QS tile....if the
user switches on again it recovers the last enabled state.

Change-Id: I887e2a94af379770dac7dbedb5d3d8002a554163
Dont show "Erase SD Card" when there is none

On devices with physcal, external SD Cards, the "Erase SD card"
option in in Settings/Storage is available even when there is
no SD card present, this dont make much sense since you cannot
erase a card that is absent. With this change the erase option
is bound to the mount toggle which leads to the following
consequences:

 Card present and mounted -> Erase enabled
 Card present but unmounted -> Erase enabled
 No card present -> Erase disabled
 Card present and MTP attached -> Erase disabled

Change-Id: I756ae8af3e0565febaf940df5f4991dd89105bd9
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
Settings: fix NPE with null check on NFC adapter

Verifies the adapter is not null before dereferencing it and log and error if so

PS:
- fix codestyle and rebase

Change-Id: Id2a34c4698a97476bee9b78cb0ac7b980d1595cf
Settings: Fix build

no idea how whis file came into the NFC NPE commit

remove it

Change-Id: Ia685cc831fdf565ba0db1c28581496913047322d
Return: Custom Carrier Label [2/2]

Change-Id: I1965fe6fd6cef7eb0fb78d856db9edf69659573d
Fix memory leak in ManageApplication

ApplicationsAdapter new a Session member and make it has a reference to
it self. If we don't release it explicitly, the cross reference will
cause memory leak.

Change-Id: Iecce35ae1d56d98cee6347e84d3a3ff57f3b15a5
Show memory full text only for internal storage

When the internal memory is full, a warning text is shown
in Settings/Storage. This warning was displayed for all
types of memory (internal/primary, sd card and usb storage)
even though it was only referring to the primary memory.
With this fix, it is only shown for the primary memory.

Change-Id: I35ad4b0b45c6752ddc9d7166495435b27fd4a170