Index: src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java |
=================================================================== |
--- a/src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java |
+++ b/src/org/adblockplus/android/AndroidUpdateCheckDoneCallback.java |
@@ -20,9 +20,8 @@ |
import org.adblockplus.libadblockplus.UpdateCheckDoneCallback; |
import org.apache.commons.lang.StringUtils; |
-import android.app.Notification; |
-import android.app.NotificationManager; |
import android.content.Context; |
+import android.util.Log; |
public class AndroidUpdateCheckDoneCallback extends UpdateCheckDoneCallback |
{ |
@@ -36,22 +35,9 @@ |
@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.isEmpty(error)) |
+ return; |
+ Log.e(Utils.getTag(AndroidUpdateCheckDoneCallback.class), "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.
|
+ Utils.showUpdateNotification(this.context, null, error); |
} |
} |