updating target SDK to 29
This commit is contained in:
parent
89ddffa3f2
commit
248faf874a
|
@ -11,13 +11,13 @@ if (keystorePropertiesFile.exists()) {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "28.0.3"
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.calendar.pro"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode 170
|
||||
versionName "6.8.3"
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_launcher_name"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
|
|
@ -360,8 +360,8 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
private fun checkIsViewIntent() {
|
||||
if (intent?.action == Intent.ACTION_VIEW && intent.data != null) {
|
||||
val uri = intent.data
|
||||
if (uri.authority == "com.android.calendar") {
|
||||
if (uri.path.startsWith("/events")) {
|
||||
if (uri?.authority?.equals("com.android.calendar") == true) {
|
||||
if (uri.path!!.startsWith("/events")) {
|
||||
ensureBackgroundThread {
|
||||
// intents like content://com.android.calendar/events/1756
|
||||
val eventId = uri.lastPathSegment
|
||||
|
@ -384,7 +384,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
tryImportEventsFromFile(uri)
|
||||
tryImportEventsFromFile(uri!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
|
||||
private fun tryImportEventsFromFile(uri: Uri) {
|
||||
when {
|
||||
uri.scheme == "file" -> showImportEventsDialog(uri.path)
|
||||
uri.scheme == "file" -> showImportEventsDialog(uri.path!!)
|
||||
uri.scheme == "content" -> {
|
||||
val tempFile = getTempFile()
|
||||
if (tempFile == null) {
|
||||
|
@ -763,7 +763,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
|
||||
val inputStream = contentResolver.openInputStream(uri)
|
||||
val out = FileOutputStream(tempFile)
|
||||
inputStream.copyTo(out)
|
||||
inputStream!!.copyTo(out)
|
||||
showImportEventsDialog(tempFile.absolutePath)
|
||||
}
|
||||
else -> toast(R.string.invalid_file_format)
|
||||
|
|
|
@ -37,7 +37,7 @@ class DayFragment : Fragment() {
|
|||
val view = inflater.inflate(R.layout.fragment_day, container, false)
|
||||
mHolder = view.day_holder
|
||||
|
||||
mDayCode = arguments!!.getString(DAY_CODE)
|
||||
mDayCode = arguments!!.getString(DAY_CODE)!!
|
||||
setupButtons()
|
||||
return view
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class MonthFragment : Fragment(), MonthlyCalendar {
|
|||
mRes = resources
|
||||
mPackageName = activity!!.packageName
|
||||
mHolder = view.month_calendar_holder
|
||||
mDayCode = arguments!!.getString(DAY_CODE)
|
||||
mDayCode = arguments!!.getString(DAY_CODE)!!
|
||||
mConfig = context!!.config
|
||||
storeStateVariables()
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ class CalDAVHelper(val context: Context) {
|
|||
val newUri = context.contentResolver.insert(uri, values)
|
||||
|
||||
val calendarId = event.getCalDAVCalendarId()
|
||||
val eventRemoteID = java.lang.Long.parseLong(newUri.lastPathSegment)
|
||||
val eventRemoteID = java.lang.Long.parseLong(newUri!!.lastPathSegment!!)
|
||||
event.importId = getCalDAVEventImportId(calendarId, eventRemoteID)
|
||||
|
||||
setupCalDAVEventReminders(event)
|
||||
|
|
|
@ -33,15 +33,15 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(vibrate) = prefs.edit().putBoolean(VIBRATE, vibrate).apply()
|
||||
|
||||
var reminderSoundUri: String
|
||||
get() = prefs.getString(REMINDER_SOUND_URI, context.getDefaultAlarmUri(ALARM_SOUND_TYPE_NOTIFICATION).toString())
|
||||
get() = prefs.getString(REMINDER_SOUND_URI, context.getDefaultAlarmUri(ALARM_SOUND_TYPE_NOTIFICATION).toString())!!
|
||||
set(reminderSoundUri) = prefs.edit().putString(REMINDER_SOUND_URI, reminderSoundUri).apply()
|
||||
|
||||
var reminderSoundTitle: String
|
||||
get() = prefs.getString(REMINDER_SOUND_TITLE, context.getDefaultAlarmTitle(ALARM_SOUND_TYPE_NOTIFICATION))
|
||||
get() = prefs.getString(REMINDER_SOUND_TITLE, context.getDefaultAlarmTitle(ALARM_SOUND_TYPE_NOTIFICATION))!!
|
||||
set(reminderSoundTitle) = prefs.edit().putString(REMINDER_SOUND_TITLE, reminderSoundTitle).apply()
|
||||
|
||||
var lastSoundUri: String
|
||||
get() = prefs.getString(LAST_SOUND_URI, "")
|
||||
get() = prefs.getString(LAST_SOUND_URI, "")!!
|
||||
set(lastSoundUri) = prefs.edit().putString(LAST_SOUND_URI, lastSoundUri).apply()
|
||||
|
||||
var lastReminderChannel: Long
|
||||
|
@ -69,7 +69,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(displayPastEvents) = prefs.edit().putInt(DISPLAY_PAST_EVENTS, displayPastEvents).apply()
|
||||
|
||||
var displayEventTypes: Set<String>
|
||||
get() = prefs.getStringSet(DISPLAY_EVENT_TYPES, HashSet<String>())
|
||||
get() = prefs.getStringSet(DISPLAY_EVENT_TYPES, HashSet<String>())!!
|
||||
set(displayEventTypes) = prefs.edit().remove(DISPLAY_EVENT_TYPES).putStringSet(DISPLAY_EVENT_TYPES, displayEventTypes).apply()
|
||||
|
||||
var listWidgetViewToOpen: Int
|
||||
|
@ -84,7 +84,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
}
|
||||
|
||||
var caldavSyncedCalendarIds: String
|
||||
get() = prefs.getString(CALDAV_SYNCED_CALENDAR_IDS, "")
|
||||
get() = prefs.getString(CALDAV_SYNCED_CALENDAR_IDS, "")!!
|
||||
set(calendarIDs) = prefs.edit().putString(CALDAV_SYNCED_CALENDAR_IDS, calendarIDs).apply()
|
||||
|
||||
var lastUsedCaldavCalendarId: Int
|
||||
|
|
|
@ -8,9 +8,11 @@ import com.simplemobiletools.calendar.pro.extensions.rescheduleReminder
|
|||
import com.simplemobiletools.calendar.pro.helpers.EVENT_ID
|
||||
|
||||
class SnoozeService : IntentService("Snooze") {
|
||||
override fun onHandleIntent(intent: Intent) {
|
||||
override fun onHandleIntent(intent: Intent?) {
|
||||
if (intent != null) {
|
||||
val eventId = intent.getLongExtra(EVENT_ID, 0L)
|
||||
val event = eventsDB.getEventWithId(eventId)
|
||||
rescheduleReminder(event, config.snoozeTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue