Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
use the application context not the activity context
n8fr8f91a6f4b84ad
diff --git a/src/main/java/org/havenapp/main/ui/CameraFragment.java b/src/main/java/org/havenapp/main/ui/CameraFragment.javaindex 1868d24..43c4229 100644--- a/src/main/java/org/havenapp/main/ui/CameraFragment.java+++ b/src/main/java/org/havenapp/main/ui/CameraFragment.java@@ -84,7 +84,8 @@ public final class CameraFragment extends Fragment {//Uncomment to see the cameraCameraView cameraView = getActivity().findViewById(R.id.camera_view);- cameraViewHolder = new Preview(getActivity(),cameraView);++ cameraViewHolder = new Preview(getContext().getApplicationContext(),cameraView);newImage = getActivity().findViewById(R.id.new_image);@@ -99,6 +100,7 @@ public final class CameraFragment extends Fragment {@Overridepublic void onDestroy() {super.onDestroy();+}public void onSensorChanged(SensorEvent event) {