This commit is contained in:
parent
a5bd6bceea
commit
a9fc79463f
2 changed files with 20 additions and 17 deletions
|
@ -73,11 +73,13 @@ public class AudioVideoNoteRecordingMenuFullScreen extends AudioVideoNoteRecordi
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeakReference<AudioVideoNoteRecordingMenuFullScreenFragment> findMenuFragment() {
|
public WeakReference<AudioVideoNoteRecordingMenuFullScreenFragment> findMenuFragment() {
|
||||||
Fragment fragment = getMapActivity().getSupportFragmentManager().findFragmentByTag(AudioVideoNoteRecordingMenuFullScreenFragment.TAG);
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (fragment != null && !fragment.isDetached()) {
|
if (mapActivity != null) {
|
||||||
return new WeakReference<>((AudioVideoNoteRecordingMenuFullScreenFragment) fragment);
|
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(AudioVideoNoteRecordingMenuFullScreenFragment.TAG);
|
||||||
} else {
|
if (fragment != null && !fragment.isDetached()) {
|
||||||
return null;
|
return new WeakReference<>((AudioVideoNoteRecordingMenuFullScreenFragment) fragment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1913,20 +1913,21 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
public synchronized void shootAgain() {
|
public synchronized void shootAgain() {
|
||||||
cancelPhotoTimer();
|
cancelPhotoTimer();
|
||||||
cam.cancelAutoFocus();
|
|
||||||
photoRawData = null;
|
photoRawData = null;
|
||||||
|
if (cam != null) {
|
||||||
|
try {
|
||||||
|
cam.cancelAutoFocus();
|
||||||
|
cam.stopPreview();
|
||||||
|
cam.startPreview();
|
||||||
|
internalShoot();
|
||||||
|
|
||||||
try {
|
} catch (Exception e) {
|
||||||
cam.stopPreview();
|
logErr(e);
|
||||||
cam.startPreview();
|
closeRecordingMenu();
|
||||||
internalShoot();
|
closeCamera();
|
||||||
|
finishRecording();
|
||||||
} catch (Exception e) {
|
e.printStackTrace();
|
||||||
logErr(e);
|
}
|
||||||
closeRecordingMenu();
|
|
||||||
closeCamera();
|
|
||||||
finishRecording();
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue