android - 如何有条件地在 AOSP 中设置默认属性

标签 android android-source

如果构建变体是用户,我正在尝试将默认 NTP 服务器 (config_ntpServer) 设置为无。

我看到,为了做到这一点,我需要编辑 overlay/frameworks/base/core/res/res/values/config.xml。

但是我该如何添加条件部分,例如如果构建变体是用户,则将 config_ntpServer 设置为 None?

最佳答案

我不确定这是否正确,但您可以尝试:

  1. 将config.xml 复制到您的设备树中。
  2. 将 config_ntpServer 更改为无
  3. 将如下内容添加到设备树中的 board.mk 中:

    ifeq ($(TARGET_BUILD_VARIANT),user)
        PRODUCT_COPY_FILES += device/vendor/product/config.xml:overlay/frameworks/base/core/res/res/values/config.xml
    endif
    

关于android - 如何有条件地在 AOSP 中设置默认属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41851146/

相关文章:

android - Volley 中的 onPreExecute 方法

android - ClassCastException ContentFrameLayout androidx 与系统应用程序中的 support.v7

android - 从 AOSP Q Beta 1 代码构建 Android Go

android - iOS 到安卓 : How to display a TextView

hook - 安卓应用程序: java/JNI call hooking strategies

android - AOSP 基于自定义设备 - 模拟器构建

android - 是否可以在 android 中以编程方式切换 APN?

android - Google 日历排序顺序和 future 事件不起作用

android - 快速适配器位置

android - ADT插件文件夹在哪里?