From 10913dc584acefd03316e4c1372fafd588ec6ac8 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 7 Feb 2025 16:08:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=81=E5=B1=8F=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8B=EF=BC=8C=E7=95=8C=E9=9D=A2=E8=BF=98=E5=9C=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86rotation=20=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: simon --- dmserver/src/sensor_connector.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dmserver/src/sensor_connector.cpp b/dmserver/src/sensor_connector.cpp index 4af4dffb5b..857d6a6529 100644 --- a/dmserver/src/sensor_connector.cpp +++ b/dmserver/src/sensor_connector.cpp @@ -130,6 +130,10 @@ void GravitySensorSubscriber::HandleGravitySensorEventCallback(SensorEvent *even if (!CheckCallbackTimeInterval() || event == nullptr) { return; } + if (ScreenRotationController::IsScreenRotationLocked()) { + WLOGD("dms: IsScreenRotationLocked true"); + return; + } if (event->sensorTypeId != SENSOR_TYPE_ID_GRAVITY) { WLOGE("dms: Orientation Sensor Callback is not SENSOR_TYPE_ID_GRAVITY"); return; -- Gitee