Make sure to not crash if DSP manager and/or development apps are
deactivated or deleted.

Change-Id: I92ea5a44bedbb036d59dde11e83052338e9765e8
Display options: allow configuration of wake on plug behavior (1/2)

Adds a global setting to the Display section to enable or disable wake-on-plug.
Default is disabled.  When enabled, the device will wake when the charger
is connected or disconnected.  When disabled, the device's wake state
will be left alone.

PS 2: Change wording of setting per DvT's recommendation

PS 3: Pull default value of setting from config.xml

PS 4: Reduce scope of variable

PS 5,6: Rebase

Cherry-picked from: I779a4aa4feeca87879c932be6e1fa032e4b4afc8

Change-Id: I106b7d901a788c19e08454d6231daebf3ff4872c
Merge "Display options: allow configuration of wake on plug behavior (1/2)" into cm-10.2
Merge "Make sure to not crash if DSP manager and/or development apps are deactivated or deleted." into cm-10.2
Clean up lockscreen target configuration code (2/2)

Get rid of a lot of duplicated code.

Change-Id: I03faf36d5e767053072f1809f670882600ea0830
merge changes from CyanogenMod 10.2 into local branch

Conflicts:
	res/xml/display_settings.xml
	src/com/android/settings/DisplaySettings.java

Change-Id: Ia05feff5475dc97a11b7a4f6ac6b50ad2f2301fb