Rename method for clarity

This commit is contained in:
tzugen 2021-05-04 16:16:05 +02:00
parent fb74d6465e
commit 80036034e4
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);