Meet some mandatory requirements for migrating to Android 12
1. Replace foreground services with Workers 2. Support approximate location 3. Fallback to inexact alarms if the SCHEDULE_EXACT_ALARM permission is revoked 4. Specify the mutability of each PendingIntent 5. Explicitly declare the android:exported attribute for app components that use intent filters
This commit is contained in:
@ -7,7 +7,7 @@ import android.provider.CalendarContract
|
||||
import com.tommasoberlose.anotherwidget.services.EventListenerJob
|
||||
import com.tommasoberlose.anotherwidget.models.Event
|
||||
import com.tommasoberlose.anotherwidget.global.Preferences
|
||||
import com.tommasoberlose.anotherwidget.services.UpdateCalendarService
|
||||
import com.tommasoberlose.anotherwidget.services.UpdateCalendarWorker
|
||||
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
|
||||
import me.everything.providers.android.calendar.CalendarProvider
|
||||
import java.util.*
|
||||
@ -19,7 +19,7 @@ import kotlin.collections.ArrayList
|
||||
|
||||
object CalendarHelper {
|
||||
fun updateEventList(context: Context) {
|
||||
UpdateCalendarService.enqueueWork(context)
|
||||
UpdateCalendarWorker.enqueue(context)
|
||||
}
|
||||
|
||||
fun getCalendarList(context: Context): List<me.everything.providers.android.calendar.Calendar> {
|
||||
|
Reference in New Issue
Block a user