summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-09-08 20:20:03 +0200
committercyBerta <cyberta@riseup.net>2018-09-08 20:20:03 +0200
commit0777285885147b1af87286a9516c937f0e7b8d65 (patch)
tree07268f7788b9f099f7fe9d0f1464cee62fbbe9c0
parent80b04ba633303d33207ca9438ee6933915036e84 (diff)
avoid potential memory leak in onboot receiver
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java b/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
index 95828e46..f33bc27e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
@@ -36,14 +36,14 @@ public class OnBootReceiver extends BroadcastReceiver {
}
if (startOnBoot) {
Log.d("OpenVpn", "start StartActivity!");
- Intent startActivityIntent = new Intent(context, StartActivity.class);
+ Intent startActivityIntent = new Intent(context.getApplicationContext(), StartActivity.class);
startActivityIntent.putExtra(EIP_RESTART_ON_BOOT, true);
startActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(startActivityIntent);
}
} else {
if (isAlwaysOnConfigured) {
- Intent dashboardIntent = new Intent(context, StartActivity.class);
+ Intent dashboardIntent = new Intent(context.getApplicationContext(), StartActivity.class);
dashboardIntent.putExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE, true);
dashboardIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(dashboardIntent);