code: @Override
      public TimeZoneRule[] getTimeZoneRules() {
          initTransitionRules();
          int size = 1;
          if (historicRules != null) {
              // historicRules may contain null entries when original zoneinfo data
              // includes non transition data.
              for (int i = 0; i < historicRules.length; i++) {
                  if (historicRules[i] != null) {
                      size++;
                  }
              }
          }
          if (finalZone != null) {
              if (finalZone.useDaylightTime()) {
                  size += 2;
              } else {
                  size++;
              }
          }
  
          TimeZoneRule[] rules = new TimeZoneRule[size];
          int idx = 0;
          rules[idx++] = initialRule;
  
          if (historicRules != null) {
              for (int i = 0; i < historicRules.length; i++) {
                  if (historicRules[i] != null) {
                      rules[idx++] = historicRules[i];
                  }
              }
           }
  
          if (finalZone != null) {
              if (finalZone.useDaylightTime()) {
                  TimeZoneRule[] stzr = finalZoneWithStartYear.getTimeZoneRules();
                  // Adding only transition rules
                  rules[idx++] = stzr[1];
                  rules[idx++] = stzr[2];
              } else {
                  // Create a TimeArrayTimeZoneRule at finalMillis
                  rules[idx++] = new TimeArrayTimeZoneRule(getID() + "(STD)", finalZone.getRawOffset(), 0,
                          new long[] {(long)finalStartMillis}, DateTimeRule.UTC_TIME);
              }
          }
          return rules;
      }
docs: /* (non-Javadoc)
  @see android.icu.util.BasicTimeZone#getTimeZoneRules()