Commit ef2685fc authored by Sébastien Toque's avatar Sébastien Toque
Browse files

Move headset detection & iomx options out of advanced,

 and enable headset detection by default
parent 79134b52
......@@ -53,6 +53,7 @@
<string name="surface_fill">Etirer</string>
<string name="surface_original">Centrer</string>
<string name="thumbnail">Miniature</string>
<string name="main_prefs_category">Général</string>
<string name="advanced_prefs_category">Avancé</string>
<string name="enable_iomx">Activer le décodage matériel</string>
<string name="advanced_debugging">Débogage avancé</string>
......
......@@ -55,6 +55,7 @@
<string name="surface_original">Center</string>
<string name="about_text" translatable="false">VLC media player\n\nVLC authors and VideoLAN\n\nLicensed under the GPLv2\n</string>
<string name="thumbnail">Thumbnail</string>
<string name="main_prefs_category">Main</string>
<string name="advanced_prefs_category">Advanced</string>
<string name="enable_iomx">Enable hardware accelerated decoding</string>
<string name="advanced_debugging">Advanced Debugging</string>
......
......@@ -13,13 +13,7 @@
android:summary="@string/filebrowser_title">
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/searchable_hint">
<PreferenceScreen
android:key="clear_history"
android:title="@string/clear_history">
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/advanced_prefs_category">
<PreferenceCategory android:title="@string/main_prefs_category">
<CheckBoxPreference
android:key="enable_iomx"
android:title="@string/enable_iomx">
......@@ -27,8 +21,17 @@
<CheckBoxPreference
android:key="enable_headset_detection"
android:title="@string/detect_headset"
android:summary="@string/detect_headset_detail">
android:summary="@string/detect_headset_detail"
android:defaultValue="true">
</CheckBoxPreference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/searchable_hint">
<PreferenceScreen
android:key="clear_history"
android:title="@string/clear_history">
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/advanced_prefs_category">
<PreferenceScreen android:title="@string/advanced_debugging">
<Preference android:title="@string/quit" android:key="quit_app" android:enabled="true"/>
</PreferenceScreen>
......
......@@ -61,7 +61,7 @@ public class AudioService extends Service {
private Notification mNotification;
private boolean mShuffling = false;
private RepeatType mRepeating = RepeatType.None;
private boolean mDetectHeadset = false;
private boolean mDetectHeadset = true;
@Override
public void onStart(Intent intent, int startId) {
......
......@@ -83,7 +83,7 @@ public class AudioServiceController implements AudioPlayerControl {
try {
mAudioServiceBinder.addAudioCallback(mCallback);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.getInstance());
boolean enableHS = prefs.getBoolean("enable_headset_detection", false);
boolean enableHS = prefs.getBoolean("enable_headset_detection", true);
AudioServiceController.getInstance().detectHeadset(enableHS);
} catch (RemoteException e) {
Log.e(TAG, "remote procedure call failed: addAudioCallback()");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment