question: private void updateDataTypeState ( ) { boolean isSyncEnabled = mSyncSwitchPreference . isChecked ( ) ; boolean syncEverything = mSyncEverything . isChecked ( ) ; boolean passwordSyncConfigurable = mProfileSyncService . isSyncInitialized ( ) && mProfileSyncService . isCryptographerReady ( ) ; for ( CheckBoxPreference pref : mAllTypes ) { boolean canSyncType = pref != mSyncPasswords || passwordSyncConfigurable ; if ( ! isSyncEnabled ) { pref . setChecked ( true ) ; } else if ( syncEverything ) { pref . setChecked ( canSyncType ) ; } pref . setEnabled ( isSyncEnabled && ! syncEverything && canSyncType ) ; } if ( isSyncEnabled && ! syncEverything ) { Set < Integer > syncTypes = mProfileSyncService . getPreferredDataTypes ( ) ; mSyncAutofill . setChecked ( syncTypes . contains ( ModelType . AUTOFILL ) ) ; mSyncBookmarks . setChecked ( syncTypes . contains ( ModelType . BOOKMARKS ) ) ; mSyncOmnibox . setChecked ( syncTypes . contains ( ModelType . TYPED_URLS ) ) ; mSyncPasswords . setChecked ( passwordSyncConfigurable && syncTypes . contains ( ModelType . PASSWORDS ) ) ; mSyncRecentTabs . setChecked ( syncTypes . contains ( ModelType . PROXY_TABS ) ) ; mSyncSettings . setChecked ( syncTypes . contains ( ModelType . PRIORITY_PREFERENCES ) ) ; } }
target:  Update the data type switch state. If sync is on, load the prefs from native. Otherwise, all data types are disabled and checked. Note that the Password data type will be shown as disabled and unchecked between sync being turned on and the backend initialization completing.