move preview resuming to a separate function
This commit is contained in:
parent
69c269d7c6
commit
b7e0285aa4
|
@ -301,6 +301,15 @@ public class Preview extends ViewGroup
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
resumePreview();
|
||||||
|
}
|
||||||
|
}, PHOTO_PREVIEW_LENGTH);
|
||||||
|
|
||||||
|
new PhotoProcessor(mActivity, mTargetUri).execute(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private void resumePreview() {
|
||||||
if (mCamera != null) {
|
if (mCamera != null) {
|
||||||
mCamera.startPreview();
|
mCamera.startPreview();
|
||||||
}
|
}
|
||||||
|
@ -312,11 +321,6 @@ public class Preview extends ViewGroup
|
||||||
mCamera.setParameters(mParameters);
|
mCamera.setParameters(mParameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, PHOTO_PREVIEW_LENGTH);
|
|
||||||
|
|
||||||
new PhotoProcessor(mActivity, mTargetUri).execute(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private Camera.Size getOptimalPictureSize() {
|
private Camera.Size getOptimalPictureSize() {
|
||||||
final int maxResolution = Config.Companion.newInstance(mContext).getMaxPhotoResolution();
|
final int maxResolution = Config.Companion.newInstance(mContext).getMaxPhotoResolution();
|
||||||
|
|
Loading…
Reference in New Issue