void onAccessPointsUpdated(PreferenceScreen preferenceScreen,Collection<AccessPoint> accessPoints){
  if (mProgressBar.isIndeterminate() && accessPoints.size() > 0) {
    showDisconnectedProgressBar();
    if (mScreenState == SCREEN_STATE_DISCONNECTED) {
      mWifiSettingsFragmentLayout.setVisibility(View.VISIBLE);
      mBottomPadding.setVisibility(View.GONE);
    }
    mAddNetworkButton.setEnabled(true);
    mRefreshButton.setEnabled(true);
  }
  for (  AccessPoint accessPoint : accessPoints) {
    accessPoint.setLayoutResource(R.layout.custom_preference);
    preferenceScreen.addPreference(accessPoint);
  }
}

void onAccessPointsUpdated ( PreferenceScreen preferenceScreen , Collection < AccessPoint > accessPoints ) { if ( mProgressBar . isIndeterminate ( ) && accessPoints . size ( ) > 0 ) { showDisconnectedProgressBar ( ) ; if ( mScreenState == SCREEN_STATE_DISCONNECTED ) { mWifiSettingsFragmentLayout . setVisibility ( View . VISIBLE ) ; mBottomPadding . setVisibility ( View . GONE ) ; } mAddNetworkButton . setEnabled ( true ) ; mRefreshButton . setEnabled ( true ) ; } for ( AccessPoint accessPoint : accessPoints ) { accessPoint . setLayoutResource ( R . layout . custom_preference ) ; preferenceScreen . addPreference ( accessPoint ) ; } }
called when the list of accesspoints are modified and this activity needs to refresh the list .
