Loading android/app/res/values/config.xml +7 −3 Original line number Diff line number Diff line Loading @@ -58,11 +58,15 @@ <bool name="headset_client_initial_audio_route_allowed">true</bool> <!-- For AVRCP absolute volume feature. If the threshold is non-zero, restrict the initial volume to the threshold. Valid value is 1-14, and recommended value is 8 --> <!-- @deprecated: use a2dp_absolute_volume_initial_threshold_percent instead. --> <integer name="a2dp_absolute_volume_initial_threshold">8</integer> <!-- AVRCP absolute volume initial value as percent of the maximum value. Valid values are in the interval [0, 100]. Recommended value is 50. --> <integer name="a2dp_absolute_volume_initial_threshold_percent">50</integer> <!-- For A2DP sink ducking volume feature. --> <integer name="a2dp_sink_duck_percent">25</integer> Loading android/app/src/com/android/bluetooth/avrcp/Avrcp.java +7 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,13 @@ public final class Avrcp { Resources resources = context.getResources(); if (resources != null) { mAbsVolThreshold = resources.getInteger(R.integer.a2dp_absolute_volume_initial_threshold); // Update the threshold if the threshold_percent is valid int threshold_percent = resources.getInteger(R.integer.a2dp_absolute_volume_initial_threshold_percent); if (threshold_percent >= 0 && threshold_percent <= 100) { mAbsVolThreshold = (threshold_percent * mAudioStreamMax) / 100; } } // Register for package removal intent broadcasts for media button receiver persistence Loading Loading
android/app/res/values/config.xml +7 −3 Original line number Diff line number Diff line Loading @@ -58,11 +58,15 @@ <bool name="headset_client_initial_audio_route_allowed">true</bool> <!-- For AVRCP absolute volume feature. If the threshold is non-zero, restrict the initial volume to the threshold. Valid value is 1-14, and recommended value is 8 --> <!-- @deprecated: use a2dp_absolute_volume_initial_threshold_percent instead. --> <integer name="a2dp_absolute_volume_initial_threshold">8</integer> <!-- AVRCP absolute volume initial value as percent of the maximum value. Valid values are in the interval [0, 100]. Recommended value is 50. --> <integer name="a2dp_absolute_volume_initial_threshold_percent">50</integer> <!-- For A2DP sink ducking volume feature. --> <integer name="a2dp_sink_duck_percent">25</integer> Loading
android/app/src/com/android/bluetooth/avrcp/Avrcp.java +7 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,13 @@ public final class Avrcp { Resources resources = context.getResources(); if (resources != null) { mAbsVolThreshold = resources.getInteger(R.integer.a2dp_absolute_volume_initial_threshold); // Update the threshold if the threshold_percent is valid int threshold_percent = resources.getInteger(R.integer.a2dp_absolute_volume_initial_threshold_percent); if (threshold_percent >= 0 && threshold_percent <= 100) { mAbsVolThreshold = (threshold_percent * mAudioStreamMax) / 100; } } // Register for package removal intent broadcasts for media button receiver persistence Loading