Skip to content

Commit

Permalink
don't hide preview when paused, as it causes camera to stop working
Browse files Browse the repository at this point in the history
when screen turns off
  • Loading branch information
n8fr8 committed Jan 20, 2018
1 parent 581ae37 commit 64587a6
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/java/org/havenapp/main/ui/CameraFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ public void onCreate(Bundle savedInstanceState) {
@Override
public void onPause() {
super.onPause();
preview.setVisibility(View.GONE);
}

@Override
public void onResume() {
super.onResume();

initCamera ();

}

public void resetCamera ()
Expand Down Expand Up @@ -103,10 +100,6 @@ public void onProcess(Bitmap oldBitmap, Bitmap newBitmap, Bitmap rawBitmap,
});
}
}
else
{
preview.setVisibility(View.VISIBLE);
}
}
public void onSensorChanged(SensorEvent event) {

Expand Down

0 comments on commit 64587a6

Please sign in to comment.