MAP: Fix MAP server inter-op issues

 - Fix no recipient address info available when GETMessage
   and MessagesListing requested on Draft folder. Fetch
   Draft recipient address from "canonical_address" table
   based on threadId when no address available from regular
   "sms" table in telephony database.
-  Avoid dummy entry in sms database when requested to push a
   empty message. Reject empty SMS body and handle a possible
   exception from telephony stack for invalid message body.
-  Send MMS complete "size"  as attachment size fetched from
   database and subject or text length available.
-  Donot include "old_folder" info in MessageDeleted MNS event.
   As per Spec, only MessageShift event should use the later info.
-  Handle possible exception while processing  message listing.
   A case where message is saved in draft with no recipeint name,
   when we  try to fetch contact name during messagelisting, null
   number passed to ContactsProvider would cause IllegalArgumentException.
   Add null and empty check before quering contact provider.

Change-Id: I5f2234ae7e50ed719a31f463e372d2026988539c
2 files changed