Phone: Dialpad settings

Change-Id: I0d9e6a747c5c5b8d08883f697c672a63d1d3624c
Forward port Multi-DPI Call Glowpad (AOKP)
Phone: Power widget support (4/4)

- Support all LTE network modes defined in RILConstants and
  com.android.internal.telephony.Phone.
- Enable LTE options for GSM LTE phones.
- Implement toggleLTE.
  - LTE/CDMA mode may be overridden with toggleLTE_lte_cdma_nt_mode.

Consists of (partial) cherry-picks of these CM 10.0 commits:

commit a8eb4dce7b19bfa74fbbde128336f93057133d97
Author: Mike Kasick <mike@kasick.org>
Date:   Fri Aug 10 18:04:44 2012 -0400

    Make "Preferred network mode" strings consistent, fix LTE modes.

    - Make network mode strings, comments, internally consistent with each other.
    - Show LTE modes only for CDMA/LTE and GSM/LTE devices, not non-LTE.
    - Revert to "Global" label for NETWORK_MODE_GLOBAL on non-LTE devices, to
      remain consistent with RILConstants, but also because this mode is used
      for CDMA/EvDo/GSM/WCDMA mode on global-capable devices.
    - Consistently show "CDMA / EvDo" whether on a CDMA or CDMA/LTE phone.

    This should be the complete superset of network modes supported on all
    devices.  Individual devices may prune this list to include only network
    modes that their radios support.

    Note, the "Global" mode label (preferred_network_mode_lte_cdma_summary)
    remains unchanged from its overloaded-to-support-LTE-on-toro capacity for
    consistency with AOSP, although though this overloading is a mess.

    Change-Id: I39bcf73474778a4d83753eddb5014642e41ab9b3

commit 9025baeddf9b7325e07605fca310fa897dcd9175
Author: dhacker29 <davidhackerdvm@gmail.com>
Date:   Tue Jul 10 10:59:01 2012 -0500

    Add NT_MODE's for NETWORK_MODE's 8 and 10

    as defined in RILConstants.java

    Change-Id: I225bb776152e4c63ade1f70669edb2df3986634c

commit a03ba4f3ea1c059d91aba747964314ab657d6842
Author: Ricardo Cerqueira <github@cerqueira.org>
Date:   Tue Apr 17 01:34:31 2012 +0100

    Phone: Enable LTE options for GSM LTE phones

    Change-Id: I580c37f3272c8cc8363e8db5b1c227bf6f74a04a

Change-Id: I326584e1f82cc84c244c23282b096a98703d4b1a
Forward port Ascending ringtone

Original author: maniac103

Change-Id: I4f4ba78daefa0e5ef962e6eb2061e66a7f26324d
fix apn settings
Port network mode toggle from CM10

	commit 43575664b23d2ea1766210cea99f184e1732860b
	Author: Ricardo Cerqueira <github@cerqueira.org>
	Date:   Fri Apr 27 17:39:37 2012 +0100

	    PhoneToggler: Fix toggler on LTE+GSM phones

	    NT_MODE_LTE_GSM_WCDMA was missing from the lists of acceptable
	    network modes

	    Change-Id: I6c3c38d63902c1c59cfa2e61ed5d8bcdd5bcb5f0

	commit d1dc25f1b37fca42ce2834fe3bb3217800422f7e
	Author: Emerson Pinter <dev@pinter.com.br>
	Date:   Sat Feb 18 22:02:22 2012 -0200

	Makes network mode toggle work. Port from CM9.

	Added LTE_ONLY needed code to PhoneToggler.
	Added LTE to the double check MODE_GLOBAL condition on Settings and
	PhoneToggler.

	Integrated patch by Danny Baumann to make PhoneToggler accept the same
	values as are configurable in settings, from change:
	http://review.cyanogenmod.com/#change,14120

	Tested-by: Emerson Pinter
	Signed-off-by: Emerson Pinter <dev@pinter.com.br>

	*** Settings.java and PhoneToggler.java original authors:

	commit 3e6b2ca4c969aedeefa9a10bb85e9c52bc43a574
	Author: Emilio López <turl@tuxfamily.org>
	Date:   Wed Sep 14 23:50:06 2011 +0000

	    Phone: Double check mode before changing, part 2

	    A modem might report world phone mode when it really is only GSM or
	    CDMA capable, making the system switch to an invalid mode which
	    will later break the telephony code.
	    This simple check enforces the world phone overlay which is already
	    in place and will only consider it a correct value in that case.

	    This complements a commit with the same title by applying the same
	    logic to another code path that uses similar checks.

	    Change-Id: Ib7332511a693d40f53a79ba98844c9117871228a

	commit 19215c8f614e30211b2aca1512bb8444da55bdda
	Author: Emilio López <turl@tuxfamily.org>
	Date:   Wed Sep 14 23:50:06 2011 +0000

	    Phone: Double check mode before changing

	    A modem might report world phone mode when it really is only GSM or
	    CDMA capable, making the system switch to an invalid mode which
	    will later break the telephony code.
	    This simple check enforces the world phone overlay which is already
	    in place and will only consider it a correct value in that case.

	    Change-Id: Iedbc529497b2779f3a12ff56ca1b028cc9434227

	commit 0d396f79514173e06c5334a40f23090933e0a806
	Author: piaf <piaf@mediacenter-desktop.(none)>
	Date:   Tue Aug 3 00:56:09 2010 +0100

	    Added permission control for the 2G/3G switch

	commit 5c85d5417a67b02be895a8878c7fa86bc992cd8e
	Author: Mediacenter <mediacenter@mediacenter-desktop.(none)>
	Date:   Sat Jul 31 01:45:03 2010 +0100

	    Added support for Changing Phone network mode
	    Todo: Add permission control

	Change-Id: I84db8082b4e35262f1c6cdb8d1156f3cbf997a99

