android: Fix boot receiver settings and intent check

This commit is contained in:
Colin Edwards 2023-12-27 13:38:38 -06:00
parent 5f7f1d738d
commit 201e081750
1 changed files with 3 additions and 3 deletions

View File

@ -20,9 +20,9 @@ public class Receiver extends BroadcastReceiver {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Log.d("Receiver", "onReceive: " + intent); Log.d("Receiver", "onReceive: " + intent);
if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") { if (BOOT_ACTIONS.contains(intent.getAction())) {
if (Settings.Preferences.getBoolean(context, if (Preferences.getBoolean(context,
Settings.Preferences.KEY_RUN_ON_BOOT, Preferences.KEY_RUN_ON_BOOT,
false)) { false)) {
final boolean wakelock = final boolean wakelock =
Preferences.getBoolean(context, Preferences.getBoolean(context,