1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 03:32:16 -05:00

. Externalized notification ids

This commit is contained in:
Bao-Long Nguyen-Trong 2008-12-19 19:59:49 +00:00
parent b3a4b758dc
commit b76c0aba0b
3 changed files with 4 additions and 2 deletions

View File

@ -120,6 +120,8 @@ public class Email extends Application {
*/
public static final int NOTIFICATION_LED_OFF_TIME = 2000;
public static final int NEW_EMAIL_NOTIFICATION_ID = 1;
/**
* Called throughout the application when the number of accounts has changed. This method
* enables or disables the Compose activity, the boot receiver and the service based on

View File

@ -399,7 +399,7 @@ public class FolderMessageList extends ExpandableListActivity {
NotificationManager notifMgr = (NotificationManager)
getSystemService(Context.NOTIFICATION_SERVICE);
notifMgr.cancel(1);
notifMgr.cancel(Email.NEW_EMAIL_NOTIFICATION_ID);
MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener);
mAccount.refresh(Preferences.getPreferences(this));

View File

@ -211,7 +211,7 @@ public class MailService extends Service {
notif.ledOnMS = Email.NOTIFICATION_LED_ON_TIME;
notif.ledOffMS = Email.NOTIFICATION_LED_OFF_TIME;
notifMgr.notify(1, notif);
notifMgr.notify(Email.NEW_EMAIL_NOTIFICATION_ID, notif);
}
reschedule();