Lines Matching refs:sleepMode
106 public String sleepMode;
124 sleepMode = source.readString();
151 if (sleepMode != null) {
153 dest.writeString(sleepMode);
186 .append(",sleepMode=").append(sleepMode)
221 && Objects.equals(other.sleepMode, sleepMode)
235 return Objects.hash(allowCalls, allowMessages, allowFrom, allowEvents, sleepMode, sleepNone,
244 && isValidSleepMode(sleepMode);
247 public static boolean isValidSleepMode(String sleepMode) {
248 return sleepMode == null || sleepMode.equals(SLEEP_MODE_NIGHTS)
249 || sleepMode.equals(SLEEP_MODE_WEEKNIGHTS) || tryParseDays(sleepMode) != null;
252 public static int[] tryParseDays(String sleepMode) {
253 if (sleepMode == null) return null;
254 sleepMode = sleepMode.trim();
255 if (SLEEP_MODE_NIGHTS.equals(sleepMode)) return ALL_DAYS;
256 if (SLEEP_MODE_WEEKNIGHTS.equals(sleepMode)) return WEEKNIGHT_DAYS;
257 if (!sleepMode.startsWith(SLEEP_MODE_DAYS_PREFIX)) return null;
258 if (sleepMode.equals(SLEEP_MODE_DAYS_PREFIX)) return null;
259 final String[] tokens = sleepMode.substring(SLEEP_MODE_DAYS_PREFIX.length()).split(",");
310 rt.sleepMode = isValidSleepMode(mode)? mode : null;
352 if (sleepMode != null) {
353 out.attribute(null, SLEEP_ATT_MODE, sleepMode);
474 downtime.mode = sleepMode;