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: Created Sept. 25, 2014, 3:57 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 25
25 public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback 26 public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback
26 { 27 {
28 private static final String TAG = Utils.getTag(AndroidUpdateCheckDoneCallback. class);
29
27 private final Context context; 30 private final Context context;
28 31
29 public AndroidUpdateCheckDoneCallback(final Context context) 32 public AndroidUpdateCheckDoneCallback(final Context context)
30 { 33 {
31 this.context = context; 34 this.context = context;
32 } 35 }
33 36
34 @Override 37 @Override
35 public void updateCheckDoneCallback(final String error) 38 public void updateCheckDoneCallback(final String error)
36 { 39 {
37 if (StringUtils.isNotEmpty(error)) 40 if (StringUtils.isEmpty(error))
Felix Dahlke 2014/09/25 16:01:12 Had to add this, so we don't always show the "no u
38 Utils.showUpdateNotification(this.context, null, error); 41 return;
42 Log.e(TAG, "Update check failed: " + error);
43 Utils.showUpdateNotification(this.context, null, error);
39 } 44 }
40 } 45 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld