restoreSession

Rebuilds a session from the locally persisted token, or null if storage holds nothing usable.

A restored token is a credential worth trying, not proof of validity — validity is discovered through the first authenticated Portal call, which invalidates the credential on a 401.

A session that cannot be recovered reads as null, not as a failure. Ciphertext whose Keystore key is gone — what an Android Auto Backup or device-to-device restore leaves behind — and contents that cannot be parsed are both cleared here and reported as "signed out": no caller action makes them readable, so failing the launch would only strand the app until it called clearPersistedSession itself. Treat null as "show the sign-in screen".

Throws

when the session could not be read this time — device storage or the Keystore itself failing, either of which may pass on the next attempt — or when an unusable session is found but cannot be cleared. Deliberately distinct from the null that means "not signed in", and never raised for a failure the SDK is willing to treat as permanent.