本文整理汇总了Java中android.content.ContentResolver.SYNC_OBSERVER_TYPE_PENDING属性的典型用法代码示例。如果您正苦于以下问题:Java ContentResolver.SYNC_OBSERVER_TYPE_PENDING属性的具体用法?Java ContentResolver.SYNC_OBSERVER_TYPE_PENDING怎么用?Java ContentResolver.SYNC_OBSERVER_TYPE_PENDING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.content.ContentResolver
的用法示例。
在下文中一共展示了ContentResolver.SYNC_OBSERVER_TYPE_PENDING属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
@Override
protected void onResume() {
super.onResume();
// Perform one-time bootstrap setup, if needed
DataBootstrapService.startDataBootstrapIfNecessary(this);
// Check to ensure a Google Account is active for the app. Placing the check here ensures
// it is run again in the case where a Google Account wasn't present on the device and a
// picker had to be started.
if (!AccountUtils.enforceActiveGoogleAccount(this, SELECT_GOOGLE_ACCOUNT_RESULT)) {
LOGD(TAG, "EnforceActiveGoogleAccount returned false");
return;
}
// Watch for sync state changes
mSyncStatusObserver.onStatusChanged(0);
final int mask = ContentResolver.SYNC_OBSERVER_TYPE_PENDING |
ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE;
mSyncObserverHandle = ContentResolver.addStatusChangeListener(mask, mSyncStatusObserver);
startLoginProcess();
}