code: public boolean setVetoPolicy(TimeVetoPolicy vetoPolicy) {
          if (parent == null) {
              throw new RuntimeException("TimePickerSettings.setVetoPolicy(), "
                      + "A veto policy can only be set after constructing the TimePicker.");
          }
          this.vetoPolicy = vetoPolicy;
          return isTimeAllowed(parent.getTime());
      }
docs: setVetoPolicy,
  
  This sets a veto policy for the time picker. Note: This function can only be called after the
  time picker is constructed. If this is called before the TimePicker is constructed, then an
  exception will be thrown.
  
  When a veto policy is supplied, it will be used to determine which times can or can not be
  selected in the calendar panel. (Vetoed times are also not accepted into the time picker text
  field). See the demo class for an example of constructing a veto policy.
  
  By default, there is no veto policy on a time picker. Setting this function to null will
  clear any veto policy that has been set.
  
  It's possible to set a veto policy that vetoes the current "last valid time". This function
  returns true if the last valid time is allowed by the new veto policy and the time picker
  settings, or false if the last valid time is vetoed or disallowed. Setting a new veto policy
  does not modify the last valid time. Is up to the programmer to resolve any potential
  conflict between a new veto policy, and the last valid time stored in the time picker.