refactor: Remove workaround under legacy TODO comment (#6645)
This commit is contained in:
@@ -20,7 +20,6 @@ import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import com.android.launcher3.LauncherApplication
|
||||
|
||||
|
||||
/**
|
||||
* Utility class to extract LauncherAppComponent from a context.
|
||||
*
|
||||
@@ -32,7 +31,6 @@ object LauncherComponentProvider {
|
||||
@JvmStatic
|
||||
fun get(c: Context): LauncherAppComponent {
|
||||
val app = c.applicationContext
|
||||
val isSafeMode = c.packageManager.isSafeMode // Lawnchair-Notice: Whatever you do, just don't set safe mode to true, thanks.
|
||||
|
||||
if (app is LauncherApplication) return app.appComponent
|
||||
|
||||
@@ -44,7 +42,7 @@ object LauncherComponentProvider {
|
||||
return Holder(
|
||||
DaggerLauncherAppComponent.builder()
|
||||
.appContext(app)
|
||||
.setSafeModeEnabled(isSafeMode)
|
||||
.setSafeModeEnabled(true)
|
||||
.build() as LauncherAppComponent,
|
||||
existingFilter,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user