summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAndrew Gaul <andrew@gaul.org>2018-01-20 18:27:44 -0800
committerAndrew Gaul <andrew@gaul.org>2018-01-20 18:28:21 -0800
commit404f241891891b71adcf2364446302886b5d3252 (patch)
treedbbdac37d6806207d047e5a3c7972ec5064a4c9c /core
parentb98571ede8f123f8df740e08e0e94da6e4370f51 (diff)
downloadAntennaPod-404f241891891b71adcf2364446302886b5d3252.zip
Make some static fields final
Adding final prohibits modification and allows initialization of primitive and String fields at compile time instead of runtime in clinit: https://developer.android.com/training/articles/perf-tips.html#UseFinal Found via error-prone.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/export/html/HtmlSymbols.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java2
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java6
3 files changed, 5 insertions, 5 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/html/HtmlSymbols.java b/core/src/main/java/de/danoeh/antennapod/core/export/html/HtmlSymbols.java
index b8807a686..1ca126469 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/export/html/HtmlSymbols.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/export/html/HtmlSymbols.java
@@ -22,7 +22,7 @@ class HtmlSymbols extends CommonSymbols {
static final String ORDERED_LIST = "ol";
static final String LIST_ITEM = "li";
- static String HEADING = "h1";
+ static final String HEADING = "h1";
static final String LINK = "a";
static final String LINK_DESTINATION = "href";
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
index 20a349055..65298ff8d 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
@@ -124,7 +124,7 @@ public class UserPreferences {
private static final int NOTIFICATION_BUTTON_REWIND = 0;
private static final int NOTIFICATION_BUTTON_FAST_FORWARD = 1;
private static final int NOTIFICATION_BUTTON_SKIP = 2;
- private static int EPISODE_CACHE_SIZE_UNLIMITED = -1;
+ private static final int EPISODE_CACHE_SIZE_UNLIMITED = -1;
public static final int FEED_ORDER_COUNTER = 0;
public static final int FEED_ORDER_ALPHABETICAL = 1;
public static final int FEED_ORDER_LAST_UPDATE = 2;
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
index f3cc8f86a..9e62f40e8 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
@@ -127,8 +127,8 @@ public class DownloadService extends Service {
private NotificationCompat.Builder notificationCompatBuilder;
- private int NOTIFICATION_ID = 2;
- private int REPORT_ID = 3;
+ private static final int NOTIFICATION_ID = 2;
+ private static final int REPORT_ID = 3;
/**
* Currently running downloads.
@@ -611,7 +611,7 @@ public class DownloadService extends Service {
private volatile boolean isActive = true;
private volatile boolean isCollectingRequests = false;
- private final long WAIT_TIMEOUT = 3000;
+ private static final long WAIT_TIMEOUT = 3000;
/**