Skip to content

Commit b094745

Browse files
authored
Switch from system volume to media volume (#600)
- switch volume return from system volume to the music volume
1 parent d3bb6dc commit b094745

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/utils

mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/utils/TelemetryUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public static int getScreenBrightness(Context context) {
199199
*/
200200
public static int getVolumeLevel(Context context) {
201201
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
202-
return (int) Math.floor(100.0 * audioManager.getStreamVolume(AudioManager.STREAM_SYSTEM)
203-
/ audioManager.getStreamMaxVolume(AudioManager.STREAM_SYSTEM));
202+
return (int) Math.floor(100.0 * audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
203+
/ audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
204204
}
205205

206206
/**

0 commit comments

Comments
 (0)