forked from F1-GalaxyNexus/android_device_samsung_i9300
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I44b8c3ec52652ff9f57a70aacd4c5156818e0037
- Loading branch information
codeworkx
committed
Mar 28, 2013
1 parent
c775350
commit 09d3f13
Showing
9 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2012 The CyanogenMod Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<PreferenceCategory | ||
android:title="@string/dockaudio_subcat_title"> | ||
<!-- Use Dock Audio --> | ||
<CheckBoxPreference | ||
android:key="dock_audio" | ||
android:title="@string/use_dock_audio_title_head" | ||
android:summary="@string/use_dock_audio_summary_head" | ||
/> | ||
</PreferenceCategory> | ||
</PreferenceScreen> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* Copyright (C) 2012 The CyanogenMod Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.cyanogenmod.settings.device; | ||
|
||
import android.app.ActivityManagerNative; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.os.Bundle; | ||
import android.os.UserHandle; | ||
import android.preference.CheckBoxPreference; | ||
import android.preference.Preference; | ||
import android.preference.PreferenceActivity; | ||
import android.preference.PreferenceFragment; | ||
import android.preference.PreferenceManager; | ||
import android.preference.PreferenceScreen; | ||
import android.util.Log; | ||
|
||
import com.cyanogenmod.settings.device.R; | ||
|
||
public class DockFragmentActivity extends PreferenceFragment { | ||
|
||
private static final String PREF_ENABLED = "1"; | ||
private static final String TAG = "GalaxyS3Settings_Dock"; | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
addPreferencesFromResource(R.xml.dock_preferences); | ||
PreferenceScreen prefSet = getPreferenceScreen(); | ||
|
||
} | ||
|
||
@Override | ||
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { | ||
|
||
String boxValue; | ||
String key = preference.getKey(); | ||
|
||
Log.w(TAG, "key: " + key); | ||
|
||
if (key.compareTo(DeviceSettings.KEY_USE_DOCK_AUDIO) == 0) { | ||
boxValue = (((CheckBoxPreference)preference).isChecked() ? "1" : "0"); | ||
Intent i = new Intent("com.cyanogenmod.settings.SamsungDock"); | ||
i.putExtra("data", boxValue); | ||
ActivityManagerNative.broadcastStickyIntent(i, null, UserHandle.USER_ALL); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
public static void restore(Context context) { | ||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); | ||
boolean dockAudio = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_DOCK_AUDIO, false); | ||
Intent i = new Intent("com.cyanogenmod.settings.SamsungDock"); | ||
i.putExtra("data", (dockAudio? "1" : "0")); | ||
ActivityManagerNative.broadcastStickyIntent(i, null, UserHandle.USER_ALL); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2012 The CyanogenMod Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<resources xmlns:xliff="urnasis:names:tc:xliff:document:1.2 "> | ||
<!-- Volume Rocker Wake --> | ||
<bool name="config_show_volumeRockerWake">true</bool> | ||
</resources> |
09d3f13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! Will it enable the use of USB audio DACs via USB OTG? Will this be ported to d2tmo?
09d3f13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just follow the changelog of your device and you will know, if it will be added in the next nightly build.
http://changelog.bbqdroid.org/#d2tmo/cm10.1/next
09d3f13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dock audio through car dock (Infuse 4G one) still does not seem to be working, even on latest nightlies with the recent overlay fix.