mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Added calendar meeting URLs
This commit is contained in:
@@ -55,6 +55,7 @@ import biweekly.parameter.ParticipationStatus;
|
||||
import biweekly.property.Action;
|
||||
import biweekly.property.Attendee;
|
||||
import biweekly.property.ICalProperty;
|
||||
import biweekly.property.RawProperty;
|
||||
import biweekly.property.RecurrenceRule;
|
||||
import biweekly.property.Trigger;
|
||||
import biweekly.util.Duration;
|
||||
@@ -106,6 +107,26 @@ public class CalendarHelper {
|
||||
return tzid;
|
||||
}
|
||||
|
||||
static Uri getOnlineMeetingUrl(Context context, VEvent event) {
|
||||
try {
|
||||
RawProperty prop = event.getExperimentalProperty("X-GOOGLE-CONFERENCE");
|
||||
if (prop == null)
|
||||
prop = event.getExperimentalProperty("X-MICROSOFT-ONLINEMEETINGEXTERNALLINK");
|
||||
if (prop == null)
|
||||
prop = event.getExperimentalProperty("X-MICROSOFT-SKYPETEAMSMEETINGURL");
|
||||
if (prop == null)
|
||||
return null;
|
||||
String url = prop.getValue();
|
||||
if (TextUtils.isEmpty(url))
|
||||
return null;
|
||||
Uri uri = Uri.parse(url);
|
||||
return (uri.isHierarchical() ? uri : null);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static Long exists(Context context, String selectedAccount, String selectedName, String uid) {
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
try (Cursor cursor = resolver.query(CalendarContract.Events.CONTENT_URI,
|
||||
|
||||
Reference in New Issue
Block a user