Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/org/adblockplus/android/updater/AlarmReceiver.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Left Patch Set: Fixed leftover first-batch review issues. Created April 16, 2014, 5:51 p.m.
Right Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/org/adblockplus/android/Utils.java ('k') | src/org/adblockplus/android/updater/UpdaterActivity.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 import android.util.Log; 55 import android.util.Log;
56 56
57 /** 57 /**
58 * Processes Alarm event to check for update availability. 58 * Processes Alarm event to check for update availability.
59 */ 59 */
60 public class AlarmReceiver extends BroadcastReceiver 60 public class AlarmReceiver extends BroadcastReceiver
61 { 61 {
62 private static final String TAG = Utils.getTag(AlarmReceiver.class); 62 private static final String TAG = Utils.getTag(AlarmReceiver.class);
63 private static final int NOTIFICATION_ID = R.string.app_name + 1; 63 private static final int NOTIFICATION_ID = R.string.app_name + 1;
64 64
65 @SuppressWarnings("deprecation")
66 @Override 65 @Override
67 public void onReceive(final Context context, final Intent intent) 66 public void onReceive(final Context context, final Intent intent)
68 { 67 {
69 Log.i(TAG, "Alarm; requesting updater service"); 68 Log.i(TAG, "Alarm; requesting updater service");
70 69
71 final AdblockPlus application = AdblockPlus.getApplication(); 70 final AdblockPlus application = AdblockPlus.getApplication();
72 71
73 // Indicates manual (immediate) update check which requires response to user . 72 // Indicates manual (immediate) update check which requires response to user .
74 final boolean notify = intent.getBooleanExtra("notifynoupdate", false); 73 final boolean notify = intent.getBooleanExtra("notifynoupdate", false);
75 74
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (notify) 214 if (notify)
216 { 215 {
217 notification.setLatestEventInfo(context, context.getText(R.string.app_na me), context.getString(R.string.msg_update_fail), emptyIntent); 216 notification.setLatestEventInfo(context, context.getText(R.string.app_na me), context.getString(R.string.msg_update_fail), emptyIntent);
218 notificationManager.notify(NOTIFICATION_ID, notification); 217 notificationManager.notify(NOTIFICATION_ID, notification);
219 } 218 }
220 // Schedule retry in 30 minutes - there is no connection available at this time 219 // Schedule retry in 30 minutes - there is no connection available at this time
221 application.scheduleUpdater(30); 220 application.scheduleUpdater(30);
222 } 221 }
223 } 222 }
224 } 223 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld