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

Unified Diff: src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java

Issue 5153282527854592: Issue 98 - Use the libadblockplus update mechanism (Closed)
Patch Set: Created Sept. 25, 2014, 3:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java
===================================================================
--- a/src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java
+++ b/src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java
@@ -20,8 +20,6 @@
import org.adblockplus.libadblockplus.UpdateCheckDoneCallback;
import org.apache.commons.lang.StringUtils;
-import android.app.Notification;
-import android.app.NotificationManager;
import android.content.Context;
public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback
@@ -36,22 +34,7 @@
@Override
public void updateCheckDoneCallback(final String error)
{
- // TODO: Check if we need this 'manualUpdate' mechanism (initiated by 'checkForUpdates()')
- // if (!error.empty())
- // {
- // jstring jError = jniEnv->NewStringUTF(error.c_str());
- // if (mid)
- // jniEnv->CallVoidMethod(jniObject, mid, NULL, jError);
- // jniEnv->DeleteLocalRef(jError);
- // }
- // else if (manualUpdate)
- // {
- // if (mid)
- // jniEnv->CallVoidMethod(jniObject, mid, NULL, NULL);
- // }
-
- final Notification notification = Utils.createUpdateNotification(this.context, null, StringUtils.isEmpty(error) ? null : error);
- final NotificationManager notificationManager = (NotificationManager)this.context.getSystemService(Context.NOTIFICATION_SERVICE);
- notificationManager.notify(AdblockPlus.UPDATE_NOTIFICATION_ID, notification);
+ if (StringUtils.isNotEmpty(error))
Felix Dahlke 2014/09/25 16:01:12 Had to add this, so we don't always show the "no u
+ Utils.showUpdateNotification(this.context, null, error);
}
}

Powered by Google App Engine
This is Rietveld