LEFT | RIGHT |
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 |
(...skipping 14 matching lines...) Expand all Loading... |
25 import android.app.Notification; | 25 import android.app.Notification; |
26 import android.app.PendingIntent; | 26 import android.app.PendingIntent; |
27 import android.content.Context; | 27 import android.content.Context; |
28 import android.content.Intent; | 28 import android.content.Intent; |
29 import android.support.v4.app.NotificationCompat; | 29 import android.support.v4.app.NotificationCompat; |
30 | 30 |
31 public final class Utils | 31 public final class Utils |
32 { | 32 { |
33 private Utils() | 33 private Utils() |
34 { | 34 { |
35 // Prevents instantiation as this class' only purpose is providing static ut
ility methods. | 35 // |
36 } | 36 } |
37 | 37 |
38 public static String getTag(final Class<?> clazz) | 38 public static String getTag(final Class<?> clazz) |
39 { | 39 { |
40 return clazz.getSimpleName(); | 40 return clazz.getSimpleName(); |
41 } | 41 } |
42 | 42 |
43 public static String capitalizeString(final String s) | 43 public static String capitalizeString(final String s) |
44 { | 44 { |
45 if (s == null || s.length() == 0) | 45 if (s == null || s.length() == 0) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 time = lastDownload; | 111 time = lastDownload; |
112 status = "synchronize_last_at"; | 112 status = "synchronize_last_at"; |
113 } | 113 } |
114 | 114 |
115 context.sendBroadcast(new Intent(AdblockPlus.BROADCAST_SUBSCRIPTION_STATUS) | 115 context.sendBroadcast(new Intent(AdblockPlus.BROADCAST_SUBSCRIPTION_STATUS) |
116 .putExtra("url", sub.getProperty("url").toString()) | 116 .putExtra("url", sub.getProperty("url").toString()) |
117 .putExtra("status", status) | 117 .putExtra("status", status) |
118 .putExtra("time", time * 1000L)); | 118 .putExtra("time", time * 1000L)); |
119 } | 119 } |
120 } | 120 } |
LEFT | RIGHT |