diff --git a/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java b/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java index bc0ec52..ee18e81 100644 --- a/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java +++ b/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java @@ -102,7 +102,12 @@ public class PopupCameraService extends Service implements Handler.Callback { @Override public void onSensorChanged(SensorEvent event) { if (event.values[0] == 2.0f) { - updateMotor(Constants.CLOSE_CAMERA_STATE); + try { + mMotor.takebackMotorShortly(); + mSensorManager.unregisterListener(mFreeFallListener, mFreeFallSensor); + } catch (RemoteException e) { + // Do nothing + } goBackHome(); } }