Prevent context leak through SystemSensorManager (#245)

pull/248/head
MatFl 6 years ago committed by Mattia Iavarone
parent 819638862f
commit c113933b60
  1. 2
      cameraview/src/main/utils/com/otaliastudios/cameraview/OrientationHelper.java

@ -22,7 +22,7 @@ class OrientationHelper {
OrientationHelper(Context context, @NonNull Callback callback) { OrientationHelper(Context context, @NonNull Callback callback) {
mCallback = callback; mCallback = callback;
mListener = new OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) { mListener = new OrientationEventListener(context.getApplicationContext(), SensorManager.SENSOR_DELAY_NORMAL) {
@Override @Override
public void onOrientationChanged(int orientation) { public void onOrientationChanged(int orientation) {

Loading…
Cancel
Save