Change-Id: Ibb8f33db71224b4559dcbf377c5844edc88548a7

Conflicts:

	res/values-de/strings.xml
	res/values/strings.xml
Forward porting CM10 Advanced Phone Settings

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

Change-Id: I3674aa2b4cb6c1386458b8bd95566d43dc8cbedd
Phone: implement noise suppression for phone calls (2/2)

Change-Id: Ie72449f952f99b410fbb5bc4a8e6cbc833e6176f

Conflicts:

	res/values-de/strings.xml
	res/values/strings.xml
Merge "fix apn settings" into jb4.2
Merge "Phone: implement noise suppression for phone calls (2/2)" into jb4.2
Phone: Forward port Add national data roaming and make it optional (2/2)

From CM

  by Robin Morawetz (Rdlgrmpf) and Davor Bertovic (LorD ClockaN)
  Id: I9fccddf4d9081d228540d5e62f132383b9579c52

Change-Id: I524f3b71e9e8ef3483351adc4907fba4622e4b3c
Phone: Navbar customization (2/3)

This commit is a complete recoded Version of our old one. Implements following feature:

- custom Style
Navbar background color
navbar button color
navbar glow color
navbar button transparency

- custom dimen
navbar height
navbar heidht landscape
navbar width
all have the ability to set to 0 to hide

- custom button
complete system and logic overwork
custom buttons
custom icons
custom applications
longpress actions
complete dynamic
no systemUI restarts

- custom navring
complete system and logic overwork
custom targets
custom icons
custom applications
longpress actions
complete dynamic
no systemUI restarts

- misc
glowpad glow time
show menu location
show menu

TODO: Navbar transparency
and other will be a surprise
credit CM-Phone: Sprint MWI Quirk: Phantom message wait indicator workaround

If true, message wait indicators are hidden by default on this device
unless the user enables it in Call Settings. This quirk is necessary
for the "Phantom Voicemail" issue where notifications that are
impossible to dismiss on the Sprint network. In rare instances, feature
phone voicemail gets stuck in a Sprint account where smart phones are
unable to delete them. Sprint will not help the subscriber fix this,
as their own Android phones ignore message wait indicators.

When you enable sprint_mwi_quirk in overlay/packages/apps/Phone/res/values/config.xml
this option appears in the Phone app:

Settings > Message Wait Indicator

Default is disabled, as Sprint Android phones have no reason to see
message wait indicators. It can however be enabled for Sprint phones
used on overseas carriers where message wait indicators are desired.

Rebased on jellybeans

Change-Id: I36f8d43b5684a6f7337852da0394a21ca92fefbf
Phone: Fix NPE in PhoneUtils::toLogSafePhoneNumber

When PhoneGlobals.DEBUG_LEVEL is set to 2, there
will be NullPointerException when receiving an
incoming call from an unknown number.

Change-Id: I2a730b891420695f3a410164e611b66cf757edc8
Signed-off-by: Bin Li <libin@marvell.com>
Merge "credit CM-Phone: Sprint MWI Quirk: Phantom message wait indicator workaround" into jb4.2
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
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
Use supplementary service notifications to display additional call info.

- If an incoming call was forwarded from another party, 'Forwarded call'
  is displayed as call type.
- If a call is held by the remote party, 'Waiting call' is displayed as
  call title.
- Some other events (e.g. forwarding state or conference call start) is
  displayed by (optional) toasts

Idea and some early code were taken from AOSP-Change-Ids
Ic61628882fef7409deae677f50f380e62bef98f6 and
Ib0c9bfc889f9ce34cb76c6dfef99b51b6c47423f.

This is a squash of the following gingerbread change IDs:
I84e16ead5dc903e0543feacc99ae94c16798a8b5
I6bcfa33eaf5dd23446cc3cf1712b0fa2f37ea8d0
I535ab5bb89941a0e9c9a34a8d69caf84437b2bce
I02491773f8a1b154974b83f984e5aa16f535e35f

Change-Id: I33c9bf60eac429de46bb987dbf4343fe7f21707e
Clean up in-call vibration implementation.

Change-Id: Ic91e8be169f7ba62ea2dc83dee2215df8a59c915
Phone: Forward port Add Missed call and Voicemail specific notification lights

This commit adds the ability to use the configured missed call and voicemail
light settings

Change-Id: Ib7f38a89629007fde9f214400bd59159fcc977ab