Change how we use provisioning url so post works

Needed to do an http post instead of a get for one carrier.
Do this by putting an auto-submitting form in the data to be
interpreted as a html doc by the browser.  The ACTION_VIEW
intent only works on http uri, but by specifying ACTION_MAIN/
CATEGORY_APP_BROWSER we could use data:text/html.

bug:11168810
Change-Id: Ifd33e1c3c7f9f40b6add39e446e6a7d7cde22549
Merge "Change how we use provisioning url so post works" into klp-dev
more sms provider docs

Change-Id: I1967446a9709d88625cbcbc89b70228744dbf38a
Fix bug in isOperatorConsideredNonRoaming

Mistakenly exits if the first check of many doesn't match.

bug:11136023
Change-Id: I04883d75f32214def360292c90b2f628c4e60991
Merge "more sms provider docs" into klp-dev
Few PIN/PUK fixes

Following changes have been made as part of this:
-> Changes done to display retry counter on wrong entry of
   PIN1,and message to indicate Code accepted/PIN1 blocked
   during PIN1 verification as per certain carrier requirements.
-> The current APIs that are used to verify the PIN and PUK only convey
   whether the operation succeeded or failed. As a result on ANY failure
   clients ask the user to re-enter the PIN.
   Add 2 new APIs that report the actual error code and returns the
   number of attempts remaing in case of failure.
-> FDN Service state was derived based on the state of PIN2. Update the
   state of FDN service based on the FACILTY_LOCK messages instead.
-> Change the default value of function getIccLockEnabled to false.
   When sim is deactivated/absent & user navigates to
   Settings->Security->Set up SIM/RUIM card lock,
   checkbox for "Lock Sim Card" option should be
   unchecked by default.
-> PIN1 can be changed only after enabling SIM lock. RIL returns
   REQUEST_NOT_SUPPORTED error if user tries to change PIN1 without
   enabling SIM lock.
   Handle the error and display appropriate message when trying to
   change PIN1 using MMI code.
-> Added MMI support for change PIN1/PIN2 and unblocking PIN2

Bug: 9928717
Change-Id: I73718c9e6a8aa7244097e0dd4593a6226ff0ac08
Telephony:  set default language of Canada as 'en'

The Canada SIM cards have the dual-IMSI functionality for the roaming
service. If it is working and the default system language is not set,
the system language can be changed by the MCC of the 2nd IMSI. So, the
default language should not be 'null'. This patch fills in the default
language of Canada as English.

Bug: 11361337
Change-Id: Iea6213e3ceca4a1cf054ebd9a13bb1d5574013b1
When phone changes update InBoundSmsHandlers and CellBroadcastHandlers.

Without this change for devices where the phone can change, for instance
on N5 with Sprint the phone will change from a GSMPhone to a CDMALTEPhone
and messages will not be sent to the appropriate handler.

For Sprint this was most readily seen when the voice mail notification
wasn't sent to the notification manager.

Bug: 11254397
Change-Id: Ia0e764cf6fa04208a7e194a35435f251a177309f
add SMS write permission for bluetooth package to support MAP profile.

bug:11415002
Change-Id: I177210e4139560b066ae40f100ca09ea35805359
Merge "When phone changes update InBoundSmsHandlers and CellBroadcastHandlers." into klp-dev
problem to send SMS message by bluetooth MAP profile.

Currently SMSDispatcher will add the message to Sms.Sent database
for all non default SMS application.
This won't work for Bluetooth MAP profile.
In the bluetooth MAP spec, at 5.8 PushMessageFunction,
there are a parameter to control how to send the message by Bluetooth MAP.
Transparent:This parameter may be used to indicate to the MSE(phone)
that no copy of the message shall be kept in the 'Sent' folder
after the message was sent. This is especially useful for telematics applications,
 e.g., frequent sending of car's speed and position for traffic measurements
(floating car data).
This application parameter is optional. The value of this parameter is "OFF"
(keep messages in 'Sent' folder) and "ON" (don't keep messages in Sent' folder).
If Transparent is "ON", we shouldn't put the message in Sent folder.
SMSDispatcher always put the message in Sms.Sent
which is mapped to the Sent folder in bluetooth MAP.
Prefer to let bluetooth to decide whether put the message in Sms.Sent based
on Transparent parameter value.

bug:11454636
Change-Id: I2e6c8deb5c4ed8bc9a3d90d492f4d4eb7dac7e5c
Telephony: Consider EF-SMS for both gsm and cdma

EF-SMS each record length is 176 for GSM and 255 for CDMA.
Consider proper length depending on phone type to avoid crash.
Spec Ref: TS 51.011 10.5.3 for GSM and C.S0023 3.4.27 for CDMA.
CRs-Fixed: 385474

Change-Id: Ia43d0ad0984da9855493e968ad9d046ae0fa7d02
(cherry picked from commit 9056e0750498ac8a8c42290d2dbdebbbb35f2d75)
(cherry picked from commit 13fe891e8e27c03793484b4bbb8d33b5c63739b8)
(cherry picked from commit b425bd894a3d4e1090587302c500755c72dcb547)
Telephony: Set RESULT tag properly when sending TR

While encoding terminal response, result tag is
always encoded with CR flag, although spec is not
clear on when to set CR flag, setting it always leads to
issues with some cards, hence set CR flag based on
CR flag in command details tag received from card.

