autoformatting some files, no real change

This commit is contained in:
tibbi 2020-05-25 20:01:44 +02:00
parent 0f8b594ebd
commit 10d3f7d0ce
3 changed files with 131 additions and 132 deletions

View File

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.simplemobiletools.calendar.pro" package="com.simplemobiletools.calendar.pro"
android:installLocation="auto"> android:installLocation="auto">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_CALENDAR"/> <uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR"/> <uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:name="android.permission.WRITE_EXTERNAL_STORAGE"
@ -18,11 +17,11 @@
<uses-permission <uses-permission
android:name="android.permission.USE_FINGERPRINT" android:name="android.permission.USE_FINGERPRINT"
tools:node="remove"/> tools:node="remove" />
<uses-feature <uses-feature
android:name="android.hardware.faketouch" android:name="android.hardware.faketouch"
android:required="false"/> android:required="false" />
<application <application
android:name=".App" android:name=".App"
@ -36,43 +35,43 @@
<activity <activity
android:name=".activities.SplashActivity" android:name=".activities.SplashActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:theme="@style/SplashTheme"/> android:theme="@style/SplashTheme" />
<activity <activity
android:name=".activities.MainActivity" android:name=".activities.MainActivity"
android:launchMode="singleTask"> android:launchMode="singleTask">
<meta-data <meta-data
android:name="android.app.default_searchable" android:name="android.app.default_searchable"
android:resource="@xml/searchable"/> android:resource="@xml/searchable" />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEARCH"/> <action android:name="android.intent.action.SEARCH" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content"/> <data android:scheme="content" />
<data android:scheme="file"/> <data android:scheme="file" />
<data android:mimeType="text/x-vcalendar"/> <data android:mimeType="text/x-vcalendar" />
<data android:mimeType="text/calendar"/> <data android:mimeType="text/calendar" />
<data android:mimeType="application/ics"/> <data android:mimeType="application/ics" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="time/epoch"/> <data android:mimeType="time/epoch" />
<data android:host="com.android.calendar"/> <data android:host="com.android.calendar" />
<data android:scheme="content"/> <data android:scheme="content" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW"/> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/event"/> <data android:mimeType="vnd.android.cursor.item/event" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -81,7 +80,7 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/MyWidgetConfigTheme"> android:theme="@style/MyWidgetConfigTheme">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -90,7 +89,7 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/MyWidgetConfigTheme"> android:theme="@style/MyWidgetConfigTheme">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -99,29 +98,29 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/MyWidgetConfigTheme"> android:theme="@style/MyWidgetConfigTheme">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="com.simplemobiletools.commons.activities.AboutActivity" android:name="com.simplemobiletools.commons.activities.AboutActivity"
android:label="@string/about" android:label="@string/about"
android:parentActivityName=".activities.MainActivity"/> android:parentActivityName=".activities.MainActivity" />
<activity <activity
android:name="com.simplemobiletools.commons.activities.CustomizationActivity" android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
android:label="@string/customize_colors" android:label="@string/customize_colors"
android:parentActivityName=".activities.SettingsActivity"/> android:parentActivityName=".activities.SettingsActivity" />
<activity <activity
android:name="com.simplemobiletools.commons.activities.LicenseActivity" android:name="com.simplemobiletools.commons.activities.LicenseActivity"
android:label="@string/third_party_licences" android:label="@string/third_party_licences"
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/> android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
<activity <activity
android:name="com.simplemobiletools.commons.activities.FAQActivity" android:name="com.simplemobiletools.commons.activities.FAQActivity"
android:label="@string/frequently_asked_questions" android:label="@string/frequently_asked_questions"
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/> android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" />
<activity <activity
android:name=".activities.EventActivity" android:name=".activities.EventActivity"
@ -129,19 +128,19 @@
android:parentActivityName=".activities.MainActivity"> android:parentActivityName=".activities.MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.EDIT"/> <action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.INSERT"/> <action android:name="android.intent.action.INSERT" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/event"/> <data android:mimeType="vnd.android.cursor.item/event" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.EDIT"/> <action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.INSERT"/> <action android:name="android.intent.action.INSERT" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/event"/> <data android:mimeType="vnd.android.cursor.dir/event" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -160,28 +159,28 @@
<activity <activity
android:name=".activities.SettingsActivity" android:name=".activities.SettingsActivity"
android:label="@string/settings" android:label="@string/settings"
android:parentActivityName=".activities.MainActivity"/> android:parentActivityName=".activities.MainActivity" />
<activity <activity
android:name=".activities.ManageEventTypesActivity" android:name=".activities.ManageEventTypesActivity"
android:label="@string/event_types" android:label="@string/event_types"
android:parentActivityName=".activities.SettingsActivity"/> android:parentActivityName=".activities.SettingsActivity" />
<activity <activity
android:name=".activities.SnoozeReminderActivity" android:name=".activities.SnoozeReminderActivity"
android:theme="@style/Theme.Transparent"/> android:theme="@style/Theme.Transparent" />
<receiver <receiver
android:name=".helpers.MyWidgetMonthlyProvider" android:name=".helpers.MyWidgetMonthlyProvider"
android:icon="@drawable/img_widget_monthly_preview" android:icon="@drawable/img_widget_monthly_preview"
android:label="@string/widget_monthly"> android:label="@string/widget_monthly">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.appwidget.provider" android:name="android.appwidget.provider"
android:resource="@xml/widget_monthly_info"/> android:resource="@xml/widget_monthly_info" />
</receiver> </receiver>
<receiver <receiver
@ -189,12 +188,12 @@
android:icon="@drawable/img_widget_list_preview" android:icon="@drawable/img_widget_list_preview"
android:label="@string/widget_list"> android:label="@string/widget_list">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.appwidget.provider" android:name="android.appwidget.provider"
android:resource="@xml/widget_list_info"/> android:resource="@xml/widget_list_info" />
</receiver> </receiver>
<receiver <receiver
@ -202,38 +201,38 @@
android:icon="@drawable/img_widget_date_preview" android:icon="@drawable/img_widget_date_preview"
android:label="@string/widget_todays_date"> android:label="@string/widget_todays_date">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter> </intent-filter>
<meta-data <meta-data
android:name="android.appwidget.provider" android:name="android.appwidget.provider"
android:resource="@xml/widget_date_info"/> android:resource="@xml/widget_date_info" />
</receiver> </receiver>
<service <service
android:name=".services.WidgetService" android:name=".services.WidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"/> android:permission="android.permission.BIND_REMOTEVIEWS" />
<service <service
android:name=".services.WidgetServiceEmpty" android:name=".services.WidgetServiceEmpty"
android:permission="android.permission.BIND_REMOTEVIEWS"/> android:permission="android.permission.BIND_REMOTEVIEWS" />
<service android:name=".services.SnoozeService"/> <service android:name=".services.SnoozeService" />
<service <service
android:name=".jobs.CalDAVUpdateListener" android:name=".jobs.CalDAVUpdateListener"
android:exported="true" android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE"/> android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name=".receivers.NotificationReceiver"/> <receiver android:name=".receivers.NotificationReceiver" />
<receiver android:name=".receivers.CalDAVSyncReceiver"/> <receiver android:name=".receivers.CalDAVSyncReceiver" />
<receiver android:name=".receivers.BootCompletedReceiver"> <receiver android:name=".receivers.BootCompletedReceiver">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON"/> <action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter> </intent-filter>
</receiver> </receiver>
@ -244,7 +243,7 @@
android:grantUriPermissions="true"> android:grantUriPermissions="true">
<meta-data <meta-data
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/> android:resource="@xml/provider_paths" />
</provider> </provider>
<activity-alias <activity-alias
@ -255,8 +254,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -268,8 +267,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -281,8 +280,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -294,8 +293,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -307,8 +306,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -320,8 +319,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -333,8 +332,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -346,8 +345,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -359,8 +358,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -372,8 +371,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -385,8 +384,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -398,8 +397,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -411,8 +410,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -424,8 +423,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -436,8 +435,8 @@
android:roundIcon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher"
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -449,8 +448,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -462,8 +461,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -475,8 +474,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -488,8 +487,8 @@
android:targetActivity=".activities.SplashActivity"> android:targetActivity=".activities.SplashActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
</application> </application>

