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:summary="@string/filter_suggestions_summary"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="default_action"
|
android:key="default_action_int"
|
||||||
android:title="@string/default_action_title"
|
android:title="@string/default_action_title"
|
||||||
android:summary="@string/default_action_summary"
|
android:summary="@string/default_action_summary"
|
||||||
android:entries="@array/default_action_entries"
|
android:entries="@array/default_action_entries"
|
||||||
android:entryValues="@array/default_action_entries"
|
android:entryValues="@array/entry_values"
|
||||||
android:defaultValue="Play" />
|
android:defaultValue="0" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/pref_misc">
|
<PreferenceCategory android:title="@string/pref_misc">
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
|
@ -101,7 +101,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
|
|||||||
|
|
||||||
mLimiterViews = (ViewGroup)findViewById(R.id.limiter_layout);
|
mLimiterViews = (ViewGroup)findViewById(R.id.limiter_layout);
|
||||||
|
|
||||||
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
int inputType;
|
int inputType;
|
||||||
if (settings.getBoolean("phone_input", false))
|
if (settings.getBoolean("phone_input", false))
|
||||||
inputType = InputType.TYPE_CLASS_PHONE;
|
inputType = InputType.TYPE_CLASS_PHONE;
|
||||||
@ -111,15 +111,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
|
|||||||
inputType = InputType.TYPE_CLASS_TEXT;
|
inputType = InputType.TYPE_CLASS_TEXT;
|
||||||
mTextFilter.setInputType(inputType);
|
mTextFilter.setInputType(inputType);
|
||||||
|
|
||||||
String action = settings.getString("default_action", "Play");
|
mDefaultAction = Integer.parseInt(settings.getString("default_action_int", "0"));
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
new Handler().post(new Runnable() {
|
new Handler().post(new Runnable() {
|
||||||
public void run()
|
public void run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user