Change-Id: Ia9a1334c9e1350e2e6cdaa66eb1e0673e5de9d46
CRs-fixed: 481803 356891
(cherry picked from commit 6aac3b2827d62c8a5297247c2af957a99ffd9a97)
(cherry picked from commit 917312567ac958d1740cdbb4454972f5aaab6dc7)
(cherry picked from commit 38c88f94f1a8890809813d6fbf933f1626fcd5c6)
Telephony: Managed Roaming feature re-design.

Add support to broadcast Managed Roaming intent.
When device is in manual network mode, if network rejects the
manual registration request with cause code "Persistent
location update reject", telephony broadcast this intent.

Change-Id: Ideadfb9320b057b332601dde0dc0305a2cb2905d
(cherry picked from commit 747624f61cc3cd5f3d259b6c68020388f2a63a27)
(cherry picked from commit e5454d0f03e8bc02aefb2cbe754b8a3533bcf4f0)
(cherry picked from commit 58efcb9e7241c0092a979d0250cb6676c13d9acd)
Add support CallBarring

Add support for CallBarring in the Phone App
CallBarring now supports the following
-Barr All Outgoing Calls
-Barr Outgoing International Calls
-Barr Outgoing International Calls except to Home Country
-Barr All Incoming Calls
-Barr Incoming Calls when Roaming outside the home country
-All Barring services

Change-Id: I6b69aaa422a06a8a839537ef658f24af32ace52c
CRs-Fixed: 520315
(cherry picked from commit 6180fa0ed7c598b43fe74c3ab85da35c771b9509)
(cherry picked from commit 8241883972952f120cba5cc1afcc13a5c497a61b)
(cherry picked from commit 61bd791952a6e4043dfae5414fee670640f1859c)
Use Data Radio Tech for concurrent voice and data support.

To determine concurrent voice and data support
we need to query Data Radio Tech.

Change-Id: I1fb43442e08915a7fff1cf2a5bcfb01d2a66a63b
CRs-Fixed: 505524
(cherry picked from commit dc86a90c2cde2e80fdec5fe26d7a13f6b475f322)
(cherry picked from commit f86deb32c3aa5cd73349f7142345c961258dedc0)
(cherry picked from commit 4afe1ddff73acad54e0bb068e85a6d099e356fbd)
Handle ICC IO error

Following changes have been made as part of this:
-> At present in Android all ICC Card states other than ICC
   PRESENT are treated as ICC ABSENT. Adding functionality
   to handle ICC IO error card state.
->IccCardProxy broadcasts card error intent when application index
  received from UIM is invalid(i.e.mUiccAplication is null) during
  initialization of card for fraction of time. As a result of which
  "Invalid Card" is displayed on UI momentarily.

  To fix this, When app index received from UIM is invalid broadcast
  "NOT_READY" intent.

Change-Id: I6489e5be0b64073c70bd12db645a4ac25b34af39
CRs-Fixed: 184479 399597
(cherry picked from commit dbc51a555f68d097a5dad9c54af88af8ba669721)
(cherry picked from commit fd68002b7b88e3132c7383b9eb2275b65d49e6d5)
(cherry picked from commit 6f29acdd155d1d99805d60aa3202b4d50d90d9fe)
Frameworks: Add ADN capabilities for CDMA phone

CDMA can support Abbreviated Dialing Numbers so add
CDMA in TelephonyCapabilities.

Change-Id: Ia33618d42664560f33bfa5b995b89cd030ee20de
(cherry picked from commit b52f52d1c2b3e5cb53a280bfdf4dc8ab807e6642)
(cherry picked from commit b0cb815ba965748b3e9a9057d870f19d4d786948)
(cherry picked from commit fa9d968223657f5a0830a3f1399cd317761d9e2a)
Move ConnectTimeReal to base class Connection.java

Move ConnectTime Real from derived classes GsmConnection
and CdmaConnection to Connection base class.
This gives the flexibility
to access ConnectTimeReal from different derived classes
using base class object.
This is needed to transfer time from ImsConnection
to CS connection for SRVCC.

Change-Id: I4f2a834f9df27514373de22a1c71d3923b66dc14
CRs-Fixed: 412754
(cherry picked from commit a8a1eb130bd51bcedad53f77fc31174f4b2cd3eb)
(cherry picked from commit a568c5244e70dd5f06bd073f48fe881f4c217edc)
(cherry picked from commit 737dda096eeee1fa5bbd30c9e324d1f73fdc68bf)
telephony : Support for voicemail in TP-UDH of SMS

Added support for processing special message indication
for voice mail in TP user data header for SMS
Spec reference: 3GPP TS 23.040 V6.8.1

CPHS method does not use message count.
0xff is used to indicate unknown message count for CPHS
Ref[Adapt requirement CDR-MWI-120, TC: GSM-BTR-1-4700]

Change-Id: I893252d5cacd5c1c8680a8ca6c3a6dba95ef3e1f
(cherry picked from commit ce64a3c4a4cd98931ae888dc3f6c45570bbc78f5)
(cherry picked from commit 3cc432cc2d3f8c44884ddc27b781d1a4e4d68c27)
(cherry picked from commit 9e80253570db3c519a26154a49461ba4a7f27f02)