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 Change-Id: I02ee6b0713ec5f08ebba676c5edf94d2c1f81958 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit b01a8075193afce3934f1ec436241784d9811bce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3de01e4e64
commit
e31fef039d
@ -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…
x
Reference in New Issue
Block a user