Android: run runAction() actions in onPause state
Fixes QTBUG-113255 by running graphics related actions also onPaused state when the paused app is visible. Also corrects possible other problems where UI should be updated while app is onPaused state. Fixes: QTBUG-113255 Pick-to: 6.7 Change-Id: I02ee6b0713ec5f08ebba676c5edf94d2c1f81958 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>bb10
parent
4ff65f0e56
commit
b01a807519
|
|
@ -272,8 +272,10 @@ class QtNative
|
|||
synchronized (m_mainActivityMutex) {
|
||||
final Looper mainLooper = Looper.getMainLooper();
|
||||
final Handler handler = new Handler(mainLooper);
|
||||
final boolean isStateActive = m_stateDetails.state == ApplicationState.ApplicationActive;
|
||||
final boolean active = (isActivityValid() && isStateActive) || isServiceValid();
|
||||
final boolean isStateVisible =
|
||||
(m_stateDetails.state != ApplicationState.ApplicationSuspended)
|
||||
&& (m_stateDetails.state != ApplicationState.ApplicationHidden);
|
||||
final boolean active = (isActivityValid() && isStateVisible) || isServiceValid();
|
||||
if (!active || !handler.post(action))
|
||||
m_lostActions.add(action);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue