Add support for text/vCard and text/vCalendar MIME type

A vcf file can alias to both "text/vCard" and "text/x-vCard" MIME
types and an ics file can alias to "text/vCalendar" as well as
"text/x-vCalendar". However, if LineageOS does not get the "x-"
MIME type, it will incorrectly display an empty MMS.

Change-Id: I0b63767092c0e7422ff3592983d94b903d9e8cc5
This commit is contained in:
Chris Talbot
2024-12-22 17:04:27 +01:00
committed by Michael W
parent 0895e556a0
commit 87cd6873d7
5 changed files with 16 additions and 8 deletions
@@ -302,7 +302,7 @@ public class UIIntentsImpl extends UIIntents {
Assert.isTrue(MediaScratchFileProvider.isMediaScratchSpaceUri(vcardUri));
final Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(vcardUri, ContentType.TEXT_VCARD.toLowerCase());
intent.setDataAndType(vcardUri, ContentType.TEXT_X_VCARD.toLowerCase());
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startExternalActivity(context, intent);
}