Settings: complete overhaul/optimizing + drag drop sort + easy dev life

This patch introduces a tons off changes. Let me first describe the easy ones

- resorting and reordering of our settings to do not have redundant entries like we had
- centralize and remove duplicate code
- complete UI overhaul

and now the main point. A wish for every dev is as easy as possible to get an UI interface
for a new feature without coding much. So I introduce now a central drag drop and swipe list
class and fragment to get this (THANK A BUNCH TO CARL BAUER FOR THE drag sort and swipe classes
which are modified the base of this)

Doing bunch off code in frameworks and settings to handle the new feature you do not need anymore.

So how does it work......as usual the dev is doing the frameworks part stuff....doing this
the dev need to add in the central frameworks ButtonsHelper class (or can be as well a new one)
2 methods to get and put the settings value for this patch (check ButtonsHelper.java in frameworks
how this works...only some lines off code).
So now the dev needs to represent this in settings with a list for the user to handle it. This
can be done with less then 20 line code changes. Just call the fragment eg like this:

            <PreferenceScreen
                    android:key="navbar_targets_settings"
                    android:fragment="com.android.settings.slim.dslv.ButtonsListViewSettings"
                    android:title="@string/navbar_targets_title">
                <extra android:name="buttonMode" android:value="3" />
                <extra android:name="maxAllowedButtons" android:value="5" />
                <extra android:name="actionValues" android:value="shortcut_action_navring_values" />
                <extra android:name="actionEntries" android:value="shortcut_action_navring_entries" />
                <extra android:name="fragment" android:value="com.android.settings.slim.fragments.NavbarButtonFragment" />
            </PreferenceScreen>

so what do the extra values mean....you can set following available value (if not set default is used)

<extra android:name="maxAllowedButtons" android:value="5" />
-  how much entries are max allowed to add till the user get a warning (default is 5)

<extra android:name="actionValues" android:value="shortcut_action_navring_values" />
- which array values should be used for this feature from array.xml (default is shortcut_action_values)

<extra android:name="actionEntries" android:value="shortcut_action_navring_entries" />
- which array entries should be used for this feature from array.xml (default is shortcut_action_entries)

<extra android:name="fragment" android:value="com.android.settings.slim.fragments.NavbarButtonFragment" />
- you want a fragment showed on top of the list (like color settings or whatever just specify the fragment you want to have
  default is none

<extra android:name="disableLongpress" android:value="true" />
- your feature does not support longpress...turn it off so that the user cannot choose an longpress option (default is true)

<extra android:name="useAppPickerOnly" android:value="true" />
- you do not want to use an action array list like above and only an app picker.....turn it on (default is false)

<extra android:name="disableIconPicker" android:value="true" />
- you do not want that the user can change the icon of your feature (can choose between system icon/gallery icon/default).....turn it on (default is false)

<extra android:name="disableDeleteLastEntry" android:value="true" />
- you do not want that the user can delete the last entry (eg for navbar or pie usefull).....turn it on (default is false)

and last one which is the only value which need to be specified!!!!!!!
<extra android:name="buttonMode" android:value="3" />
- this says the ButtonListView fragment which method it should use in frameworks to get the provider values and this is the only java change you need
to do in settings. just to add 3 lines off code into ButtonsListView.java (check getConfig and setConfig Method....very easy)

So......what to do.....add the xml entry with the options you want to have.....add 3 lines off java code....and do not care...all other is
working automatically. As well in frameworks you have methods in ButtonsJavaHelper.java which gives you all that information back without
taking care of formating handling or whatever usually needs to be done. Easy example....you need the drawable for this action or app or whatever
was saved (maybe gallery maybe system icon or default icon) just call the ButtonsHelper.getButtonIconImage method and you get the drawable the user
want. You do not need to take care at all about it. You need the action or the description the user saved? no problem just call the get method
in ButtonsHelper class and you get a arraylist off buttonconfig object with all information you need (the handle off formating and convert
the objects into just one provider settings value happens all in background automatically). As well (for descripton) already well
formated....etc etc. So at least you do not have to take care on the settings....you do not have to take care of how I save best my values
in provider....just do your feature and get the information you want from central classes and methods which helps you which gives you a ButtonsConfig arraylist
back which contains all information you need.

More to see on frameworks com/android/internal/util/slim

ButtonsHelper
ButtonsConstants
ButtonsConfig

You want a demonstration....tooo lazy to do a video....just download or compile slim and try it out...drag drop sort...swipe away like
gmail.....all is possible. :p

you can see currently this feature
on Navbar buttons, Pie buttons (normal and second layer), Navring, lockscreen shorcuts, notification shortcuts

have fun and cheers

SlimRoms

Change-Id: Iaa6b09f0b6ac7167d2c5b7f291f4379d90e6c598

Conflicts:

	AndroidManifest.xml
	res/menu/nav_bar_style.xml
	res/menu/nav_bar_style_dimen.xml
	res/values/attrs.xml
	res/values/cm_strings.xml
	res/xml/nav_bar_style.xml
	res/xml/system_ui_settings.xml
	src/com/android/settings/DensityChanger.java
	src/com/android/settings/cyanogenmod/NavBarStyle.java
	src/com/android/settings/cyanogenmod/NavbarSettings.java
	src/com/android/settings/cyanogenmod/StatusBarStyle.java
	src/com/android/settings/cyanogenmod/UserInterface.java
Settings: check if the icon choser app give valid content back

due that a lot weird filemanager exists which show up in the action
choser to be able to crop even if they do not (and a lot famous
one do that as well) check if the file which returns exists and
if it has content at all. Otherwise inform the user that
the chosen app does not support this action

Change-Id: I66524c4b07714944bea4d3e264d918d0b8b662ff
Settings: slightly adjust PIE default values

to fit frameworks base change

Change-Id: If213abd25744472c5d2f93a2b146dae6c12f4017
Settings: dslv do not allow to add recent, home, back main action twice

to have it twice causes problems on navbar pie and wherever in future
home, back, recents is used when the system disables this buttons and
more then one per feature exists. Due that a user do not set eg
2 home buttons on navbar let us block it and give the user a hint
that this is not allowed. All other actions can be added twice

Change-Id: I729d166139403e65b948f45acf36a47b7de7eb4c
Settings: remove always transparency mode navbar/statusbar 1/2

problem is that the transparency on most app totally break due
that a lot apps do not draw behind navbar and statusbar. Nearly
all user never use always mode and just use it on launcher
and lockcreen. So let us remove it

as well a bit cleanup in arrays and strings

Change-Id: Ic6d65d96a6665071689f3bc607c11aeadd29d8b8

Conflicts:

	res/values/cm_arrays.xml
	res/values/cm_strings.xml
Fix derp - strings/arrays