Permalink
Browse files

Initial Commit

Start of CMSettings based on Fragments.
Settings.java reworked from the main Settings app to make Fragments work properly.
Fought with these thigns tooth and nail to get a functioning app
Needs more work, needs some code cleanup and some prettying up

Imported "res" from old CMParts for easier porting of old code so localized string are already there.

With Fragments the app can be easier to maintain if the setup for the Power Widget is followed. All one
java file with fragment classes inside to do the dirty work.
  • Loading branch information...
0 parents commit 0492783cb625af94d1538227265b46d37bd813d8 @Pedlar committed Dec 2, 2011
Showing with 24,563 additions and 0 deletions.
  1. +8 −0 .classpath
  2. +33 −0 .project
  3. +5 −0 .settings/org.eclipse.jdt.core.prefs
  4. +19 −0 Android.mk
  5. +89 −0 AndroidManifest.xml
  6. +568 −0 gen/com/cyanogenmod/settings/R.java
  7. +40 −0 proguard.cfg
  8. +5 −0 proguard.flags
  9. +11 −0 project.properties
  10. BIN res/drawable-hdpi-finger/ic_grabber.png
  11. BIN res/drawable-hdpi/cm_icon.png
  12. BIN res/drawable-hdpi/ic_launcher.png
  13. BIN res/drawable-hdpi/ic_launcher_application.png
  14. BIN res/drawable-ldpi/ic_launcher.png
  15. BIN res/drawable-mdpi-finger/ic_grabber.png
  16. BIN res/drawable-mdpi/cm_icon.png
  17. BIN res/drawable-mdpi/ic_launcher.png
  18. BIN res/drawable-mdpi/ic_launcher_application.png
  19. BIN res/drawable/appwidget_bg.9.png
  20. +28 −0 res/drawable/appwidget_button.xml
  21. +28 −0 res/drawable/appwidget_button_left.xml
  22. BIN res/drawable/appwidget_inner_focus_c.9.png
  23. BIN res/drawable/appwidget_inner_press_c.9.png
  24. BIN res/drawable/notification_icon.png
  25. +11 −0 res/drawable/rectangle.xml
  26. BIN res/drawable/render_off.png
  27. BIN res/drawable/render_on.png
  28. +72 −0 res/layout-finger/order_power_widget_button_list_item.xml
  29. +32 −0 res/layout-finger/order_power_widget_buttons_activity.xml
  30. +17 −0 res/layout/add_cat.xml
  31. +78 −0 res/layout/gesture_create.xml
  32. +29 −0 res/layout/gestures_item.xml
  33. +63 −0 res/layout/gestures_list.xml
  34. +128 −0 res/layout/hapticadjust.xml
  35. +7 −0 res/layout/interface_headers.xml
  36. +103 −0 res/layout/lightlevels.xml
  37. +15 −0 res/layout/options.xml
  38. +46 −0 res/layout/preference_header_item.xml
  39. +53 −0 res/layout/preference_header_switch_item.xml
  40. +38 −0 res/layout/widget.xml
  41. +71 −0 res/values-ca/arrays.xml
  42. +551 −0 res/values-ca/strings.xml
  43. +283 −0 res/values-de/arrays.xml
  44. +766 −0 res/values-de/strings.xml
  45. +202 −0 res/values-el/arrays.xml
  46. +768 −0 res/values-el/strings.xml
  47. +278 −0 res/values-es/arrays.xml
  48. +775 −0 res/values-es/strings.xml
  49. +178 −0 res/values-fi/arrays.xml
  50. +572 −0 res/values-fi/strings.xml
  51. +200 −0 res/values-fr/arrays.xml
  52. +706 −0 res/values-fr/strings.xml
  53. +250 −0 res/values-hu/arrays.xml
  54. +699 −0 res/values-hu/strings.xml
  55. +226 −0 res/values-it/arrays.xml
  56. +768 −0 res/values-it/strings.xml
  57. +152 −0 res/values-iw/arrays.xml
  58. +428 −0 res/values-iw/strings.xml
  59. +236 −0 res/values-ja/arrays.xml
  60. +748 −0 res/values-ja/strings.xml
  61. +186 −0 res/values-ko/arrays.xml
  62. +637 −0 res/values-ko/strings.xml
  63. +259 −0 res/values-nl/arrays.xml
  64. +767 −0 res/values-nl/strings.xml
  65. +206 −0 res/values-pl/arrays.xml
  66. +725 −0 res/values-pl/strings.xml
  67. +199 −0 res/values-pt-rPT/arrays.xml
  68. +542 −0 res/values-pt-rPT/strings.xml
  69. +223 −0 res/values-pt/arrays.xml
  70. +727 −0 res/values-pt/strings.xml
  71. +263 −0 res/values-ru/arrays.xml
  72. +768 −0 res/values-ru/strings.xml
  73. +210 −0 res/values-sk/arrays.xml
  74. +656 −0 res/values-sk/strings.xml
  75. +229 −0 res/values-sv/arrays.xml
  76. +746 −0 res/values-sv/strings.xml
  77. +221 −0 res/values-uk/arrays.xml
  78. +569 −0 res/values-uk/strings.xml
  79. +297 −0 res/values-zh-rCN/arrays.xml
  80. +742 −0 res/values-zh-rCN/strings.xml
  81. +395 −0 res/values-zh-rTW/arrays.xml
  82. +768 −0 res/values-zh-rTW/strings.xml
  83. +746 −0 res/values/arrays.xml
  84. +22 −0 res/values/colors.xml
  85. +32 −0 res/values/config.xml
  86. +22 −0 res/values/dimens.xml
  87. +775 −0 res/values/strings.xml
  88. +81 −0 res/xml/backlight_settings.xml
  89. +11 −0 res/xml/main.xml
  90. +28 −0 res/xml/power_widget.xml
  91. +34 −0 res/xml/system_settings.xml
  92. +35 −0 res/xml/ui_power_widget_settings.xml
  93. +443 −0 src/com/cyanogenmod/settings/Settings.java
  94. +24 −0 src/com/cyanogenmod/settings/SubSettings.java
  95. +529 −0 src/com/cyanogenmod/settings/activities/ColorPickerDialog.java
  96. +527 −0 src/com/cyanogenmod/settings/activities/PowerWidget.java
  97. +181 −0 src/com/cyanogenmod/settings/utils/PowerWidgetUtil.java
  98. +355 −0 src/com/cyanogenmod/settings/widgets/TouchInterceptor.java
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CMSettings</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,5 @@
+#Wed Nov 30 16:06:50 CST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
@@ -0,0 +1,19 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_JAVA_LIBRARIES := bouncycastle
+LOCAL_STATIC_JAVA_LIBRARIES := guava
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CMSettings
+LOCAL_CERTIFICATE := platform
+
+LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+
+include $(BUILD_PACKAGE)
+
+# Use the folloing include to make our test apk.
+include $(call all-makefiles-under,$(LOCAL_PATH))
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.cyanogenmod.settings"
+ android:versionCode="1"
+ android:versionName="1.0"
+ coreApp="true"
+ android:sharedUserId="android.uid.system"
+ >
+
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.HARDWARE_TEST" />
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
+ <uses-sdk android:minSdkVersion="14" />
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name" >
+ <activity
+ android:label="@string/app_name"
+ android:name=".Settings"
+ android:taskAffinity="com.android.settings"
+ android:launchMode="singleTask">
+ <intent-filter >
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name=".SubSettings"
+ android:taskAffinity="com.cyanogenmod.settings">
+ </activity>
+
+ <activity android:name="Settings$PowerWidgetActivity"
+ android:label="@string/title_widget_buttons"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.cyanogen.WIDGET_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.cyanogenmod.settings.FRAGMENT_CLASS"
+ android:value="com.cyanogen.settings.activities.PowerWidget" />
+ <meta-data android:name="com.cyanogen.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/power_widget_settings" />
+ </activity>
+
+ <activity android:name="Settings$PowerWidgetChooserActivity"
+ android:label="@string/title_widget_picker"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.activities.PowerWidget$PowerWidgetChooser" />
+ <meta-data android:name="com.cyanogen.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/power_widget_settings" />
+ <meta-data android:name="com.cyanogen.settings.PARENT_FRAGMENT_TITLE"
+ android:value="@string/title_widget_buttons" />
+
+ <meta-data android:name="com.cyanogen.settings.PARENT_FRAGMENT_CLASS"
+ android:value="com.cyanogen.settings.Settings$PowerWidgetActivity" />
+ </activity>
+
+ <activity android:name="Settings$PowerWidgetOrderActivity"
+ android:label="@string/title_widget_order"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.activities.PowerWidget$PowerWidgetOrder" />
+ <meta-data android:name="com.cyanogen.settings.TOP_LEVEL_HEADER_ID"
+ android:resource="@id/power_widget_settings" />
+ <meta-data android:name="com.cyanogen.settings.PARENT_FRAGMENT_TITLE"
+ android:value="@string/title_widget_buttons" />
+
+ <meta-data android:name="com.cyanogen.settings.PARENT_FRAGMENT_CLASS"
+ android:value="com.cyanogen.settings.Settings$PowerWidgetActivity" />
+ </activity>
+ </application>
+
+</manifest>
Oops, something went wrong.

0 comments on commit 0492783

Please sign in to comment.