Rename method for clarity
This commit is contained in:
parent
fb74d6465e
commit
80036034e4
|
@ -46,7 +46,7 @@ public class MediaButtonIntentReceiver extends BroadcastReceiver
|
||||||
String intentAction = intent.getAction();
|
String intentAction = intent.getAction();
|
||||||
|
|
||||||
// If media button are turned off and we received a media button, exit
|
// 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;
|
Intent.ACTION_MEDIA_BUTTON.equals(intentAction)) return;
|
||||||
|
|
||||||
// Only process media buttons and CMD_PROCESS_KEYCODE, which is received from the widgets
|
// Only process media buttons and CMD_PROCESS_KEYCODE, which is received from the widgets
|
||||||
|
|
|
@ -679,7 +679,7 @@ public class Util
|
||||||
|
|
||||||
public static void registerMediaButtonEventReceiver(Context context, boolean isService)
|
public static void registerMediaButtonEventReceiver(Context context, boolean isService)
|
||||||
{
|
{
|
||||||
if (getMediaButtonsPreference(context))
|
if (getMediaButtonsEnabled(context))
|
||||||
{
|
{
|
||||||
if (isService) mediaButtonsRegisteredForService = true;
|
if (isService) mediaButtonsRegisteredForService = true;
|
||||||
else mediaButtonsRegisteredForUI = true;
|
else mediaButtonsRegisteredForUI = true;
|
||||||
|
@ -1064,7 +1064,7 @@ public class Util
|
||||||
return Integer.parseInt(preferences.getString(Constants.PREFERENCES_KEY_INCREMENT_TIME, "5"));
|
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);
|
SharedPreferences preferences = getPreferences(context);
|
||||||
return preferences.getBoolean(Constants.PREFERENCES_KEY_MEDIA_BUTTONS, true);
|
return preferences.getBoolean(Constants.PREFERENCES_KEY_MEDIA_BUTTONS, true);
|
||||||
|
|
Loading…
Reference in New Issue