Source:
public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId) throws AuthenticationException, InterruptedException { final AtomicReference<AuthenticationResult> authenticationResult = new AtomicReference<>(); final AtomicReference<Exception> exception = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); if (StringExtensions.isNullOrBlank(resource)) { throw new IllegalArgumentException("The required resource is null or blank."); } if (StringExtensions.isNullOrBlank(clientId)) { throw new IllegalArgumentException("The required clientId is null or blank"); } final AuthenticationRequest request = new AuthenticationRequest(mAuthority, resource, clientId, userId, getRequestCorrelationId(), getExtendedLifetimeEnabled()); request.setSilent(true); request.setPrompt(PromptBehavior.Auto); request.setUserIdentifierType(UserIdentifierType.UniqueId); final Looper currentLooper = Looper.myLooper(); if (currentLooper != null && currentLooper == mContext.getMainLooper()) { Log.e(TAG, "Sync network calls must not be invoked in main thread. " + "This method will throw android.os.NetworkOnMainThreadException in next major release", new NetworkOnMainThreadException()); } createAcquireTokenRequest().acquireToken(null, false, request, new AuthenticationCallback<AuthenticationResult>() { @Override public void onSuccess(AuthenticationResult result) { authenticationResult.set(result); latch.countDown(); } @Override public void onError(Exception exc) { exception.set(exc); latch.countDown(); } }); latch.await(); Exception e = exception.get(); if (e != null) { if (e instanceof AuthenticationException) { throw (AuthenticationException) e; } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } if (e.getCause() != null) { if (e.getCause() instanceof AuthenticationException) { throw (AuthenticationException) e.getCause(); } else if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } else { throw new AuthenticationException(ADALError.ERROR_SILENT_REQUEST, e.getCause() .getMessage(), e.getCause()); } } throw new AuthenticationException(ADALError.ERROR_SILENT_REQUEST, e.getMessage(), e); } return authenticationResult.get(); }

Target:
public AuthenticationResult acquireTokenSilentSync(String resource, String clientId, String userId) throws AuthenticationException, InterruptedException { final AtomicReference<AuthenticationResult> authenticationResult = new AtomicReference<>(); final AtomicReference<Exception> exception = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); if (StringExtensions.isNullOrBlank(resource)) { throw new IllegalArgumentException("The required resource is null or blank."); } if (StringExtensions.isNullOrBlank(clientId)) { throw new IllegalArgumentException("The required clientId is null or blank."); } final AuthenticationRequest request = new AuthenticationRequest(mAuthority, resource, clientId, userId, getRequestCorrelationId(), getExtendedLifetimeEnabled()); request.setSilent(true); request.setPrompt(PromptBehavior.Auto); request.setUserIdentifierType(UserIdentifierType.UniqueId); final Looper currentLooper = Looper.myLooper(); if (currentLooper != null && currentLooper == mContext.getMainLooper()) { Log.e(TAG, "Sync network calls must not be invoked in main thread. " + "This method will throw android.os.NetworkOnMainThreadException in next major release", new NetworkOnMainThreadException()); } createAcquireTokenRequest().acquireToken(null, false, request, new AuthenticationCallback<AuthenticationResult>() { @Override public void onSuccess(AuthenticationResult result) { authenticationResult.set(result); latch.countDown(); } @Override public void onError(Exception exc) { exception.set(exc); latch.countDown(); } }); latch.await(); Exception e = exception.get(); if (e != null) { if (e instanceof AuthenticationException) { throw (AuthenticationException) e; } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } if (e.getCause() != null) { if (e.getCause() instanceof AuthenticationException) { throw (AuthenticationException) e.getCause(); } else if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } else { throw new AuthenticationException(ADALError.ERROR_SILENT_REQUEST, e.getCause() .getMessage(), e.getCause()); } } throw new AuthenticationException(ADALError.ERROR_SILENT_REQUEST, e.getMessage(), e); } return authenticationResult.get(); }