Skip to content

Commit

Permalink
Use START_NOT_STICKY as crash prevention for Android 14
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman committed Aug 14, 2024
1 parent 54415c5 commit 35ba428
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ class ScriptRunnerService: Service() {
controller.onCreate()
}

override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
super.onStartCommand(intent, flags, startId)

// maybe fixes crashes on Android 14
// TODO remove once https://issuetracker.google.com/issues/307329994 is fixed
return START_NOT_STICKY
}

override fun onConfigurationChanged(newConfig: Configuration) {
controller.onScreenConfigChanged()
}
Expand Down

0 comments on commit 35ba428

Please sign in to comment.