# [CM7] Where to define user-defined Settings.System preferences



## DizzyThermal (Jun 15, 2011)

Hey guys, I have been staring at the CM7 source code for a while and wanted to make a small modification to it.. I figured that the easiest way to make it versatile would be to make it a preference feature and include it in CMParts.apk.. I got stumped when I had to find the file to add my own preferences.. I know there are some built in like ACCELEROMETER_ROTATION, ADB_ENABLED, and AIRPLANE_MODE_ON.. If I wanted to add one and use it, which file would I be looking at? I've tried under packages/providers and haven't found it anywhere..

I appreciate any help you guys can give in advance!

Thanks :android-smile:


----------



## roman (Jun 11, 2011)

I'd suggest setting up your environment to work with eclipse, that way when you are lost, you can do ctrl+click and it will open the class for you and you can see where it is located. In your case you're looking for the Settings provider class which is located in frameworks/base/core/java/android/provider/Settings.java

However, this is only used for good design practices. It is simply a global reference to a string so you can access it anywhere, without any typos. No one's stopping you from setting your own preference strings, for instance you can do something like


```
Settings.System.setInt(getContentResolver() , "CUSTOM_SETTING_STRING_HERE", 3893873);
```


----------

