8 Star 16 Fork 2

openvela/frameworks_bluetooth

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
frameworkBluetoothBin.go 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
Yuan Zhang376 提交于 2026-01-21 16:27 +08:00 . bluetooth: add android15 config control.
package frameworkBluetooth
import (
"android/soong/android"
"android/soong/cc"
)
func init() {
android.RegisterModuleType("frameworkBluetooth_cc_binary", frameworkBluetoothBinDefaultsFactory)
}
func frameworkBluetoothBinDefaultsFactory() (android.Module) {
module := cc.BinaryFactory()
android.AddLoadHook(module, frameworkBluetoothBinHook)
return module
}
func frameworkBluetoothBinHook(ctx android.LoadHookContext) {
//AConfig() function is at build/soong/android/config.go
Version := ctx.AConfig().PlatformVersionName()
type props struct {
Srcs []string
Static_libs []string
Shared_libs []string
Cflags []string
}
p := &props{}
if (Version == "12") {
p.Cflags = append(p.Cflags, "-DANDROID_12")
} else if (Version == "14") {
p.Cflags = append(p.Cflags, "-DANDROID_14")
} else if (Version == "15") {
p.Cflags = append(p.Cflags, "-DANDROID_15")
}
ctx.AppendProperties(p)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/open-vela/frameworks_bluetooth.git
git@gitee.com:open-vela/frameworks_bluetooth.git
open-vela
frameworks_bluetooth
frameworks_bluetooth
dev

搜索帮助