Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-118887

Screen.orientation broken on android 14

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.7, 6.7.1, 6.8.0 FF
    • 6.4, 6.5, 6.6
    • GUI: Other
    • Qt 6.6 (also tested on 6.4)
      pixel 4a with android 14
    • Android
    • 6209079c7 (dev), 7aeffcebb (6.7), 66d178921 (tqtc/lts-6.5)
    • 2023wk48FOQtforAndroid, 2023wk50FOQtforAndroid, 2023wk52FOQtforAndroid, 2024wk04FOQtforAndroid, 2024wk06FOQtforAndroid, 2024wk10FOQtforAndroid, 2024wk12FOQtforAndroid, 2024wk14FOQtforAndroid, 2024wk18FOQtforAndroid, 2024wk20s2FOQtforAndroid

    Description

      "Screen.orientation" seems to be broken on android phones running android 14.

      To reproduce we can use this qml code, running on a phone without lock orientation:

      import QtQuick
      import QtQuick.Window
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          Text {
              anchors.centerIn: parent
              text: `Orientation: ${Screen.orientation}`
          }
      }
      

      On my older phones, I get the expected behavior: orientation is 1 in portrait, 2 in landscape, and 8 in landscape inverted.

      On a pixel 4a, since the last system update, the value seems to randomly change as I rotate the phone. In portrait mode it sometimes shows 1, sometimes 2, sometimes 8.

      The same problem arrives if I directly use the C++ functions.

      Cheers,
      Gui

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lapohjan Lauri Pohjanheimo
              guillaume-chereau guillaume-chereau
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes