Skip to content

Commit 17dcc0d

Browse files
committed
fix: adapt to WorkManager 2.9 Configuration.Provider property
WorkManager 2.9 replaced the getWorkManagerConfiguration() method with a workManagerConfiguration property on Configuration.Provider.
1 parent 515e766 commit 17dcc0d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/src/main/java/io/nekohasekai/sagernet/SagerNet.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,10 @@ class SagerNet : Application(),
109109
updateNotificationChannels()
110110
}
111111

112-
override fun getWorkManagerConfiguration(): WorkConfiguration {
113-
return WorkConfiguration.Builder()
112+
override val workManagerConfiguration: WorkConfiguration
113+
get() = WorkConfiguration.Builder()
114114
.setDefaultProcessName("${BuildConfig.APPLICATION_ID}:bg")
115115
.build()
116-
}
117116

118117
override fun onTrimMemory(level: Int) {
119118
super.onTrimMemory(level)

0 commit comments

Comments
 (0)