code: private boolean isTypedTimeFullyLegal() {
          if (mIs24HourMode) {
              // For 24-hour mode, the time is legal if the hours and minutes are each legal. Note:
              // getEnteredTime() will ONLY call isTypedTimeFullyLegal() when NOT in 24hour mode.
              int[] values = getEnteredTime(null);
              return (values[0] >= 0 && values[1] >= 0 && values[1] < 60);
          } else {
              // For AM/PM mode, the time is legal if it contains an AM or PM, as those can only be
              // legally added at specific times based on the tree's algorithm.
              return (mTypedTimes.contains(getAmOrPmKeyCode(AM)) ||
                      mTypedTimes.contains(getAmOrPmKeyCode(PM)));
          }
      }
docs: Check if the time that has been typed so far is completely legal, as is.