Phone: Dialpad settings

Change-Id: I0d9e6a747c5c5b8d08883f697c672a63d1d3624c
Forward porting CM10 Advanced Phone Settings

Squash of http://review.cyanogenmod.org/#/c/22186/
and http://review.cyanogenmod.org/#/c/23113/

Change-Id: I3674aa2b4cb6c1386458b8bd95566d43dc8cbedd

Conflicts:

	res/values/strings.xml
Clean up in-call vibration implementation.

Change-Id: Ic91e8be169f7ba62ea2dc83dee2215df8a59c915
Set ringtone mode even if ringer is silent.

We need this as we want to attenuate music players even on silent
ringtone, to make the user aware the ringer is playing.

Change-Id: I8784f95996a70ac83fcb2d45231f0c3c209bb4e1
Fix occasional ring volume reset

When PHONE_INCOMING_RING message accidentaly arrives to CallNotifier
immediately after the user answers the call, the call state is still
RINGING instead of OFFHOOK, so ring plays again, causing audio
driver to switch from just entered IN_CALL mode back to RINGING mode,
which can lead to completely mute phone call - no side of call can be
heard.

Above also affects increasing ring feature.

Prevent this scenario by calling silenceRinger() instead of stopRing()
at the beginning of answerCall(), so not only the current ring is
stopped, but also the possible next ring prevented.

Change-Id: I358ffd93f4233ab1a957af18ec40edc0fef04014
Flip to mute/dismiss call

This patch is based on http://review.cyanogenmod.org/#/c/29894/11
to provide easy mute and dismiss functionality for the phone application.

Available actions:

0: no action
1: mute ringer
2: dismiss call

Patch Set 14: move attachListeners() to a better place to ensure
that it actually gets called.
Patch Set 15: corrected styling issues
Patch Set 16: further corrections
Patch Set 17: remove unused import
Patch Set 18: fix issue when action triggers while facing down
Patch Set 19: detach listener when call is answered
Patch Set 20: move detachListeners() to a more approiprate place
Patch Set 21: reset event listener
Patch Set 22: use the accelerometer to get the orientation data

Change-Id: I1895a1ce985a2f393ea890fd13531310af611498

Conflicts:

	res/values/strings.xml
	src/com/android/phone/CallFeaturesSetting.java
	src/com/android/phone/PhoneUtils.java