Skip to content

Commit

Permalink
OnBootReceiver: use Application Context for Intent creation as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bk138 committed Sep 27, 2024
1 parent 7ed0b21 commit 168048b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onReceive(Context context, Intent arg1) {
return;
}

Intent intent = new Intent(context, MainService.class);
Intent intent = new Intent(context.getApplicationContext(), MainService.class);
intent.setAction(MainService.ACTION_START);
intent.putExtra(MainService.EXTRA_PORT, prefs.getInt(Constants.PREFS_KEY_SETTINGS_PORT, defaults.getPort()));
intent.putExtra(MainService.EXTRA_PASSWORD, prefs.getString(Constants.PREFS_KEY_SETTINGS_PASSWORD, defaults.getPassword()));
Expand Down

0 comments on commit 168048b

Please sign in to comment.