Fix error when an uninstalled app is not shown on screen.
Add experimental onRecentlyClosed handler.