Skip to content

Commit

Permalink
Revert "Completely remove DeviceSettings" Stupid CM idea... rip it ou…
Browse files Browse the repository at this point in the history
…t when the replacement doesn't support everything grr..

This reverts commit 25e2ab9.
  • Loading branch information
Flinny committed Dec 20, 2013
1 parent 86bf973 commit 06a3d7f
Show file tree
Hide file tree
Showing 17 changed files with 846 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DeviceSettings/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := DeviceSettings
LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
27 changes: 27 additions & 0 deletions DeviceSettings/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cyanogenmod.settings.device"
android:sharedUserId="android.uid.system" >

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

<application android:label="@string/andromadus_settings">
<activity
android:name="com.cyanogenmod.settings.device.DeviceSettings"
android:icon="@drawable/andromadus_settings"
android:label="@string/andromadus_settings" >
<intent-filter>
<action android:name="com.cyanogenmod.action.LAUNCH_DEVICE_SETTINGS" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<receiver android:name=".Startup" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>

</application>
</manifest>
Binary file added DeviceSettings/res/drawable/andromadus_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions DeviceSettings/res/layout/top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Copyright (C) 2012-2013 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.
-->
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />

16 changes: 16 additions & 0 deletions DeviceSettings/res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

<string-array name="wake_method_entries">
<item>@string/sweep2wake_pref_0</item>
<item>@string/sweep2wake_pref_1</item>
<item>@string/sweep2wake_pref_2</item>
</string-array>

<string-array name="wake_method_entries_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>

</resources>

24 changes: 24 additions & 0 deletions DeviceSettings/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012-2013 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.
-->

<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

<bool name="has_trackball">false</bool>

</resources>

35 changes: 35 additions & 0 deletions DeviceSettings/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012-2013 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="urn:oasis:names:tc:xliff:document:1.2">

<string name="app_name">Advanced Settings</string>

<string name="defaults_button">Reset to default</string>

<!-- Haptic Preference -->
<string name="category_trackpad_title">Trackpad</string>

<!-- Touchscreen Preference -->
<string name="category_touchscreen_title">Touchscreen</string>

<string name="wake_title">Sleep2Wake</string>
<string name="wake_method_title_head">Sleep2Wake Method</string>
<string name="wake_method_summary_head">Select which sleep2wake mode you prefer to use.</string>

<string name="trackpad_title">Trackpad</string>

</resources>
47 changes: 47 additions & 0 deletions DeviceSettings/res/values/strings_andro.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012-2013 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="urn:oasis:names:tc:xliff:document:1.2">

<string name="quick_launch_title">Quick launch</string>
<string name="quick_launch_summary">Set keyboard shortcuts to launch apps</string>

<!-- ANDROMADUS EDITS START -->

<string name="andromadus_settings">Andromadus</string>
<string name="andromadus_general">General</string>
<string name="andromadus_statusbar">Status Bar</string>
<string name="andromadus_notification_drawer">Notification Drawer</string>
<string name="pref_trackball_wake_toggle_title">Trackball wake</string>
<string name="pref_trackball_wake_toggle_summary">Allow trackball to wake the device</string>
<string name="pref_trackball_unlock_toggle_title">Trackball unlock</string>
<string name="pref_trackball_unlock_toggle_summary">Allow trackball to unlock the device</string>
<!-- Setting for Camera button play/pause controls -->
<string name="cambtn_music_controls_title">Camera button music controls</string>
<string name="cambtn_music_controls_summary">When screen off, long-pressing the camera button will play/pause the active music track</string>
<!-- Show Brightness Toggleslider -->
<string name="pref_show_brightness_toggleslider_title">Show Brightness Toggleslider</string>
<string name="pref_show_brightness_toggleslider_summary">In the notification area</string>
<!-- Sweep 2 Wake Settings -->
<string name="sweep2wake_title">Sweep2Wake</string>
<string name="sweep2wake_pref_0">Disabled</string>
<string name="sweep2wake_summary">%s</string>
<string name="sweep2wake_pref_1">Enabled</string>
<string name="sweep2wake_pref_2">Enabled with backlight</string>

<!-- **** ANDROMADUS ADDITIONS END **** -->

</resources>
25 changes: 25 additions & 0 deletions DeviceSettings/res/xml/andromadus_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/andromadus_settings"
android:key="pref_category_button_settings"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">

<PreferenceCategory
android:title="@string/andromadus_general" />

<Preference
android:key="pref_quick_launch"
android:title="@string/quick_launch_title"
android:summary="@string/quick_launch_summary">
<intent android:action="android.settings.QUICK_LAUNCH_SETTINGS" />
</Preference>

<CheckBoxPreference android:key="pref_trackball_unlock_toggle"
android:title="@string/pref_trackball_unlock_toggle_title"
android:summary="@string/pref_trackball_unlock_toggle_summary" />

<CheckBoxPreference android:key="pref_trackball_wake_toggle"
android:title="@string/pref_trackball_wake_toggle_title"
android:summary="@string/pref_trackball_wake_toggle_summary" />

</PreferenceScreen>
27 changes: 27 additions & 0 deletions DeviceSettings/res/xml/touchscreen_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2012-2013 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/wake_title">
<ListPreference
android:key="wake_method"
android:title="@string/wake_method_title_head"
android:summary="@string/wake_method_summary_head"
android:entries="@array/wake_method_entries"
android:entryValues="@array/wake_method_entries_values"
android:defaultValue="0" />
</PreferenceCategory>
</PreferenceScreen>
37 changes: 37 additions & 0 deletions DeviceSettings/res/xml/trackball_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2012-2013 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/trackpad_title">
<Preference
android:key="pref_quick_launch"
android:title="@string/quick_launch_title"
android:summary="@string/quick_launch_summary">
<intent android:action="android.settings.QUICK_LAUNCH_SETTINGS" />
</Preference>

<CheckBoxPreference android:key="pref_trackball_unlock_toggle"
android:title="@string/pref_trackball_unlock_toggle_title"
android:summary="@string/pref_trackball_unlock_toggle_summary"
android:defaultValue="false" />

<CheckBoxPreference android:key="pref_trackball_wake_toggle"
android:title="@string/pref_trackball_wake_toggle_title"
android:summary="@string/pref_trackball_wake_toggle_summary" />

</PreferenceCategory>
</PreferenceScreen>

Loading

0 comments on commit 06a3d7f

Please sign in to comment.