@Override
public void run(final Context context, final Callback callback) {
ConferenceDataHandler.resetDataTimestamp(context);
final Bundle bundle = new Bundle();
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
new AsyncTask<Context, Void, Void>() {
@Override
protected Void doInBackground(Context... contexts) {
Account account = AccountUtils.getActiveAccount(context);
if (account == null) {
callback.done(false, "Cannot sync if there is no active account.");
} else {
new SyncHelper(contexts[0]).performSync(new SyncResult(),
AccountUtils.getActiveAccount(context), bundle);
}
return null;
}
}.execute(context);
}
ForceSyncNowAction.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:FMTech
作者:
评论列表
文章目录