コード例 #1
0
  protected boolean loadPreferences() {
    boolean changed = false;
    if (getContactNameDisplayOrder() != mContactsPrefs.getDisplayOrder()) {
      setContactNameDisplayOrder(mContactsPrefs.getDisplayOrder());
      changed = true;
    }

    if (getSortOrder() != mContactsPrefs.getSortOrder()) {
      setSortOrder(mContactsPrefs.getSortOrder());
      changed = true;
    }

    return changed;
  }
コード例 #2
0
  @Override
  public void onStart() {
    super.onStart();

    mContactsPrefs.registerChangeListener(mPreferencesChangeListener);

    mForceLoad = loadPreferences();

    mDirectoryListStatus = STATUS_NOT_LOADED;
    mLoadPriorityDirectoriesOnly = true;

    startLoading();
  }
コード例 #3
0
 @Override
 public void onStop() {
   super.onStop();
   mContactsPrefs.unregisterChangeListener();
   mAdapter.clearPartitions();
 }