Home | History | Annotate | Download | only in data

Lines Matching refs:id

40     /** Key to a preference that stores the id to assign to the next timer. */
77 // Build a timer using the data associated with each timer id.
79 final int id = Integer.parseInt(timerId);
80 final int stateValue = prefs.getInt(STATE + id, RESET.getValue());
86 final long length = prefs.getLong(LENGTH + id, Long.MIN_VALUE);
87 final long totalLength = prefs.getLong(TOTAL_LENGTH + id, Long.MIN_VALUE);
88 final long lastStartTime = prefs.getLong(LAST_START_TIME + id, Timer.UNUSED);
89 final long lastWallClockTime = prefs.getLong(LAST_WALL_CLOCK_TIME + id,
91 final long remainingTime = prefs.getLong(REMAINING_TIME + id, totalLength);
92 final String label = prefs.getString(LABEL + id, null);
93 final boolean deleteAfterUse = prefs.getBoolean(DELETE_AFTER_USE + id, false);
94 timers.add(new Timer(id, state, length, totalLength, lastStartTime,
108 // Fetch the next timer id.
109 final int id = prefs.getInt(NEXT_TIMER_ID, 0);
110 editor.putInt(NEXT_TIMER_ID, id + 1);
112 // Add the new timer id to the set of all timer ids.
114 timerIds.add(String.valueOf(id));
118 editor.putInt(STATE + id, timer.getState().getValue());
119 editor.putLong(LENGTH + id, timer.getLength());
120 editor.putLong(TOTAL_LENGTH + id, timer.getTotalLength());
121 editor.putLong(LAST_START_TIME + id, timer.getLastStartTime());
122 editor.putLong(LAST_WALL_CLOCK_TIME + id, timer.getLastWallClockTime());
123 editor.putLong(REMAINING_TIME + id, timer.getRemainingTime());
124 editor.putString(LABEL + id, timer.getLabel());
125 editor.putBoolean(DELETE_AFTER_USE + id, timer.getDeleteAfterUse());
129 // Return a new timer with the generated timer id present.
130 return new Timer(id, timer.getState(), timer.getLength(), timer.getTotalLength(),
142 final int id = timer.getId();
143 editor.putInt(STATE + id, timer.getState().getValue());
144 editor.putLong(LENGTH + id, timer.getLength());
145 editor.putLong(TOTAL_LENGTH + id, timer.getTotalLength());
146 editor.putLong(LAST_START_TIME + id, timer.getLastStartTime());
147 editor.putLong(LAST_WALL_CLOCK_TIME + id, timer.getLastWallClockTime());
148 editor.putLong(REMAINING_TIME + id, timer.getRemainingTime());
149 editor.putString(LABEL + id, timer.getLabel());
150 editor.putBoolean(DELETE_AFTER_USE + id, timer.getDeleteAfterUse());
161 final int id = timer.getId();
163 // Remove the timer id from the set of all timer ids.
165 timerIds.remove(String.valueOf(id));
174 editor.remove(STATE + id);
175 editor.remove(LENGTH + id);
176 editor.remove(TOTAL_LENGTH + id);
177 editor.remove(LAST_START_TIME + id);
178 editor.remove(LAST_WALL_CLOCK_TIME + id);
179 editor.remove(REMAINING_TIME + id);
180 editor.remove(LABEL + id);
181 editor.remove(DELETE_AFTER_USE + id);