Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
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
Pedlar committed Dec 2, 2011
0 parents commit 0492783
Show file tree
Hide file tree
Showing 98 changed files with 24,563 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .classpath
@@ -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>
33 changes: 33 additions & 0 deletions .project
@@ -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>
5 changes: 5 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
@@ -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
19 changes: 19 additions & 0 deletions Android.mk
@@ -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))
89 changes: 89 additions & 0 deletions AndroidManifest.xml
@@ -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>

0 comments on commit 0492783

Please sign in to comment.