feat: permission screen

- single context coroutine scope
- refactor activity launcher helper
- move updater to home section
This commit is contained in:
rhunk
2023-09-01 18:15:40 +02:00
parent a3edd40cfb
commit 6b9938b8b2
15 changed files with 299 additions and 188 deletions

View File

@ -14,6 +14,7 @@ import coil.ImageLoader
import coil.decode.VideoFrameDecoder
import coil.disk.DiskCache
import coil.memory.MemoryCache
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import me.rhunk.snapenhance.bridge.BridgeService
import me.rhunk.snapenhance.core.BuildConfig
@ -71,6 +72,7 @@ class RemoteSideContext(
}
.components { add(VideoFrameDecoder.Factory()) }.build()
}
val coroutineScope = CoroutineScope(Dispatchers.IO)
fun reload() {
runCatching {
@ -103,7 +105,7 @@ class RemoteSideContext(
)
},
modInfo = ModInfo(
loaderPackageName = MainActivity::class.java.`package`?.name ?: "unknown",
loaderPackageName = MainActivity::class.java.`package`?.name,
buildPackageName = BuildConfig.APPLICATION_ID,
buildVersion = BuildConfig.VERSION_NAME,
buildVersionCode = BuildConfig.VERSION_CODE.toLong(),
@ -119,7 +121,6 @@ class RemoteSideContext(
),
platformInfo = PlatformInfo(
device = Build.DEVICE,
buildFingerprint = Build.FINGERPRINT,
androidVersion = Build.VERSION.RELEASE,
systemAbi = Build.SUPPORTED_ABIS.firstOrNull() ?: "unknown"
)