public void onDependencyChanged(Preference dependency,boolean disableDependent){
  if (mDependencyMet == disableDependent) {
    mDependencyMet=!disableDependent;
    notifyDependencyChange(shouldDisableDependents());
    notifyChanged();
  }
}

public void onDependencyChanged ( Preference dependency , boolean disableDependent ) { if ( mDependencyMet == disableDependent ) { mDependencyMet = ! disableDependent ; notifyDependencyChange ( shouldDisableDependents ( ) ) ; notifyChanged ( ) ; } }
called when the dependency changes .
