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

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

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Left Patch Set: Adressed first batch of review issues. Created April 16, 2014, 5:36 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
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.UpdaterCallback; 20 import org.adblockplus.libadblockplus.UpdaterCallback;
21 21 import org.apache.commons.lang.StringUtils;
22 import com.github.rjeschke.neetutils.Strings;
23 22
24 import android.app.Notification; 23 import android.app.Notification;
25 import android.app.NotificationManager; 24 import android.app.NotificationManager;
26 import android.content.Context; 25 import android.content.Context;
27 26
28 public class AndroidUpdaterCallback extends UpdaterCallback 27 public class AndroidUpdaterCallback extends UpdaterCallback
29 { 28 {
30 private final Context context; 29 private final Context context;
31 30
32 public AndroidUpdaterCallback(final Context context) 31 public AndroidUpdaterCallback(final Context context)
(...skipping 11 matching lines...) Expand all
44 // if (mid) 43 // if (mid)
45 // jniEnv->CallVoidMethod(jniObject, mid, NULL, jError); 44 // jniEnv->CallVoidMethod(jniObject, mid, NULL, jError);
46 // jniEnv->DeleteLocalRef(jError); 45 // jniEnv->DeleteLocalRef(jError);
47 // } 46 // }
48 // else if (manualUpdate) 47 // else if (manualUpdate)
49 // { 48 // {
50 // if (mid) 49 // if (mid)
51 // jniEnv->CallVoidMethod(jniObject, mid, NULL, NULL); 50 // jniEnv->CallVoidMethod(jniObject, mid, NULL, NULL);
52 // } 51 // }
53 52
54 final Notification notification = Utils.createUpdateNotification(this.contex t, null, Strings.isEmpty(error) ? null : error); 53 final Notification notification = Utils.createUpdateNotification(this.contex t, null, StringUtils.isEmpty(error) ? null : error);
55 final NotificationManager notificationManager = (NotificationManager)this.co ntext.getSystemService(Context.NOTIFICATION_SERVICE); 54 final NotificationManager notificationManager = (NotificationManager)this.co ntext.getSystemService(Context.NOTIFICATION_SERVICE);
56 notificationManager.notify(AdblockPlus.UPDATE_NOTIFICATION_ID, notification) ; 55 notificationManager.notify(AdblockPlus.UPDATE_NOTIFICATION_ID, notification) ;
57 } 56 }
58 } 57 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld