Bug 793276 - Make sure we do not force an automatic download for Android updates r=mfinkle
authorJames Willcox <jwillcox@mozilla.com>
Mon, 01 Oct 2012 10:59:51 -0400
changeset 108869 8c035b44ef281990b89576bf1ef90425103c4489
parent 108868 42d8a883e361bb9f98638b77ce28164b307a361a
child 108870 56a268d63e01db4ed9fb94666b11b7f8fa388007
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersmfinkle
bugs793276
milestone18.0a1
Bug 793276 - Make sure we do not force an automatic download for Android updates r=mfinkle
mobile/android/base/UpdateService.java
--- a/mobile/android/base/UpdateService.java
+++ b/mobile/android/base/UpdateService.java
@@ -163,17 +163,17 @@ public class UpdateService extends Inten
             startUpdate(0);
             return;
         }
 
         AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
         if (manager == null)
             return;
 
-        PendingIntent pending = PendingIntent.getService(this, 0, new Intent(UpdateServiceHelper.ACTION_CHECK_FOR_UPDATE, null, this, UpdateService.class), 0);
+        PendingIntent pending = PendingIntent.getService(this, 0, new Intent(UpdateServiceHelper.ACTION_CHECK_FOR_UPDATE, null, this, UpdateService.class), PendingIntent.FLAG_UPDATE_CURRENT);
         manager.cancel(pending);
 
         lastAttempt.setTimeInMillis(lastAttempt.getTimeInMillis() + interval);
         Log.i(LOGTAG, "next update will be at: " + lastAttempt.getTime());
 
         manager.set(AlarmManager.RTC_WAKEUP, lastAttempt.getTimeInMillis(), pending);
     }