Inconsistency in display.actualContentHeight

Today I tested for the first time on a Xiaomi device and found out that on app launch the display library gives wrong values on the values below.
After 1.5 seconds it starts giving the correct values. This is causing damages in the first scene. No problem on other Android devices.
See the code put on launch:

print(display.actualContentHeight)
print(display.safeActualContentHeight)
timer.performWithDelay( 1500, function()
    print(display.actualContentHeight)
    print(display.safeActualContentHeight)
end )
--Result:
2036
1932
2400
2296

My config.lua is like:

content = {
    width = display.pixelWidth,
    height = display.pixelHeight,
    scale = "letterBox",
    fps = 60,
    xAlign = "center",
    yAlign = "top"
},

Are you using Android’s immersiveSticky mode?

Yes I am indeed

Your issue is caused by that, not by your device per se.

You can check my plugin’s demo project that handles this:

You can find detailed explanation on the issue inside the spyric/screen.lua file.

In fact thats the issue. I put a delay to enter the first scene and it worked. Thanks a lot for the help