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
This commit is contained in:
Arian 2020-10-11 14:47:07 +02:00
parent 4df3381a1d
commit 169d43565e
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9

View File

@ -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