This commit is contained in:
Vitaliy 2020-11-26 02:27:48 +02:00
parent 4b99c282dd
commit e1ef1b096c

View file

@ -930,11 +930,21 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
stopRecording(activity, false);
}
@Override
public void mapActivityResume(MapActivity activity) {
this.mapActivity = activity;
if (Build.VERSION.SDK_INT < 29) {
runAction(activity);
}
}
@Override
public void mapActivityResumeOnTop(MapActivity activity) {
this.mapActivity = activity;
// ((AudioManager) activity.getSystemService(Context.AUDIO_SERVICE)).registerMediaButtonEventReceiver(
// new ComponentName(activity, MediaRemoteControlReceiver.class));
runAction(activity);
}
private void runAction(MapActivity activity) {
if (runAction != -1) {
takeAction(activity, actionLon, actionLat, runAction);
runAction = -1;