license
Correction
On second thought, come back to Vector. The problem: before we had the potentially blocking function 'effectFinished' inside our synchronized block.
Improve EffectMessageSender: ArrayList with explicit locking in place of a Vector.
1) add missing call to BlockController.onPause() / onResume() to the Tutorial activity2) rearrange BlockController's error reporting to make the case where the MessageSender thread has died separate3) in such case, resurrect the thread4) simplify and harden the EffectMessageSender
More debugs to the EffectMessageSender.
Firebase shows that we have a problem when an app is rapidly restarted, i.e. when is it paused and resumes within tens of milliseconds. Then sometimes the EffectMessageSender thread dies.
Attempt to limit this by synchronizing the whole 'start' and 'stop' methods, although I suspect this will still happen because the very methods are probably in such case called in the wrong order.
Some more debugs for the case when the UI is blocked.
Fix for a crash when exiting an app:
Activity.onPause() -> MessageSender.stopSending sets mThis to null, then a last message gets sent and a crash in newMessage().
Fix this by
1) making the Message inner class static (so that we can create a new one without a reference to mThis)...
Simplify a bit the place where we got a crash once.
Simplify the way applications can get notifications when an effect finishes.
Now, instead of the 'DistortedEffects.(de)registerForNotifications()' 2 APIs, we call a single 'Effect.notifyWhenFinished()'.
Correct the EffectMessageSender.
Correct the Legal notice.
Rename all the classes that are not exported to application to 'Internal'
Many things.
1) make the Dynamic.setDuration() able to be called AFTER the Dynamic has already been run. (and rename it to 'makeRunNowFor()' )2) remove the automatic removal of zero Effects from EffectQueues.3) adjust several Apps to cope with 2)4) add post-rotation to Rubik (still not finished)
Move EffectMessageSender to the 'message' package (duh!)
Javadoc.
Progress with support for Effect classes.
Some progress with Effect classes.
Big mess - nothing compiles now; classes moved around.
Fix Lint warnings, correct a lot of comments, adjust EffectListener interface.
Cleanup, consistent variable names, minor details.
Major: the MessageSender thread used to be running all the time in a tight loop!!
Major push towards simplifying DistortedObject's public API.All MATRIX effects are using the new API - the 'DataND' marker interfaces.
1. new package 'message'2. Rename the 'Grid' classes to match