compose test

This commit is contained in:
rhunk
2023-07-28 02:03:39 +02:00
parent ec6ba52b58
commit 304bd9fe94
16 changed files with 384 additions and 16 deletions

View File

@ -35,7 +35,7 @@ class SnapEnhance {
//for lspatch builds, we need to check if the service is correctly installed
runCatching {
appContext.androidContext.packageManager.getApplicationInfoCompat(BuildConfig.LIBRARY_PACKAGE_NAME, PackageManager.GET_META_DATA)
appContext.androidContext.packageManager.getApplicationInfoCompat(BuildConfig.APPLICATION_ID, PackageManager.GET_META_DATA)
}.onFailure {
appContext.crash("SnapEnhance bridge service is not installed. Please download stable version from https://github.com/rhunk/SnapEnhance/releases")
return@hook

View File

@ -11,7 +11,7 @@ class OpenMap: AbstractAction("action.open_map", dependsOnProperty = ConfigPrope
override fun run() {
context.runOnUiThread {
val mapActivityIntent = Intent()
mapActivityIntent.setClassName(BuildConfig.LIBRARY_PACKAGE_NAME, MapActivity::class.java.name)
mapActivityIntent.setClassName(BuildConfig.APPLICATION_ID, MapActivity::class.java.name)
mapActivityIntent.putExtra("location", Bundle().apply {
putDouble("latitude", context.config.string(ConfigProperty.LATITUDE).toDouble())
putDouble("longitude", context.config.string(ConfigProperty.LONGITUDE).toDouble())

View File

@ -32,12 +32,12 @@ class BridgeClient(
with(context.androidContext) {
//ensure the remote process is running
startActivity(Intent()
.setClassName(BuildConfig.LIBRARY_PACKAGE_NAME, ForceStartActivity::class.java.name)
.setClassName(BuildConfig.APPLICATION_ID, ForceStartActivity::class.java.name)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
)
val intent = Intent()
.setClassName(BuildConfig.LIBRARY_PACKAGE_NAME, BridgeService::class.java.name)
.setClassName(BuildConfig.APPLICATION_ID, BridgeService::class.java.name)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
bindService(
intent,

View File

@ -48,7 +48,7 @@ class SettingsGearInjector : AbstractMenu() {
setOnClickListener {
val intent = Intent().apply {
setClassName(BuildConfig.LIBRARY_PACKAGE_NAME, ConfigActivity::class.java.name)
setClassName(BuildConfig.APPLICATION_ID, ConfigActivity::class.java.name)
}
intent.putExtra("lspatched", File(context.cacheDir, "lspatch/origin").exists())
context.startActivity(intent)

View File

@ -191,7 +191,7 @@ class MessageExporter(
runCatching {
ZipFile(
context.androidContext.packageManager.getApplicationInfoCompat(BuildConfig.LIBRARY_PACKAGE_NAME, PackageManager.GET_META_DATA).publicSourceDir
context.androidContext.packageManager.getApplicationInfoCompat(BuildConfig.APPLICATION_ID, PackageManager.GET_META_DATA).publicSourceDir
).use { apkFile ->
//export rawinflate.js
apkFile.getEntry("assets/web/rawinflate.js").let { entry ->