Move SMS message to proper folder after sending

Move a SMS message to the correct folder upon receiving an intent
detailing if the message was succesfully sent or not. If sent
successfully, move to the SENT folder, otherwise move it to
the FAILED folder.

Bug: 22992865
Change-Id: Ifdcfb7bb613844f507ef27460ead520c6573b89d
diff --git a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java
index 08285bf..80ef21b 100644
--- a/src/com/android/bluetooth/map/BluetoothMapContentObserver.java
+++ b/src/com/android/bluetooth/map/BluetoothMapContentObserver.java
@@ -3023,6 +3023,9 @@
                     if(status != 0/*0 is success*/) {
                         msgInfo.statusDelivered = status;
                         if(D) Log.d(TAG, "msgInfo.statusDelivered = " + status);
+                        Sms.moveMessageToFolder(mContext, msgInfo.uri, Sms.MESSAGE_TYPE_FAILED, 0);
+                    } else {
+                        Sms.moveMessageToFolder(mContext, msgInfo.uri, Sms.MESSAGE_TYPE_SENT, 0);
                     }
                 }
                 if (msgInfo.partsDelivered == msgInfo.parts) {