Improve delete handling code.

Change-Id: I3f09f00a2966ee246056ea11ec55d952da6aabc0
Merge branch 'cm-10.1' of github.com:CyanogenMod/android_packages_providers_TelephonyProvider into HEAD