commit 96e1f0ad90cc5fdbc4906d652f19fb09e6043721
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri May 14 00:51:42 2021 +0200

    Make Dynamic's resetToBegin() done on the next frame.
    This is necessary if we want to reset many Dynamics at one go and have all of them start synchronized.
    Otherwise it can happen that when we reset, we do it when some objects which the Dynamics belong to are already rendered and others are not, and then some of the Dynamics will be delayed by one frame which is visible already.

diff --git a/src/main/java/org/distorted/screens/RubikScreenBase.java b/src/main/java/org/distorted/screens/RubikScreenBase.java
index d8d6bf3c..50165168 100644
--- a/src/main/java/org/distorted/screens/RubikScreenBase.java
+++ b/src/main/java/org/distorted/screens/RubikScreenBase.java
@@ -176,9 +176,16 @@ abstract class RubikScreenBase extends RubikScreenAbstract implements RubikPreRe
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void setLockState(RubikActivity act)
+  public void setLockState(final RubikActivity act)
     {
-    mLockButton.setImageResource(getLockIcon(act));
+    act.runOnUiThread(new Runnable()
+      {
+      @Override
+      public void run()
+        {
+        mLockButton.setImageResource(getLockIcon(act));
+        }
+      });
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
