Remove wallpaper blur effect

Never actually really worked
This commit is contained in:
MM20
2021-10-10 13:01:25 +02:00
parent 087d4fd455
commit dbc1444d7f
11 changed files with 5 additions and 332 deletions

View File

@@ -1,9 +1,6 @@
package de.mm20.launcher2
import android.app.Application
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.graphics.Bitmap
import androidx.appcompat.app.AppCompatDelegate
@@ -21,7 +18,6 @@ import de.mm20.launcher2.music.musicModule
import de.mm20.launcher2.preferences.LauncherPreferences
import de.mm20.launcher2.preferences.Themes
import de.mm20.launcher2.search.searchModule
import de.mm20.launcher2.ui.legacy.helper.WallpaperBlur
import de.mm20.launcher2.unitconverter.unitConverterModule
import de.mm20.launcher2.websites.websitesModule
import de.mm20.launcher2.widgets.widgetsModule
@@ -38,12 +34,9 @@ class LauncherApplication : Application(), CoroutineScope {
override val coroutineContext: CoroutineContext
get() = Dispatchers.Main + SupervisorJob()
var blurredWallpaper: Bitmap? = null
override fun onCreate() {
super.onCreate()
Debug()
instance = this
LauncherPreferences.initialize(this)
val theme = LauncherPreferences.instance.theme
@@ -55,9 +48,6 @@ class LauncherApplication : Application(), CoroutineScope {
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM //system
}
)
WallpaperBlur.requestBlur(this)
@Suppress("DEPRECATION") // We need to access the wallpaper directly to blur it
registerReceiver(WallpaperReceiver(), IntentFilter(Intent.ACTION_WALLPAPER_CHANGED))
startKoin {
androidLogger()
@@ -85,7 +75,6 @@ class LauncherApplication : Application(), CoroutineScope {
}
companion object {
lateinit var instance: LauncherApplication
val collator: Collator by lazy {
Collator.getInstance().apply { strength = Collator.SECONDARY }
@@ -99,10 +88,3 @@ object PermissionRequests {
const val LOCATION = 410
const val ALL = 666
}
class WallpaperReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent?) {
WallpaperBlur.requestBlur(context)
}
}