如何在 AOSP 构建中设置默认属性? [英] How do I set the default properties in an AOSP build?

查看:28
本文介绍了如何在 AOSP 构建中设置默认属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以更改自定义 AOSP 构建中的默认 Android 设备属性?

Where can I change the default Android device properties in my custom AOSP build?

例如:

  • GPS - 开启;
  • 同步 - 开启;
  • 亮度 - 自动;
  • 蓝牙 - 关闭;
  • WiFi - 关闭;
  • 声音 - 默认声音;
  • 振铃时振动 - 关闭;

这些设置应该在构建中定义,这样一旦构建被加载,它们就已经处于正确的状态.

These settings should be defined in the build so they are already in their correct state once build is loaded.

是否有所有设置的集中文件/文件夹?还是一个 Settings 应用程序,它自己从所有 Android 平台模块收集设置?

Is there a centralized file/folder for all the settings? Or a Settings application that gathers by itself settings from all Android platform modules?

推荐答案

我通常检查默认值主要有两个地方:

There are two main places I usually check for defaults:

/frameworks/base/packages/SettingsProvider/res/values/defaults.xml

和:

/frameworks/base/core/res/res/values/config.xml

还值得检查设备目录中是否有覆盖原始文件的覆盖:

Its also worth checking the device directory for overlays which just override the original files:

/device/<company-name>/<product-name>/overlay/frameworks/base/core/res/res/values/config.xml

默认壁纸通常硬编码为:

Default wallpaper usually hardcoded to:

/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg

各种流的默认音量级别(int[] DEFAULT_STREAM_VOLUME):

Default volume levels for various streams(int[] DEFAULT_STREAM_VOLUME):

/frameworks/base/media/java/android/media/AudioSystem.java

这篇关于如何在 AOSP 构建中设置默认属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