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

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

Issue 5153282527854592: Issue 98 - Use the libadblockplus update mechanism (Closed)
Left Patch Set: Reduce scope of UPDATE_NOTIFICATION_ID and move network error logging to AndroidUpdateCheckDoneCall… Created Sept. 26, 2014, 1:03 p.m.
Right Patch Set: Only append the revision to the version for devbuilds Created Sept. 26, 2014, 2:54 p.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
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.android; 18 package org.adblockplus.android;
19 19
20 import org.adblockplus.libadblockplus.UpdateCheckDoneCallback; 20 import org.adblockplus.libadblockplus.UpdateCheckDoneCallback;
21 import org.apache.commons.lang.StringUtils; 21 import org.apache.commons.lang.StringUtils;
22 22
23 import android.content.Context; 23 import android.content.Context;
24 import android.util.Log; 24 import android.util.Log;
25 25
26 public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback 26 public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback
27 { 27 {
28 private static final String TAG = Utils.getTag(AndroidUpdateCheckDoneCallback. class);
29
28 private final Context context; 30 private final Context context;
29 31
30 public AndroidUpdateCheckDoneCallback(final Context context) 32 public AndroidUpdateCheckDoneCallback(final Context context)
31 { 33 {
32 this.context = context; 34 this.context = context;
33 } 35 }
34 36
35 @Override 37 @Override
36 public void updateCheckDoneCallback(final String error) 38 public void updateCheckDoneCallback(final String error)
37 { 39 {
38 if (StringUtils.isEmpty(error)) 40 if (StringUtils.isEmpty(error))
39 return; 41 return;
40 Log.e(Utils.getTag(AndroidUpdateCheckDoneCallback.class), "Update check fail ed: " + error); 42 Log.e(TAG, "Update check failed: " + error);
René Jeschke 2014/09/26 13:10:52 Could you please extract the 'tag' into a private/
Felix Dahlke 2014/09/26 13:15:31 Done.
41 Utils.showUpdateNotification(this.context, null, error); 43 Utils.showUpdateNotification(this.context, null, error);
42 } 44 }
43 } 45 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld