| 148 | } |
| 149 | |
| 150 | void ActivityManager::exitActivity(const RenderLock& lock) { |
| 151 | // Note: lock must be held by the caller |
| 152 | if (currentActivity) { |
| 153 | currentActivity->onExit(); |
| 154 | currentActivity.reset(); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void ActivityManager::replaceActivity(std::unique_ptr<Activity>&& newActivity) { |
| 159 | // Note: no lock here, this is usually called by loop() and we may run into deadlock |