From 169d43565e4335becd2badc35a7f1a01dbc04eaf Mon Sep 17 00:00:00 2001 From: Arian Date: Sun, 11 Oct 2020 14:47:07 +0200 Subject: [PATCH] davinci: parts: Directly takeback the motor if it's not closed on create * using updateMotor does not make sense here because it would only close it when the state is MOTOR_STATUS_POPUP, but we explicitly also want to try to take it back when it's jammed. Change-Id: I7594fe01266a514a9fd780d17a91b0c7f957a1e1 --- .../org/lineageos/settings/popupcamera/PopupCameraService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java b/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java index 926ab0a..40a9228 100644 --- a/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java +++ b/parts/src/org/lineageos/settings/popupcamera/PopupCameraService.java @@ -129,7 +129,7 @@ public class PopupCameraService extends Service implements Handler.Callback { int status = mMotor.getMotorStatus(); if (status == Constants.MOTOR_STATUS_POPUP || status == Constants.MOTOR_STATUS_POPUP_JAM || status == Constants.MOTOR_STATUS_TAKEBACK_JAM) { - mHandler.sendEmptyMessage(Constants.MSG_CAMERA_CLOSED); + mMotor.takebackMotor(1); } } catch (RemoteException e) { // Do nothing