From 80036034e45ac832f4347b6dfa35932144afdeef Mon Sep 17 00:00:00 2001 From: tzugen Date: Tue, 4 May 2021 16:16:05 +0200 Subject: [PATCH] Rename method for clarity --- .../moire/ultrasonic/receiver/MediaButtonIntentReceiver.java | 2 +- ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/receiver/MediaButtonIntentReceiver.java b/ultrasonic/src/main/java/org/moire/ultrasonic/receiver/MediaButtonIntentReceiver.java index 836eb5e7..9d201b52 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/receiver/MediaButtonIntentReceiver.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/receiver/MediaButtonIntentReceiver.java @@ -46,7 +46,7 @@ public class MediaButtonIntentReceiver extends BroadcastReceiver String intentAction = intent.getAction(); // If media button are turned off and we received a media button, exit - if (!Util.getMediaButtonsPreference(context) && + if (!Util.getMediaButtonsEnabled(context) && Intent.ACTION_MEDIA_BUTTON.equals(intentAction)) return; // Only process media buttons and CMD_PROCESS_KEYCODE, which is received from the widgets diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java b/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java index cb2ddd89..f576d425 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/util/Util.java @@ -679,7 +679,7 @@ public class Util public static void registerMediaButtonEventReceiver(Context context, boolean isService) { - if (getMediaButtonsPreference(context)) + if (getMediaButtonsEnabled(context)) { if (isService) mediaButtonsRegisteredForService = true; else mediaButtonsRegisteredForUI = true; @@ -1064,7 +1064,7 @@ public class Util return Integer.parseInt(preferences.getString(Constants.PREFERENCES_KEY_INCREMENT_TIME, "5")); } - public static boolean getMediaButtonsPreference(Context context) + public static boolean getMediaButtonsEnabled(Context context) { SharedPreferences preferences = getPreferences(context); return preferences.getBoolean(Constants.PREFERENCES_KEY_MEDIA_BUTTONS, true);