Fixed the problem that image rotates unexpectedly when device is faced up or down.