From 5a132f7bb2131dc60511bea338e032df3887382f Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Sun, 7 Jan 2024 13:36:37 -0600 Subject: [PATCH] Fix linting --- .../main/java/com/sduduzog/slimlauncher/di/ActivityModule.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/di/ActivityModule.kt b/app/src/main/java/com/sduduzog/slimlauncher/di/ActivityModule.kt index bccba2fc..2c1bf478 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/di/ActivityModule.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/di/ActivityModule.kt @@ -1,5 +1,6 @@ package com.sduduzog.slimlauncher.di +import android.annotation.SuppressLint import android.app.Activity import androidx.core.app.ComponentActivity import androidx.lifecycle.LifecycleCoroutineScope @@ -14,6 +15,7 @@ import dagger.hilt.android.scopes.ActivityScoped @Module @InstallIn(ActivityComponent::class) class ActivityModule { + @SuppressLint("RestrictedApi") @Provides fun provideLifecycleCoroutineScope(activity: Activity): LifecycleCoroutineScope = (activity as ComponentActivity).lifecycleScope