Changeset 296 for trunk/hiptop/pester/net/sabi/pester/Alarm.java
- Timestamp:
- 07/29/06 00:53:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r295 r296 31 31 // transient 32 32 private int mState; 33 private int mAbsoluteFireTime; // valid if periodic and modified since reboot 33 private int mAbsoluteFireTime; // valid if periodic or snoozed, 34 // and modified since reboot 34 35 private danger.app.Alarm mAlarm; 35 36 private int mUID; … … 155 156 if (mState != STATE_SCHEDULED) 156 157 return; 157 if ( getUsesPeriod() &&mAbsoluteFireTime != -1) {158 if (mAbsoluteFireTime != -1) { 158 159 int realSecondsLeft = mAbsoluteFireTime - Hardware.getAbsoluteTime(); 159 160 mDate = new Date(); … … 200 201 public String description() { 201 202 StringBuffer sb = new StringBuffer(); 203 if (mUID != 0) sb.append('(').append(mUID).append(") "); 202 204 switch (mState) { 203 case STATE_INVALID: sb.append("inv alid"); break;204 case STATE_EDITING: sb.append("edi ting"); break;205 case STATE_SCHEDULED: sb.append("sch eduled"); break;205 case STATE_INVALID: sb.append("inv "); break; 206 case STATE_EDITING: sb.append("edi "); break; 207 case STATE_SCHEDULED: sb.append("sch "); break; 206 208 } 207 209 switch (mType) { 210 case TYPE_PERIODIC_REPEATING: 211 sb.append("r-"); 208 212 case TYPE_PERIODIC: 209 sb.append("periodic (").append(mPeriod).append("s) "); break; 210 case TYPE_PERIODIC_REPEATING: 211 sb.append("repeating periodic (").append(mPeriod).append("s) "); 212 break; 213 sb.append("per(").append(mPeriod).append("s)"); 214 if (mState != STATE_SCHEDULED) 215 break; 213 216 case TYPE_DATE: 214 sb.append(" date (").append(getDateTimeString()).append(")"); break;215 } 216 sb.append(" alarm: ");217 sb.append("(").append(getDateTimeString()).append(")"); break; 218 } 219 sb.append(": "); 217 220 sb.append('"').append(mMessage).append('"'); 218 221 return sb.toString();
Note:
See TracChangeset
for help on using the changeset viewer.