Phone: Enable LTE for GSM LTE phones (part I)

Change-Id: I580c37f3272c8cc8363e8db5b1c227bf6f74a04a
Using SystemVibrator in the cases other than Ringer.java

In ICS, Phone app was creating separate Vibrator instances in
Ringer.java and CallNotifier.java, while in Jellybean they started
relying on one single Vibrator Service.
See also Id928ffef9a87e2563198240e91184cf59ecebbb1.

It means vibrate()/cancel() calls from two files interfere with each
other. When "Emergency tone" is set to "Vibrate" in Sound Setting
(which is only available with CDMA devices), this causes unexpected
trouble; the "Emergency tone" vibration is canceled immediately by
Ringer's Vibrator#cancel() call. onPhoneStateChanged() is indirectly
calling the method.

This change stops using the Vibrator Service in the emergency vibration
case, so that two Vibrator objects won't interfere with each other.

TESTED (use CDMA phone):
- Set "Emergency tone" to "Vibrate", and make a phone call to "911"
-> The device should vibrate for hundreds of mills (even without a
   fix, it may vibrate for an instant, so need to check how long)

Bug: 6794250
Change-Id: I69e6c3d99b14b3c50c57ff5d59ca42f4ea18024f
Merge tag 'android-4.1.1_r3' into jb-merge

Android 4.1.1 release 3
Add NT_MODE's for NETWORK_MODE's 8 and 10

as defined in RILConstants.java
and fix force closes when phone is not yet ready

Change-Id: I225bb776152e4c63ade1f70669edb2df3986634c
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
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
Remove hard-coded CDMA roaming mode restrictions.

Prior to this, the CDMA roaming mode (from the "System select" setting) is
vetted against a hard-coded list of two acceptable values (CDMA_RM_HOME:0
and CDMA_RM_ANY:2).  This commit instead vets against the
cdma_system_select_values list, which contains those two values by default,
but may be overridden on a per-device basis.

For motivation, epicmtd in stock Gingerbread doesn't use CDMA_RM_ANY:2, but
values 5-8 to select between automatic domestic, international, both, and
no roaming.  Without this, roaming is unintentionally disabled anytime the
"Mobile networks" setting screen is opened.

From CM9: I589c660fe3a1b9920cecfc7e6dc044f3f722fbb2

Change-Id: I6611822822f32cd132a1794e7ca11bf5f751994d
Phone:  fix runtime error when attempting enter setting

on non Sprint phones

Change-Id: I056d751efb427348da19009a8df960e8c36d9bb7
packages/apps/Phone: squashed clean up of NetworkSettings from CAF

fixes: "Searching..." dialog that does not get dismissed if screen times out
fixes: crash when starting a new search before the old one has finished

packages/apps/Phone: Dismiss previous dialog before updating network list

After the network list is updated, the previous
"searching" dialog needs to be dismissed
even if the activity is paused.

Change-Id: I96aeccdd936b411e6077afb0abd288dd753e0582
CRs-Fixed: 319580

Fix crash in trying manual search again before first search completes

Manual network search query and responses are not synchronous.
This leads to multiple responses being processed consecutively.
A dialog is cleared on receiving the first response
and subsequent responses through exception when attempting to dismiss
the same dialog. Ignore the exception thrown by
dialogs as it is not benign.

Change-Id: Icc092b093af04ddfb15b2e5b30ac123577eab05c
Crs-Fixed: 326736
phone settings: do not present duplicate operators to the user

filter out duplicates; use the operator numeric representation as the
criteria for finding duplicates since the numeric is what is actually
used when manually selecting an operator.

Change-Id: I71619a78d52d387bab938856ca6d0232105691cc
Phone: Disable accelerometer sensor while in-call and screen UI is off

During an active ongoing call, on targets that support proximity sensors,
there is an approximate spike in the current waveform in the order of
1 Hz. Krait is woken up frequently by the sensors even when the Screen UI
is off while in-call. This fix ensures that by disabling the listener
in such a scenario (In-Call + Screen UI turned off) there is no spike
in power consumption

CRs-Fixed: 336244

Change-Id: I076f4674e8368267393ab181491eaf41239b7b02
Phone: Prevent immediate screen-off after call-answer

Acquire the full wakelock with ON_AFTER_RELEASE flag to
ensure screen stays on for a little longer. Therefore
prevent immediate screen-off after call-answer

Change-Id: I834dff823bf2c2b4bbdd8993b5f618a20c1b8b90
CRs-Fixed: 400318
Merge tag 'android-4.1.2_r1' into jb-merge

Android 4.1.2 release 1
Option to disable voicemail notifications

commit b8ea8f0f555c245d721fd110891ef81df3e244e8
Author: Alex Avance <aravance@gmail.com>
tweaked for ICS
cherry-pick: 89dfeed83a38ebabedacca3f7529d576a99bb180

Change-Id: I936805cdb12dd390736221d45226df338bf859ee
Phone: Fix notification bug (Part 2/2)

This fixes the issue when the screen is off and
notification light doesn't fire up.

Change-Id: I421bfbd7cb167ced6e48dbbf3f3d01386bf99f23
Merge remote branch 'napodan/evervolv' into aosp
Phone: Fix notification bug (Part 2/2)

This fixes the issue when the screen is off and
notification light doesn't fire up.

Change-Id: I421bfbd7cb167ced6e48dbbf3f3d01386bf99f23