日期:2014-05-20 浏览次数:20713 次
public void refreshAccessToken(boolean force) throws vDiskException
{
synchronized (UiApplication.getEventLock())
{
if (force) // || !isAccessTokenValid()) {
{
setAccessToken(null);
if (Application.isEventDispatchThread())
{
UiApplication.getUiApplication().pushModalScreen(new LoginScreen());
} else {
UiApplication.getApplication().invokeLater(new Runnable() {
public void run() {
UiApplication.getUiApplication().pushModalScreen(new LoginScreen());
}
});
}
if (!hasAccessToken()) {
throw new vDiskException("Unable to refresh the Access Token");
}
}
}
}