onSurfaceDestroyed

open override fun onSurfaceDestroyed(container: SurfaceContainer)

Releases the pipeline built on the surface the host is destroying, then the surface itself, and tells the phone app (PhoneAppCallback.onAAReleasing()), which can show the map on the phone again.

The loading state is kept

The host destroys the surface whenever the template on top has no map area (a ListTemplate, a SearchTemplate, a MessageTemplate), which does not end the session. The loading state is left as it is: it tells the root screen which template to return, and a released surface does not change that.

The loading state goes back to AndroidAutoLoadingState.IDLE when the session ends.

Called by the host on the main thread.