小游戏第一次打开时,点击触发位置不对
你好,我们的使用场景是这样的,系统创建了一个VirtualDisplay,分辨率为1080x1440,density 300,具体参数如下: Display 3: mDisplayId=3 mIsEnabled=true mIsInTransition=false mLayerStack=3 mHasContent=true mDesiredDisplayModeSpecs={baseModeId=3 allowGroupSwitching=false primaryRefreshRateRange=[0 240] appRequestRefreshRateRange=[0 240]} mRequestedColorMode=0 mDisplayOffset=(0, 0) mDisplayScalingDisabled=false mPrimaryDisplayDevice=Virtual Display mBaseDisplayInfo=DisplayInfo{"Virtual Display", displayId 3", displayGroupId 0, FLAG_SECURE, FLAG_TRUSTED, FLAG_TOUCH_FEEDBACK_DISABLED, real 1080 x 1440, largest app 1080 x 1440, smallest app 1080 x 1440, appVsyncOff 0, presDeadline 22222222, mode 3, defaultMode 3, modes [{id=3, width=1080, height=1440, fps=45.0, alternativeRefreshRates=[]}], hdrCapabilities null, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON, committedState UNKNOWN, type VIRTUAL, uniqueId "virtual:com.rokid.glass.kaleido,1000,Virtual Display,0", app 1080 x 1440, density 300 (300.0 x 300.0) dpi, layerStack 3, colorMode 0, supportedColorModes [0], deviceProductInfo null, owner com.rokid.glass.kaleido (uid 1000), removeMode 1, refreshRateOverride 0.0, brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, installOrientation ROTATION_0} mOverrideDisplayInfo=DisplayInfo{"Virtual Display", displayId 3", displayGroupId 0, FLAG_SECURE, FLAG_TRUSTED, FLAG_TOUCH_FEEDBACK_DISABLED, real 1080 x 1440, largest app 1440 x 1440, smallest app 1080 x 1080, appVsyncOff 0, presDeadline 22222222, mode 3, defaultMode 3, modes [{id=3, width=1080, height=1440, fps=45.0, alternativeRefreshRates=[]}], hdrCapabilities null, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON, committedState UNKNOWN, type VIRTUAL, uniqueId "virtual:com.rokid.glass.kaleido,1000,Virtual Display,0", app 1080 x 1440, density 300 (300.0 x 300.0) dpi, layerStack 3, colorMode 0, supportedColorModes [0], deviceProductInfo null, owner com.rokid.glass.kaleido (uid 1000), removeMode 1, refreshRateOverride 0.0, brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, installOrientation ROTATION_0} mRequestedMinimalPostProcessing=false mFrameRateOverrides=[] mPendingFrameRateOverrideUids={} 遇到的问题是,第一次打开小游戏(例如:几何王国),显示都是正常的,但是点击的位置与实际触发事件的位置不一致,都要点击左上方区域,如下图所示: [图片] 点击红圈位置,才能触发“奖励已满” 的点击事件。 点击右上角三个点,选择重新打开小程序,就正常了。 非游戏类型的小程序,第一次打开没有这个问题。 麻烦看下是什么原因导致,谢谢。