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
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
Merge "Dont show "Erase SD Card" when there is none"
Merge "Fix null pointer exceptions in NetworkPolicyEditor"
Merge branch 'master' of https://android.googlesource.com/platform/packages/apps/Settings into HEAD