sugar3.activity.Activity.get_active and set_active are methods of the Activity class that expose the property active. See source code.
Sometimes an activity is told it is active even though it is not visible. Especially if the activity is hidden by the home view, friends view, or neighbourhood view.
Reproducer:
- start the Clock activity,
- select the ticking clock mode (symbol of a drum),
- switch to journal using f5, the ticking stops,
- switch to home view using f3, the ticking remains stopped,
- switch to the activity using alt-tab, the ticking resumes,
- switch to home view using f3, the ticking continues; it should stop.