View File

@ -169,9 +169,9 @@ class IcsImporter(val activity: SimpleActivity) {
} }
var reminders = arrayListOf( var reminders = arrayListOf(
Reminder(curReminderMinutes.getOrElse(0) { REMINDER_OFF }, curReminderActions.getOrElse(0) { REMINDER_NOTIFICATION }), Reminder(curReminderMinutes.getOrElse(0) { REMINDER_OFF }, curReminderActions.getOrElse(0) { REMINDER_NOTIFICATION }),
Reminder(curReminderMinutes.getOrElse(1) { REMINDER_OFF }, curReminderActions.getOrElse(1) { REMINDER_NOTIFICATION }), Reminder(curReminderMinutes.getOrElse(1) { REMINDER_OFF }, curReminderActions.getOrElse(1) { REMINDER_NOTIFICATION }),
Reminder(curReminderMinutes.getOrElse(2) { REMINDER_OFF }, curReminderActions.getOrElse(2) { REMINDER_NOTIFICATION }) Reminder(curReminderMinutes.getOrElse(2) { REMINDER_OFF }, curReminderActions.getOrElse(2) { REMINDER_NOTIFICATION })
) )
reminders = reminders.sortedBy { it.minutes }.sortedBy { it.minutes == REMINDER_OFF }.toMutableList() as ArrayList<Reminder> reminders = reminders.sortedBy { it.minutes }.sortedBy { it.minutes == REMINDER_OFF }.toMutableList() as ArrayList<Reminder>
@ -179,8 +179,8 @@ class IcsImporter(val activity: SimpleActivity) {
val eventType = eventTypes.firstOrNull { it.id == curEventTypeId } val eventType = eventTypes.firstOrNull { it.id == curEventTypeId }
val source = if (calDAVCalendarId == 0 || eventType?.isSyncedEventType() == false) SOURCE_IMPORTED_ICS else "$CALDAV-$calDAVCalendarId" val source = if (calDAVCalendarId == 0 || eventType?.isSyncedEventType() == false) SOURCE_IMPORTED_ICS else "$CALDAV-$calDAVCalendarId"
val event = Event(null, curStart, curEnd, curTitle, curLocation, curDescription, reminders[0].minutes, val event = Event(null, curStart, curEnd, curTitle, curLocation, curDescription, reminders[0].minutes,
reminders[1].minutes, reminders[2].minutes, reminders[0].type, reminders[1].type, reminders[2].type, curRepeatInterval, curRepeatRule, reminders[1].minutes, reminders[2].minutes, reminders[0].type, reminders[1].type, reminders[2].type, curRepeatInterval, curRepeatRule,
curRepeatLimit, curRepeatExceptions, "", curImportId, DateTimeZone.getDefault().id, curFlags, curEventTypeId, 0, curLastModified, source) curRepeatLimit, curRepeatExceptions, "", curImportId, DateTimeZone.getDefault().id, curFlags, curEventTypeId, 0, curLastModified, source)
if (event.getIsAllDay() && curEnd > curStart) { if (event.getIsAllDay() && curEnd > curStart) {
event.endTS -= DAY event.endTS -= DAY

View File

@ -14,30 +14,30 @@ import java.io.Serializable
@Entity(tableName = "events", indices = [(Index(value = ["id"], unique = true))]) @Entity(tableName = "events", indices = [(Index(value = ["id"], unique = true))])
data class Event( data class Event(
@PrimaryKey(autoGenerate = true) var id: Long?, @PrimaryKey(autoGenerate = true) var id: Long?,
@ColumnInfo(name = "start_ts") var startTS: Long = 0L, @ColumnInfo(name = "start_ts") var startTS: Long = 0L,
@ColumnInfo(name = "end_ts") var endTS: Long = 0L, @ColumnInfo(name = "end_ts") var endTS: Long = 0L,
@ColumnInfo(name = "title") var title: String = "", @ColumnInfo(name = "title") var title: String = "",
@ColumnInfo(name = "location") var location: String = "", @ColumnInfo(name = "location") var location: String = "",
@ColumnInfo(name = "description") var description: String = "", @ColumnInfo(name = "description") var description: String = "",
@ColumnInfo(name = "reminder_1_minutes") var reminder1Minutes: Int = -1, @ColumnInfo(name = "reminder_1_minutes") var reminder1Minutes: Int = -1,
@ColumnInfo(name = "reminder_2_minutes") var reminder2Minutes: Int = -1, @ColumnInfo(name = "reminder_2_minutes") var reminder2Minutes: Int = -1,
@ColumnInfo(name = "reminder_3_minutes") var reminder3Minutes: Int = -1, @ColumnInfo(name = "reminder_3_minutes") var reminder3Minutes: Int = -1,
@ColumnInfo(name = "reminder_1_type") var reminder1Type: Int = REMINDER_NOTIFICATION, @ColumnInfo(name = "reminder_1_type") var reminder1Type: Int = REMINDER_NOTIFICATION,
@ColumnInfo(name = "reminder_2_type") var reminder2Type: Int = REMINDER_NOTIFICATION, @ColumnInfo(name = "reminder_2_type") var reminder2Type: Int = REMINDER_NOTIFICATION,
@ColumnInfo(name = "reminder_3_type") var reminder3Type: Int = REMINDER_NOTIFICATION, @ColumnInfo(name = "reminder_3_type") var reminder3Type: Int = REMINDER_NOTIFICATION,
@ColumnInfo(name = "repeat_interval") var repeatInterval: Int = 0, @ColumnInfo(name = "repeat_interval") var repeatInterval: Int = 0,
@ColumnInfo(name = "repeat_rule") var repeatRule: Int = 0, @ColumnInfo(name = "repeat_rule") var repeatRule: Int = 0,
@ColumnInfo(name = "repeat_limit") var repeatLimit: Long = 0L, @ColumnInfo(name = "repeat_limit") var repeatLimit: Long = 0L,
@ColumnInfo(name = "repetition_exceptions") var repetitionExceptions: ArrayList<String> = ArrayList(), @ColumnInfo(name = "repetition_exceptions") var repetitionExceptions: ArrayList<String> = ArrayList(),
@ColumnInfo(name = "attendees") var attendees: String = "", @ColumnInfo(name = "attendees") var attendees: String = "",
@ColumnInfo(name = "import_id") var importId: String = "", @ColumnInfo(name = "import_id") var importId: String = "",
@ColumnInfo(name = "time_zone") var timeZone: String = "", @ColumnInfo(name = "time_zone") var timeZone: String = "",
@ColumnInfo(name = "flags") var flags: Int = 0, @ColumnInfo(name = "flags") var flags: Int = 0,
@ColumnInfo(name = "event_type") var eventType: Long = REGULAR_EVENT_TYPE_ID, @ColumnInfo(name = "event_type") var eventType: Long = REGULAR_EVENT_TYPE_ID,
@ColumnInfo(name = "parent_id") var parentId: Long = 0, @ColumnInfo(name = "parent_id") var parentId: Long = 0,
@ColumnInfo(name = "last_updated") var lastUpdated: Long = 0L, @ColumnInfo(name = "last_updated") var lastUpdated: Long = 0L,
@ColumnInfo(name = "source") var source: String = SOURCE_SIMPLE_CALENDAR) @ColumnInfo(name = "source") var source: String = SOURCE_SIMPLE_CALENDAR)
: Serializable { : Serializable {
companion object { companion object {
@ -123,9 +123,9 @@ data class Event(
fun getIsAllDay() = flags and FLAG_ALL_DAY != 0 fun getIsAllDay() = flags and FLAG_ALL_DAY != 0
fun getReminders() = setOf( fun getReminders() = setOf(
Reminder(reminder1Minutes, reminder1Type), Reminder(reminder1Minutes, reminder1Type),
Reminder(reminder2Minutes, reminder2Type), Reminder(reminder2Minutes, reminder2Type),
Reminder(reminder3Minutes, reminder3Type) Reminder(reminder3Minutes, reminder3Type)
).filter { it.minutes != REMINDER_OFF } ).filter { it.minutes != REMINDER_OFF }
// properly return the start time of all-day events as midnight // properly return the start time of all-day events as midnight