Skip to content

Commit

Permalink
Service fixed again
Browse files Browse the repository at this point in the history
  • Loading branch information
dsonozaki committed Oct 10, 2024
1 parent c23bab1 commit 573f81f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class DhizukuRoom : RoomDatabase() {
fun createInstance(): DhizukuRoom {
var context: Context = get()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
&& context.isDeviceProtectedStorage
&& !context.isDeviceProtectedStorage
) {
context = context.createDeviceProtectedStorageContext()
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/rosan/dhizuku/server/RunningService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import org.koin.core.component.inject
class RunningService : Service(), KoinComponent {
companion object {
fun start(context: Context) {
// val intent = Intent(context, RunningService::class.java)
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
// context.startForegroundService(intent)
// else context.startService(intent)
val intent = Intent(context, RunningService::class.java)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
context.startForegroundService(intent)
else context.startService(intent)
context.startService(Intent(context, RunningService::class.java))
}
}
Expand Down

0 comments on commit 573f81f

Please sign in to comment.