android-components / mozilla.components.browser.session / SessionManager / restore
restore
fun restore(snapshot: Snapshot): Unit
(source)
Restores sessions from the provided Snapshot.
Notification behaviour is as follows:
- onSessionAdded notifications will not fire,
- onSessionSelected notification will fire exactly once if the snapshot isn't empty,
- once snapshot has been restored, and appropriate session has been selected, onSessionsRestored
notification will fire.
Parameters
snapshot
- A Snapshot which may be produced by createSnapshot.
Exceptions
IllegalArgumentException
- if an empty snapshot is passed in.