davinci: parts: Delay creating MotorStatusCallback when the motor is opened

* Give the motor enough time to close in case it was
  still opened on boot without showing the error dialog.

Change-Id: Ibc00a999858f5067bbcf07bfecc779f1d0bf3664
This commit is contained in:
Arian 2020-10-11 15:40:19 +02:00
parent 027a842a58
commit 4f2af261f3
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9

View File

@ -140,10 +140,11 @@ public class PopupCameraService extends Service implements Handler.Callback {
if (status == Constants.MOTOR_STATUS_POPUP_OK if (status == Constants.MOTOR_STATUS_POPUP_OK
|| status == Constants.MOTOR_STATUS_TAKEBACK_JAMMED) { || status == Constants.MOTOR_STATUS_TAKEBACK_JAMMED) {
mMotor.takebackMotor(1); mMotor.takebackMotor(1);
Thread.sleep(1200);
} }
mMotorStatusCallback = new MotorStatusCallback(); mMotorStatusCallback = new MotorStatusCallback();
mMotor.setMotorCallback(mMotorStatusCallback); mMotor.setMotorCallback(mMotorStatusCallback);
} catch (RemoteException e) { } catch (InterruptedException | RemoteException e) {
// Do nothing // Do nothing
} }
} }