Skip to content

Commit

Permalink
APK version 1.1.2 (bugfix on NullPointerException after CameraActivity)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisfeld committed Oct 3, 2015
1 parent 58a91ed commit 1dce132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,8 @@ public void onPictureTaken(final byte[] data) {
metadata.setYCenter(0.5f); // MAGIC_NUMBER
metadata.setOverlayScaleFactor(((float) overlayCircleRadius) / CIRCLE_BITMAP_SIZE * getDefaultOverlayScaleFactor());
metadata.setPupilSize(OverlayPinchImageView.DEFAULT_PUPIL_SIZE);
metadata.setPupilXOffset(0f);
metadata.setPupilYOffset(0f);
}

// save photo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,16 @@ public void run() {
}

if (mMetadata.getPupilSize() == null) {
mPupilOverlayX = 0;
mPupilOverlayY = 0;
mPupilOverlayScaleFactor = DEFAULT_PUPIL_SIZE;
}
else {
mPupilOverlayScaleFactor = mMetadata.getPupilSize();
}
if (mMetadata.getPupilXOffset() == null || mMetadata.getPupilYOffset() == null) {
mPupilOverlayX = 0;
mPupilOverlayY = 0;
}
else {
mPupilOverlayX = mMetadata.getPupilXOffset();
mPupilOverlayY = mMetadata.getPupilYOffset();
}
Expand Down

0 comments on commit 1dce132

Please sign in to comment.