This commit is contained in:
Max Kellermann 2023-12-28 21:02:49 +01:00
commit 09a0f7a45c
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ android {
targetCompatibility = JavaVersion.VERSION_1_9 targetCompatibility = JavaVersion.VERSION_1_9
} }
kotlinOptions { kotlinOptions {
jvmTarget = "1.9" jvmTarget = "9"
} }
packaging { packaging {
resources { resources {

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,