@Override public synchronized IAccountInfo loginSilent() throws ClientException {
  if (!mInitialized) {
    throw new IllegalStateException("init must be called");
  }
  mLogger.logDebug("Starting login silent");
  final AccountType accountType=getAccountTypeInPreferences();
  if (accountType != null) {
    mLogger.logDebug(String.format("Expecting %s type of account",accountType));
  }
  mLogger.logDebug("Checking MSA");
  IAccountInfo accountInfo=mMSAAuthenticator.loginSilent();
  if (accountInfo != null) {
    mLogger.logDebug("Found account info in MSA");
    setAccountTypeInPreferences(accountType);
    mAccountInfo.set(accountInfo);
    return accountInfo;
  }
  mLogger.logDebug("Checking ADAL");
  accountInfo=mADALAuthenticator.loginSilent();
  mAccountInfo.set(accountInfo);
  if (accountInfo != null) {
    mLogger.logDebug("Found account info in ADAL");
    setAccountTypeInPreferences(accountType);
  }
  return mAccountInfo.get();
}

@ Override public synchronized IAccountInfo loginSilent ( ) throws ClientException { if ( ! mInitialized ) { throw new IllegalStateException ( "init must be called" ) ; } mLogger . logDebug ( "Starting login silent" ) ; final AccountType accountType = getAccountTypeInPreferences ( ) ; if ( accountType != null ) { mLogger . logDebug ( String . format ( "Expecting %s type of account" , accountType ) ) ; } mLogger . logDebug ( "Checking MSA" ) ; IAccountInfo accountInfo = mMSAAuthenticator . loginSilent ( ) ; if ( accountInfo != null ) { mLogger . logDebug ( "Found account info in MSA" ) ; setAccountTypeInPreferences ( accountType ) ; mAccountInfo . set ( accountInfo ) ; return accountInfo ; } mLogger . logDebug ( "Checking ADAL" ) ; accountInfo = mADALAuthenticator . loginSilent ( ) ; mAccountInfo . set ( accountInfo ) ; if ( accountInfo != null ) { mLogger . logDebug ( "Found account info in ADAL" ) ; setAccountTypeInPreferences ( accountType ) ; } return mAccountInfo . get ( ) ; }
starts a silent login .
