android/app/src/com/android/bluetooth/mapclient/obex/RequestGetMessagesListingForOwnNumber.java
0 → 100644
+300
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
MAP profile does not provide explicit commands to obtain the phone number of the connected remote device. The remote device's own phone number is needed to help Messenger apps to properly stitch together conversation threads, particularly in group messaging. Parsing the recipients of a received group MMS for the remote device's own number is problematic because the MMS specs do not specify any standards regarding the To: and Cc: fields of a MMS. Instead, this CL obtains the own phonenumber from (1) originator (From:) field of messages in the SENT folder; (2) recipient (To:) field of SMS messages (ignoring MMS) in the INBOX folder. MessagesListing contains metadata of messages in a folder, including phone numbers of recipients and originators. However, MAP profile lists recipient metadata as optional, HCI logs show most major phones do provide it. If the first message doesn't have it, the CL increasingly requests more messages until a number is found. Bug: 259457652 Tag: #feature Test: atest BluetoothInstrumentationTests Change-Id: I94d7d185002bad626bf2cc293e2e654013a2b778