From a9fd178989bbb9589a161a9a041215d9ae46ef74 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 24 May 2017 10:48:22 +0300 Subject: [PATCH] Fix #3710 --- .../src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index d6379b9262..372e783257 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -1116,6 +1116,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { } public void recordAudio(double lat, double lon, final MapActivity mapActivity) { + AudioManager am = (AudioManager)app.getSystemService(Context.AUDIO_SERVICE); + am.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_MUTE, 0); if (ActivityCompat.checkSelfPermission(mapActivity, Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED) { initRecMenu(AVActionType.REC_AUDIO, lat, lon); @@ -1538,6 +1540,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { closeRecordingMenu(); } } + AudioManager am = (AudioManager)app.getSystemService(Context.AUDIO_SERVICE); + am.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_UNMUTE, 0); } private LatLon getNextRecordingLocation() {