question: public void reloadSessions ( Activity fromActivity ) { ArrayList < MXSession > sessions = getMXSessions ( fromActivity ) ; for ( MXSession session : sessions ) { CommonActivityUtils . logout ( fromActivity , session , false ) ; } clearSessions ( fromActivity , false ) ; synchronized ( LOG_TAG ) { ArrayList < HomeserverConnectionConfig > configs = mLoginStorage . getCredentialsList ( ) ; for ( HomeserverConnectionConfig config : configs ) { MXSession session = createSession ( config ) ; mMXSessions . add ( session ) ; } } Intent intent = new Intent ( fromActivity , SplashActivity . class ) ; intent . setFlags ( Intent . FLAG_ACTIVITY_NEW_TASK | Intent . FLAG_ACTIVITY_CLEAR_TASK ) ; fromActivity . startActivity ( intent ) ; fromActivity . finish ( ) ; }
target:  Reload the matrix sessions. The session caches are cleared before being reloaded. Any opened activity is closed and the application switches to the splash screen.