Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 072e7916 authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "MAP: Add defaults and fix sender_name"

am: f75051c4

Change-Id: I12dd2f6f4c30d030d52d4cc7aabdd5c28a0077b2
parents 0b388c7d f75051c4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -3679,10 +3679,11 @@ public class BluetoothMapContent {
                    Log.v(TAG, "c.count: " + c.getCount());
                }

                if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
                    message.setType(TYPE.SMS_GSM);
                } else if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
                if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
                    message.setType(TYPE.SMS_CDMA);
                } else {
                    // set SMS_GSM by default
                    message.setType(TYPE.SMS_GSM);
                }
                message.setVersionString(mMessageVersion);
                String read = c.getString(c.getColumnIndex(Sms.READ));
+13 −1
Original line number Diff line number Diff line
@@ -762,7 +762,9 @@ public class BluetoothMapContentObserver {
                            subject.substring(0, subject.length() < 256 ? subject.length() : 256));
                }
                if (senderName != null) {
                    xmlEvtReport.attribute("", "sender_name", senderName);
                    xmlEvtReport.attribute("", "sender_name",
                            senderName.substring(
                                    0, senderName.length() < 256 ? senderName.length() : 255));
                }
                if (priority != null) {
                    xmlEvtReport.attribute("", "priority", priority);
@@ -1428,6 +1430,9 @@ public class BluetoothMapContentObserver {
                                String date = BluetoothMapUtils.getDateTimeString(
                                        c.getLong(c.getColumnIndex(Sms.DATE)));
                                String subject = c.getString(c.getColumnIndex(Sms.BODY));
                                if (subject == null) {
                                    subject = "";
                                }
                                String name = "";
                                String phone = "";
                                if (type == 1) { //inbox
@@ -1592,6 +1597,9 @@ public class BluetoothMapContentObserver {
                                if (subject == null || subject.length() == 0) {
                                    /* Get subject from mms text body parts - if any exists */
                                    subject = BluetoothMapContent.getTextPartsMms(mResolver, id);
                                    if (subject == null) {
                                        subject = "";
                                    }
                                }
                                int tmpPri = c.getInt(c.getColumnIndex(Mms.PRIORITY));
                                Log.d(TAG, "TEMP handleMsgListChangesMms, "
@@ -1600,6 +1608,10 @@ public class BluetoothMapContentObserver {

                                String address = BluetoothMapContent.getAddressMms(mResolver, id,
                                        BluetoothMapContent.MMS_FROM);
                                if (address == null) {
                                    address = "";
                                }

                                String priority = "no";
                                if (tmpPri == PduHeaders.PRIORITY_HIGH) {
                                    priority = "yes";