瑞芯微Rockchip开发者社区
直播中

微风挽雨

9年用户 927经验值
擅长:可编程逻辑 电源/新能源 嵌入式技术
私信 关注
[问答]

如何去实现RK3288 android 7.1.2屏蔽开机音频的设计呢

如何去实现RK3288 android 7.1.2屏蔽开机音频的设计呢?

回帖(1)

李冬茗

2022-3-3 14:43:18
1、首先定位播放音频文件大概位置



2、确认播放音频为 WirelessChargingStarted.ogg

3、根据WirelessChargingStarted名称关键字找到frameworksbaseservicescorejavacomandroidserverpowerNotifier.java



4、修改

diff --git a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index 3083f55..2b4c759 100755
--- a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -66,7 +66,8 @@
     true

     
     1
+    0
     /system/media/audio/ui/LowBattery.ogg
     0
     0

diff --git a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/frameworks/base/packages/SettingsProvider/src/com/android/pr
oviders/settings/DatabaseHelper.java
index f6b3d06..ed1e338 100755
--- a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2548,6 +2548,11 @@ class DatabaseHelper extends SQLiteOpenHelper {
             loadIntegerSetting(stmt, Settings.Secure.SLEEP_TIMEOUT,
                     R.integer.def_sleep_timeout);

@@ -2676,6 +2681,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
                     R.string.def_trusted_sound);
             loadIntegerSetting(stmt, Settings.Global.POWER_SOUNDS_ENABLED,
                     R.integer.def_power_sounds_enabled);
+            loadIntegerSetting(stmt, Settings.Global.CHARGING_SOUNDS_ENABLED,
+                    R.integer.def_charging_sounds_enabled);
             loadStringSetting(stmt, Settings.Global.LOW_BATTERY_SOUND,
                     R.string.def_low_battery_sound);
             loadIntegerSetting(stmt, Settings.Global.DOCK_SOUNDS_ENABLED,
举报

更多回帖

发帖
×
20
完善资料,
赚取积分