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

. Fixed background sync broken by package name change

This commit is contained in:
Bao-Long Nguyen-Trong 2008-12-19 22:27:37 +00:00
parent 34bbdc9c50
commit b9dec4064e

View File

@ -91,7 +91,7 @@ public class MailService extends Service {
private void cancel() {
AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent();
i.setClassName("com.android.email", "com.android.email.service.MailService");
i.setClassName(getApplication().getPackageName(), "com.android.email.service.MailService");
i.setAction(ACTION_CHECK_MAIL);
PendingIntent pi = PendingIntent.getService(this, 0, i, 0);
alarmMgr.cancel(pi);
@ -100,7 +100,7 @@ public class MailService extends Service {
private void reschedule() {
AlarmManager alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent();
i.setClassName("com.android.email", "com.android.email.service.MailService");
i.setClassName(getApplication().getPackageName(), "com.android.email.service.MailService");
i.setAction(ACTION_CHECK_MAIL);
PendingIntent pi = PendingIntent.getService(this, 0, i, 0);