Remove haze
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
package dev.ulfrx.recipe.ui.components.glass
|
||||
|
||||
import android.app.Application
|
||||
import android.content.pm.ApplicationInfo
|
||||
|
||||
/**
|
||||
* Android actual: this module does not expose an app `BuildConfig` class on the
|
||||
* Kotlin compile classpath, so read the runtime debuggable flag from the current
|
||||
* application instead. This keeps release builds on the production path without
|
||||
* requiring a build-file change outside this plan's ownership.
|
||||
*/
|
||||
actual val isDebugBuild: Boolean
|
||||
get() =
|
||||
currentApplication()
|
||||
?.applicationInfo
|
||||
?.flags
|
||||
?.and(ApplicationInfo.FLAG_DEBUGGABLE) != 0
|
||||
|
||||
@Suppress("PrivateApi")
|
||||
private fun currentApplication(): Application? =
|
||||
runCatching {
|
||||
Class
|
||||
.forName("android.app.ActivityThread")
|
||||
.getMethod("currentApplication")
|
||||
.invoke(null) as? Application
|
||||
}.getOrNull()
|
||||
Reference in New Issue
Block a user