summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-07-26 12:01:53 +0200
committercyBerta <cyberta@riseup.net>2020-07-26 12:01:53 +0200
commit1a5c9778a59a8cc5391230c273b4d8f842a46992 (patch)
treed22a1845d7170f3cca69ed03b86ec1efebacf9ba /app/src/main/java/se/leap
parent2b18c118239ba9c8caeb329ad1cafbe28632d02f (diff)
JobIntentServices leak activity context in APIs < 25, use application context instead
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java6
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java b/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
index 9a0731cd..8de90af2 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
@@ -19,14 +19,14 @@ public class ProviderAPICommand {
private Provider provider;
private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Provider provider, ResultReceiver resultReceiver) {
- this(context, action, Bundle.EMPTY, provider, resultReceiver);
+ this(context.getApplicationContext(), action, Bundle.EMPTY, provider, resultReceiver);
}
private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Provider provider) {
- this(context, action, Bundle.EMPTY, provider);
+ this(context.getApplicationContext(), action, Bundle.EMPTY, provider);
}
private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Bundle parameters, @NotNull Provider provider) {
- this(context, action, parameters, provider, null);
+ this(context.getApplicationContext(), action, parameters, provider, null);
}
private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Bundle parameters, @NotNull Provider provider, @Nullable ResultReceiver resultReceiver) {
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java
index 1f5b3741..1ee32654 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java
@@ -27,7 +27,7 @@ import static se.leap.bitmaskclient.Constants.EIP_RECEIVER;
public class EipCommand {
private static void execute(@NotNull Context context, @NotNull String action) {
- execute(context, action, null, null);
+ execute(context.getApplicationContext(), action, null, null);
}
/**