From 0777285885147b1af87286a9516c937f0e7b8d65 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 8 Sep 2018 20:20:03 +0200 Subject: avoid potential memory leak in onboot receiver --- app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') 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); -- cgit v1.2.3