RK3288[android 7.1]调试笔记默认音乐、视频、游戏和其他媒体音乐,游戏,铃声和通知等修改视频设置为70%
路径为/frameworks/base/media/java/android/media /AudioSystem.java文件
wangxd@build-server-100:~/work/dsy/rk3288-Android-7.0/frameworks/base(m_android_7_0)$ git diff media/java/android/media/AudioSystem.java
diff --git a /media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
旧模式 100644
新模式 100755
索引 f597440..219089c
--- a/media/java/android/media/AudioSystem .java
+++ b/media/java/android/media/AudioSystem.java
@@ -762,16 +762,16 @@ public class AudioSystem
}
public static int[] DEFAULT_STREAM_VOLUME = new int[] {//这里修改默认的音量值 11/15=0.73 平方70%
- 4, // STREAM_VOICE_CALL
- 7, // STREAM_SYSTEM
- 5, // STREAM_RING
+ 11, / / STREAM_VOICE_CALL
+ 11, // STREAM_SYSTEM
+ 11, // STREAM_RING
11, // STREAM_MUSIC
- 6, // STREAM_ALARM
- 5, // STREAM_NOTIFICATION
- 7, // STREAM_BLUETOOTH_SCO
- 7, // STREAM_SYSTEM_ENFORCED
- 11, // STREAM_DTMF
- 11 // STREAM_TTS
+ 11, // STREAM_ALARM
+ 11, // STREAM_NOTIFICATION
+ 11, // STREAM_BLUETOOTH_SCO
+ 11, // STREAM_SYSTEM_ENFORCED
+ 11, // STREAM_DTMF
+ 11 // STREAM_TTS
};
public static String streamToString(int stream) {
路径修改为/frameworks/base/services/core/java/com/android/server/audio/AudioService.java文件
wangxd@build-server-100:~/work/dsy/rk3288 -Android-7.0/frameworks/base(m_android_7_0)$ git diff services/core/java/com/android/server/audio/AudioService.java
diff --git a/services/core/java/com/android/server/audio /AudioService.java b/services/core/java/com/android/serve
旧模式 100644
新模式 100755
索引 40ae864..3fd67a3
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -261,14 +261,14 @@ public class AudioService extends IAudioService.Stub {
/** 最大音量索引值音频流 */
private static int[] MAX_STREAM_VOLUME = new int[] {//这里重量的属性都设为 15
- 5, // STREAM_VOICE_CALL
- 7, // STREAM_VOICE_SYSTEM - 7
, // STREAM_RING
+ 15, / / STREAM_VOICE_CALL
+ 15, // STREAM_SYSTEM
+ 15, // STREAM_RING
15, // STREAM_MUSIC
- 7, // STREAM_ALARM
- 7, // STREAM_NOTIFICATION
+ 15, // STREAM_ALARM
+ 15, // STREAM_NOTIFICATION
15, // STREAM_BLUETOOTH_SCO
- 7, // STREAM_SYSTEM_ENFORCED
+ 15, // STREAM_SYSTEM_ENFORCED
15, // STREAM_DTMF
15 // STREAM_TTS
}; /** 音频流的最小音量 */ private static int] MIN_STR_VOLUME t[] {// STREAM_C = 新的 EAM_1
中的最小音量索引值, // STREAM_C = STREAM_RING 0 , // STRSYSTEM 0, // STREAM_RING 0 , // STREAM_MUSIC 0, // STREAM_ALARM 0, // STREAM_NOTIFICATION 0, // STREAM_BLUETOOTH_SCO 0, // STREAM_SYSTEM_ENFORCED 0, // STREAM_DTMF 0 // STREAM_TTS };
@@ -614,19 +614,19 @@ public class AudioService extends IAudioService.Stub {
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
mHasVibrator = 振动器 == 空?false : vibrator.hasVibrator();
- // 初始化音量
- int maxVolume = SystemProperties.getInt(“ro.config.vc_call_vol_steps”,
- MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
- 如果(最大音量!= MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]){
- MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume;
- AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4;
- }
- maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”,
- MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
- if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
- MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume;
- AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4;
- }
//这里把在system.prop获取的比重设置给屏蔽掉上面使用的默认值,为什么要屏蔽掉,原因是如果在system.prop获取的比重设置与我们修改容量类型,默认容量改变的结构体中的值/ 4 系统类型的设置值 = 系统的设置值
+ // 初始容量
+ // int maxVol 属性。 getInt(“ro.config.vc_call_vol_steps”,
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
+ // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]) {
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume;
+ // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4;
+ // }
+ // maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”,
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
+ // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume;
+ // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4;
+ // }
sSoundEffectVolumeDb = context.getResources().getInteger(
com.android.internal.R.integer.config_soundEffectVolumeDb);
RK3288[android 7.1]调试笔记默认音乐、视频、游戏和其他媒体音乐,游戏,铃声和通知等修改视频设置为70%
路径为/frameworks/base/media/java/android/media /AudioSystem.java文件
wangxd@build-server-100:~/work/dsy/rk3288-Android-7.0/frameworks/base(m_android_7_0)$ git diff media/java/android/media/AudioSystem.java
diff --git a /media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
旧模式 100644
新模式 100755
索引 f597440..219089c
--- a/media/java/android/media/AudioSystem .java
+++ b/media/java/android/media/AudioSystem.java
@@ -762,16 +762,16 @@ public class AudioSystem
}
public static int[] DEFAULT_STREAM_VOLUME = new int[] {//这里修改默认的音量值 11/15=0.73 平方70%
- 4, // STREAM_VOICE_CALL
- 7, // STREAM_SYSTEM
- 5, // STREAM_RING
+ 11, / / STREAM_VOICE_CALL
+ 11, // STREAM_SYSTEM
+ 11, // STREAM_RING
11, // STREAM_MUSIC
- 6, // STREAM_ALARM
- 5, // STREAM_NOTIFICATION
- 7, // STREAM_BLUETOOTH_SCO
- 7, // STREAM_SYSTEM_ENFORCED
- 11, // STREAM_DTMF
- 11 // STREAM_TTS
+ 11, // STREAM_ALARM
+ 11, // STREAM_NOTIFICATION
+ 11, // STREAM_BLUETOOTH_SCO
+ 11, // STREAM_SYSTEM_ENFORCED
+ 11, // STREAM_DTMF
+ 11 // STREAM_TTS
};
public static String streamToString(int stream) {
路径修改为/frameworks/base/services/core/java/com/android/server/audio/AudioService.java文件
wangxd@build-server-100:~/work/dsy/rk3288 -Android-7.0/frameworks/base(m_android_7_0)$ git diff services/core/java/com/android/server/audio/AudioService.java
diff --git a/services/core/java/com/android/server/audio /AudioService.java b/services/core/java/com/android/serve
旧模式 100644
新模式 100755
索引 40ae864..3fd67a3
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -261,14 +261,14 @@ public class AudioService extends IAudioService.Stub {
/** 最大音量索引值音频流 */
private static int[] MAX_STREAM_VOLUME = new int[] {//这里重量的属性都设为 15
- 5, // STREAM_VOICE_CALL
- 7, // STREAM_VOICE_SYSTEM - 7
, // STREAM_RING
+ 15, / / STREAM_VOICE_CALL
+ 15, // STREAM_SYSTEM
+ 15, // STREAM_RING
15, // STREAM_MUSIC
- 7, // STREAM_ALARM
- 7, // STREAM_NOTIFICATION
+ 15, // STREAM_ALARM
+ 15, // STREAM_NOTIFICATION
15, // STREAM_BLUETOOTH_SCO
- 7, // STREAM_SYSTEM_ENFORCED
+ 15, // STREAM_SYSTEM_ENFORCED
15, // STREAM_DTMF
15 // STREAM_TTS
}; /** 音频流的最小音量 */ private static int] MIN_STR_VOLUME t[] {// STREAM_C = 新的 EAM_1
中的最小音量索引值, // STREAM_C = STREAM_RING 0 , // STRSYSTEM 0, // STREAM_RING 0 , // STREAM_MUSIC 0, // STREAM_ALARM 0, // STREAM_NOTIFICATION 0, // STREAM_BLUETOOTH_SCO 0, // STREAM_SYSTEM_ENFORCED 0, // STREAM_DTMF 0 // STREAM_TTS };
@@ -614,19 +614,19 @@ public class AudioService extends IAudioService.Stub {
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
mHasVibrator = 振动器 == 空?false : vibrator.hasVibrator();
- // 初始化音量
- int maxVolume = SystemProperties.getInt(“ro.config.vc_call_vol_steps”,
- MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
- 如果(最大音量!= MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]){
- MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume;
- AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4;
- }
- maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”,
- MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
- if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
- MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume;
- AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4;
- }
//这里把在system.prop获取的比重设置给屏蔽掉上面使用的默认值,为什么要屏蔽掉,原因是如果在system.prop获取的比重设置与我们修改容量类型,默认容量改变的结构体中的值/ 4 系统类型的设置值 = 系统的设置值
+ // 初始容量
+ // int maxVol 属性。 getInt(“ro.config.vc_call_vol_steps”,
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
+ // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]) {
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume;
+ // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4;
+ // }
+ // maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”,
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
+ // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) {
+ // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume;
+ // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4;
+ // }
sSoundEffectVolumeDb = context.getResources().getInteger(
com.android.internal.R.integer.config_soundEffectVolumeDb);
举报