The app interface is frozen on android tablet by power button
-
I use Q5.15.2 to make an Android app, a simple qt widgets application, with only one button on the ui.
I installed the apk on a tablet with android13 version. After the app is running, I press the power button of the tablet to turn off the screen, and then press the power button of the tablet to turn on the screen. The app interface is displayed, but the interface is in a frozen state. When I click the button, the interface does not refresh at will, but The button click event is called, why?
There is no such problem when making Android programs on Qt6, but my code was written on 5.15.2 and I don't want to upgrade. How can I fix this problem on 5.15.2?
Can someone help me compile Android programs for versions 5.15. X above 5.15.2 to see if this problem can be reproduced?
-
I use Q5.15.2 to make an Android app, a simple qt widgets application, with only one button on the ui.
I installed the apk on a tablet with android13 version. After the app is running, I press the power button of the tablet to turn off the screen, and then press the power button of the tablet to turn on the screen. The app interface is displayed, but the interface is in a frozen state. When I click the button, the interface does not refresh at will, but The button click event is called, why?
There is no such problem when making Android programs on Qt6, but my code was written on 5.15.2 and I don't want to upgrade. How can I fix this problem on 5.15.2?
Can someone help me compile Android programs for versions 5.15. X above 5.15.2 to see if this problem can be reproduced?
-
@jsulm debug Debug displays the following information
I HandWritingStubImpl: refreshLastKeyboardType: 1
I HandWritingStubImpl: getCurrentKeyboardType: 1
E BufferQueueProducer: SurfaceView[org.qtproject.example.untitled/org.qtproject.qt5.android.bindings.QtActivity]#108(BLAST Consumer)108 disconnect: not connected (req=2)
D DecorView[]: onWindowFocusChanged hasWindowFocus false
D AppScoutStateMachine: 9456-ScoutStateMachinecreated
D VRI[QtActivity]: vri.reportNextDraw android.view.ViewRootImpl.performTraversals:3779 android.view.ViewRootImpl.doTraversal:2543 android.view.ViewRootImpl$TraversalRunnable.run:9471 android.view.Choreographer$CallbackRecord.run:1451 android.view.Choreographer$CallbackRecord.run:1459
D SurfaceView: UPDATE Surface(name=SurfaceView[org.qtproject.example.untitled/org.qtproject.qt5.android.bindings.QtActivity])/@0x4ba142f, mIsProjectionMode = false
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D VRI[QtActivity]: vri.Setup new sync id=56 syncSeqId=0
E SurfaceSyncer: Failed to find sync for id=0
E SurfaceSyncer: Failed to find sync for id=1
D VRI[QtActivity]: vri.reportDrawFinished syncSeqId=0 android.view.ViewRootImpl.lambda$createSyncIfNeeded$4$android-view-ViewRootImpl:3847 android.view.ViewRootImpl$$ExternalSyntheticLambda1.run:6 android.os.Handler.handleCallback:942 android.os.Handler.dispatchMessage:99 android.os.Looper.loopOnce:211
W Resources: Drawable android:drawable/screen_background_selector_light has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int).
W Resources: java.lang.RuntimeException
W Resources: at android.content.res.Resources.getDrawable(Resources.java:947)
W Resources: at org.qtproject.qt5.android.QtActivityDelegate.createSurface(QtActivityDelegate.java:1175)
W Resources: at org.qtproject.qt5.android.QtNative$20.run(QtNative.java:1196)
W Resources: at android.os.Handler.handleCallback(Handler.java:942)
W Resources: at android.os.Handler.dispatchMessage(Handler.java:99)
W Resources: at android.os.Looper.loopOnce(Looper.java:211)
W Resources: at android.os.Looper.loop(Looper.java:300)
W Resources: at android.app.ActivityThread.main(ActivityThread.java:8294)
W Resources: at java.lang.reflect.Method.invoke(Native Method)
W Resources: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
W Resources: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
D SurfaceView: UPDATE null, mIsCastMode = false
D SurfaceView: UPDATE null, mIsCastMode = false
D VRI[QtActivity]: vri.reportNextDraw android.view.ViewRootImpl.handleResized:1936 android.view.ViewRootImpl.-$$Nest$mhandleResized:0 android.view.ViewRootImpl$ViewRootHandler.handleMessageImpl:5866 android.view.ViewRootImpl$ViewRootHandler.handleMessage:5835 android.os.Handler.dispatchMessage:106
D SurfaceView: UPDATE Surface(name=SurfaceView[org.qtproject.example.untitled/org.qtproject.qt5.android.bindings.QtActivity])/@0xae274d4, mIsProjectionMode = false
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D SurfaceControl: nativeSetScreenProjection ===> setScreenProjection
D VRI[QtActivity]: vri.Setup new sync id=57 syncSeqId=0
E SurfaceSyncer: Failed to find sync for id=0
D VRI[QtActivity]: vri.reportDrawFinished syncSeqId=0 android.view.ViewRootImpl.lambda$createSyncIfNeeded$4$android-view-ViewRootImpl:3847 android.view.ViewRootImpl$$ExternalSyntheticLambda1.run:6 android.os.Handler.handleCallback:942 android.os.Handler.dispatchMessage:99 android.os.Looper.loopOnce:211
D DecorView[]: onWindowFocusChanged hasWindowFocus true
I HandWritingStubImpl: refreshLastKeyboardType: 1
I HandWritingStubImpl: getCurrentKeyboardType: 1