Alexey Kulish 2016-02-29 09:47:08 +03:00
parent a5bd6bceea
commit a9fc79463f
2 changed files with 20 additions and 17 deletions

View file

@ -73,11 +73,13 @@ public class AudioVideoNoteRecordingMenuFullScreen extends AudioVideoNoteRecordi
}
public WeakReference<AudioVideoNoteRecordingMenuFullScreenFragment> findMenuFragment() {
Fragment fragment = getMapActivity().getSupportFragmentManager().findFragmentByTag(AudioVideoNoteRecordingMenuFullScreenFragment.TAG);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(AudioVideoNoteRecordingMenuFullScreenFragment.TAG);
if (fragment != null && !fragment.isDetached()) {
return new WeakReference<>((AudioVideoNoteRecordingMenuFullScreenFragment) fragment);
} else {
}
}
return null;
}
}
}

View file

@ -1913,10 +1913,10 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public synchronized void shootAgain() {
cancelPhotoTimer();
cam.cancelAutoFocus();
photoRawData = null;
if (cam != null) {
try {
cam.cancelAutoFocus();
cam.stopPreview();
cam.startPreview();
internalShoot();
@ -1929,6 +1929,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
e.printStackTrace();
}
}
}
public synchronized void finishPhotoRecording(boolean cancel) {
cancelPhotoTimer();