mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 13:17:42 +02:00
compose test
This commit is contained in:
@ -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
|
||||
|
@ -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())
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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 ->
|
||||
|
Reference in New Issue
Block a user