mirror of
https://github.com/Katana-Official/SPatch-Update.git
synced 2026-03-20 05:09:45 +08:00
21 lines
551 B
Kotlin
21 lines
551 B
Kotlin
package com.android.launcher2
|
|
|
|
import android.content.Intent
|
|
import net_62v.external.MetaCore
|
|
import net_62v.external.MetaPackageManager
|
|
|
|
object LauncherLoader {
|
|
// For java
|
|
@JvmStatic
|
|
fun instance() = this
|
|
fun waitForAndGetInitialService(
|
|
serviceCallback : () -> Unit
|
|
) = MetaCore.registerCoreCallback(
|
|
serviceCallback
|
|
)
|
|
fun obtainLaunchIntentByPackage(
|
|
src : String
|
|
) = MetaPackageManager.getLaunchIntentForPackage(
|
|
Intent(Intent.ACTION_MAIN).setPackage(src) /* Package Name */
|
|
)
|
|
} |