Convert default action preference to use integer strings
Might as well break some more preferences while we're at it
This commit is contained in:
parent
b275d5a1b9
commit
6c58ca2d82
@ -41,12 +41,12 @@
|
||||
android:summary="@string/filter_suggestions_summary"
|
||||
android:defaultValue="false" />
|
||||
<ListPreference
|
||||
android:key="default_action"
|
||||
android:key="default_action_int"
|
||||
android:title="@string/default_action_title"
|
||||
android:summary="@string/default_action_summary"
|
||||
android:entries="@array/default_action_entries"
|
||||
android:entryValues="@array/default_action_entries"
|
||||
android:defaultValue="Play" />
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="0" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_misc">
|
||||
<CheckBoxPreference
|
||||
|
@ -111,15 +111,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
|
||||
inputType = InputType.TYPE_CLASS_TEXT;
|
||||
mTextFilter.setInputType(inputType);
|
||||
|
||||
String action = settings.getString("default_action", "Play");
|
||||
if (action.equals("Last Used Action")) {
|
||||
mDefaultIsLastAction = true;
|
||||
mDefaultAction = PlaybackService.ACTION_PLAY;
|
||||
} else if (action.equals("Enqueue")) {
|
||||
mDefaultAction = PlaybackService.ACTION_ENQUEUE;
|
||||
} else {
|
||||
mDefaultAction = PlaybackService.ACTION_PLAY;
|
||||
}
|
||||
mDefaultAction = Integer.parseInt(settings.getString("default_action_int", "0"));
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
public void run()
|
||||
|
Loading…
x
Reference in New Issue
Block a user