Fix #2982
This commit is contained in:
parent
5f5e574ac5
commit
70e3c8ac6a
1 changed files with 27 additions and 20 deletions
|
@ -828,7 +828,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
((AudioManager) activity.getSystemService(Context.AUDIO_SERVICE)).registerMediaButtonEventReceiver(
|
((AudioManager) activity.getSystemService(Context.AUDIO_SERVICE)).registerMediaButtonEventReceiver(
|
||||||
new ComponentName(activity, MediaRemoteControlReceiver.class));
|
new ComponentName(activity, MediaRemoteControlReceiver.class));
|
||||||
if (runAction != -1) {
|
if (runAction != -1) {
|
||||||
takeAction(activity, actionLat, actionLon, runAction);
|
takeAction(activity, actionLon, actionLat, runAction);
|
||||||
runAction = -1;
|
runAction = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1275,7 +1275,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
if (parameters.getSupportedFlashModes() != null
|
if (parameters.getSupportedFlashModes() != null
|
||||||
&& parameters.getSupportedFlashModes().contains(Parameters.FLASH_MODE_AUTO)) {
|
&& parameters.getSupportedFlashModes().contains(Parameters.FLASH_MODE_AUTO)) {
|
||||||
parameters.setFlashMode(Parameters.FLASH_MODE_AUTO);
|
//parameters.setFlashMode(Parameters.FLASH_MODE_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
|
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
|
||||||
|
@ -1313,6 +1313,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
|
|
||||||
private void internalShoot() {
|
private void internalShoot() {
|
||||||
|
getMapActivity().getMyApplication().runInUIThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (!autofocus) {
|
if (!autofocus) {
|
||||||
cam.takePicture(null, null, new JpegPhotoHandler());
|
cam.takePicture(null, null, new JpegPhotoHandler());
|
||||||
} else {
|
} else {
|
||||||
|
@ -1332,6 +1335,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
|
||||||
private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) {
|
private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) {
|
||||||
final double ASPECT_TOLERANCE = 0.1;
|
final double ASPECT_TOLERANCE = 0.1;
|
||||||
|
@ -1902,11 +1907,13 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
app.showToastMessage(R.string.no_microphone_permission);
|
app.showToastMessage(R.string.no_microphone_permission);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null && !mapActivity.isDestroyed()) {
|
if (mapActivity != null && !mapActivity.isDestroyed()) {
|
||||||
takeAction(mapActivity, actionLat, actionLon, runAction);
|
takeAction(mapActivity, actionLon, actionLat, runAction);
|
||||||
runAction = -1;
|
runAction = -1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public class JpegPhotoHandler implements PictureCallback {
|
public class JpegPhotoHandler implements PictureCallback {
|
||||||
|
|
Loading…
Reference in a new issue