mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sm6150-common
synced 2026-01-27 16:26:02 +00:00
davinci: parts: Quickly takeback the motor in free fall
Change-Id: Ib31f4cf5b1de4cd9366b3d15945749a53d260690
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user