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:
parent
b3a4b758dc
commit
b76c0aba0b
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user