2023-11-17 23:12:10 +08:00
|
|
|
//go:build android && cmfa
|
2023-11-17 01:19:20 +08:00
|
|
|
|
|
|
|
package process
|
|
|
|
|
|
|
|
import "github.com/metacubex/mihomo/constant"
|
|
|
|
|
|
|
|
type PackageNameResolver func(metadata *constant.Metadata) (string, error)
|
|
|
|
|
|
|
|
var DefaultPackageNameResolver PackageNameResolver
|
|
|
|
|
|
|
|
func FindPackageName(metadata *constant.Metadata) (string, error) {
|
|
|
|
if resolver := DefaultPackageNameResolver; resolver != nil {
|
|
|
|
return resolver(metadata)
|
|
|
|
}
|
|
|
|
return "", ErrPlatformNotSupport
|
|
|
|
}
|