Verified Commit 07772858 authored by cyberta's avatar cyberta

avoid potential memory leak in onboot receiver

parent 80b04ba6
Pipeline #18824 passed with stages
in 18 minutes and 36 seconds
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment