77 Commits

Author SHA1 Message Date
David Brown
b6b44cef94 am 59882fb8: Merge "Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()" into ics-mr0
* commit '59882fb8e0ba7c47b780d62c9a9c46b63d779677':
  Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()
2011-11-09 16:41:20 +00:00
Jake Hamby
9c5c97f618 am fee5f29b: Merge "Fix exception when sending multi-page SMS with Turkish characters." into ics-mr0
* commit 'fee5f29b22f99bd2891fb2af54669f20832fb851':
  Fix exception when sending multi-page SMS with Turkish characters.
2011-11-09 16:40:59 +00:00
David Brown
59882fb8e0 Merge "Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()" into ics-mr0 2011-11-08 18:25:30 -08:00
David Brown
1a811695f9 Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()
The phone app needs a way to distinguish between (a) numbers that are
definitely emergency numbers, and (b) numbers that *might* result in an
emergency call being dialed, but aren't specifically emergency numbers
themselves.

(The phone app needs this distinction in order to enforce the restriction
that 3rd party apps should not be allowed to make emergency calls using
the ACTION_CALL intent, while still making sure that the in-call UI only
displays the "emergency call" state for numbers that are *definitely*
emergency numbers.  See bug 5493790 for the full details;)

So this change adds a full set of "isPotentialEmergencyNumber()" methods
to go along with the "isEmergencyNumber()" methods we've had all along.
The "potential" variants behave identically to the original methods,
*except* that they ultimately use number.startsWith() rather than
number.equals() when comparing against the list of emergency numbers.

TESTED:

- Unit test 'PhoneNumberUtilsTest#testIsEmergencyNumber' passes.
  (The PhoneNumberUtilsTest class doesn't pass in its entirety, but it was
  broken before this change also.)

- Also see the commit description of change
  Ib949fea3c0ce6b341a90e617a03ba3f22c69018b for the exact tests I ran
  against the phone app.

This change should be submitted along with
  Change-Id: Ib949fea3c0ce6b341a90e617a03ba3f22c69018b
in apps/Phone (but this change must go in first to avoid breaking the
build.)

Bug: 5493790
Change-Id: Ic528cfcc555734cdaf4ca8a18a50199771ba49b1
2011-11-08 15:51:50 -08:00
bi4004.lee
141da403c0 Fix exception when sending multi-page SMS with Turkish characters.
- Precondition: config_sms_enabled_single_shift_tables is configured as
   1 (Turkish) in frameworks/base/core/res/res/values/config.xml

 - Cause: There is no consideration for National Language Shift Tables in
   SmsMessage::fragmentText function.

 - Solution: The header length is calculated properly according to
   National Language Shift Table

 - modified to add test cases and fix calculation bug (jhamby@google.com)

Bug: 5553544
Change-Id: I9eaefbbd6b3d75f8c41cbf9d0cb03a701cfa1cb3
2011-11-07 18:03:45 -08:00
Jake Hamby
ac09d2af14 Add support for SMS-PP data download to USIM.
Devices supporting IMS may receive SMS-PP data download messages
which are normally handled in the radio baseband. Add support to
framework for these messages, passing the data to the UICC and
sending the response data as part of the SMS ACK.

Change-Id: I1da76982c6f8c402f82a6f535591e614f4e0de18
2011-10-21 16:43:24 -07:00
Jake Hamby
4db49b33b8 Add wrapper classes for UICC service tables.
The USIM application on the UICC contains an EF for the USIM service table,
a byte array containing a bit field of available services on the USIM.

IccServiceTable is an abstract class to manage a byte array containing a
service table and map it to human-readable enum values defined in the
subclass, e.g. UsimServiceTable. The availability of a service can be
tested with isAvailable(), which is implemented in the subclass to take
an enum, e.g. UsimService, as a parameter, and passes the ordinal to the
generic isAvailable() in the parent. IccServiceTable also provides a
toString() method that returns a human-readable list of enabled services.

The ISIM application for IMS contains a similar ISIM service table.
This can be supported with a new IsimServiceTable class in the future.

Change-Id: I9c3134672ed306e297dd35d633235cffca510aad
2011-10-20 17:50:47 -07:00
Flavio Lerda
2613e0064b Do not format numbers starting with hash or star.
If the user asks to format a number that starts with either a hash or a
star symbol, do not further format the phone number since we are not
actually able to parse such a number correctly and current this results
in the star or hash being dropped.

Bug: 5362177
Change-Id: Iff8d317c087d0ca07f2b107459ce8c47882ef367
2011-09-27 13:53:23 +01:00
Shaopeng Jia
c6027ee464 Temp fix to the problem of incorrectly classifying Brazilian local
numbers as emergency numbers.

Bug: 5247602
Change-Id: Ib1626ef25ced2e149c526601bfac72de39e3f1b9
2011-09-22 23:22:56 +02:00
Robert Greenwalt
11fed2b218 Merge "Add OTADM feature for Verizon requirement. - GsmDataConnectionTracker.java <in function createApnList> : modify parameter type for new ApnSetting. (carrierEnabled has changed to boolean from integer, BEARER has changed to integer from string). <in function createAllApnList> : modify telephony db query statement using carrierEnabled. (carrier_enabled: 1 enable apn, 0: disabled apn) <in function buildWaitingApns> : modify apn management code when current RAT (radio access technology) is LTE or EHRPD. add internal function named needToCheckApnBearer to check current RAT is LTE or EHRPD. - ApnSetting.java : add two member variable (carrierEnabled: apn enable/disable , bearer : Radio Access Technology) - Telephony.java : add two static string CARRIER_ENABLED & BEARER. - ApnSettingTest.java : add two assertEquals in function assertApnSettingEqual. add CARRIER_ENABLED & BEARER parameters." 2011-09-14 13:41:10 -07:00
sinikang
723facc20b Add OTADM feature for Verizon requirement.
- GsmDataConnectionTracker.java
  <in function createApnList>
  : modify parameter type for new ApnSetting.
    (carrierEnabled has changed to boolean from integer,
     BEARER has changed to integer from string).
  <in function createAllApnList>
  : modify telephony db query statement using carrierEnabled. (carrier_enabled: 1 enable apn, 0: disabled apn)
  <in function buildWaitingApns>
  : modify apn management code when current RAT (radio access technology) is LTE or EHRPD.
    add internal function named needToCheckApnBearer to check current RAT is LTE or EHRPD.
- ApnSetting.java
  : add two member variable (carrierEnabled: apn enable/disable , bearer : Radio Access Technology)
- Telephony.java
  : add two static string CARRIER_ENABLED & BEARER.
- ApnSettingTest.java
  : add two assertEquals in function assertApnSettingEqual.
    add CARRIER_ENABLED & BEARER parameters.

bug: 4991683
Change-Id: I9450c220009c3093b1e09e8ac9cd0faa0a975067
2011-09-14 08:27:43 -07:00
Shaopeng Jia
9683f990a2 Adding isEmergencyNumber which also takes in a defaultCountryIso.
Also update CallerInfo and CallerInfoAsyncQuery to use the new method.

Bug: 5247602
Change-Id: I2bbb0806ad2787d53b19bc1e9bdfb0ee8be26980
2011-09-13 16:10:08 +02:00
Daisuke Miyakawa
3746f2d914 Use upper case country codes in Country.java
Previously external/libphonenumber accepted lower case
country codes (e.g. "us") but now it doesn't for performance reason.
Actually ISO 3166-1 doesn't allow lower cases, so we should not rely
on them.

Need to fix unit tests for PhoneNumberUtils, as it implicitly
relies on the previous behavior.

See also I3a3e6db84ed0d24290b1be19651fa9a82de4cc39

Bug: 4941319
Change-Id: If16f6531f274a0faf5e28724854409ca9b00a669
2011-06-27 15:20:46 -07:00
Jake Hamby
22165bb54a am ae62b7b0: resolved conflicts for merge of 66040bbb to gingerbread-plus-aosp
* commit 'ae62b7b0bca9c46dea30ee81a7aada3e7576638b':
  Fixes for SMS Cell Broadcast support.
2011-06-07 16:32:10 -07:00
Jake Hamby
ae62b7b0bc resolved conflicts for merge of 66040bbb to gingerbread-plus-aosp
Change-Id: Id13750bc01c977ab06accf8ceabc95fe5dee703a
2011-06-07 16:24:15 -07:00
Jake Hamby
66040bbb08 Fixes for SMS Cell Broadcast support.
Add support for ETWS primary notification messages.
Add method for easy concatenation of GSM multi-part broadcasts.
Add test cases for SmsCbHeader, SmsCbMessage and IntRangeManager.

Change-Id: Ifc646a011e79ad6c7eace9afcf84b1216eb42b7a
2011-06-06 18:56:20 -07:00
Jean-Baptiste Queru
59242cf65e am 54ab72e1: am 038e8f99: Merge "Adding support for parsing of SMS-CB pdus in UMTS format."
* commit '54ab72e1c389905adb074bd7c799a33b4f513679':
  Adding support for parsing of SMS-CB pdus in UMTS format.
2011-06-06 11:33:52 -07:00
Jean-Baptiste Queru
038e8f9984 Merge "Adding support for parsing of SMS-CB pdus in UMTS format." 2011-05-25 08:06:17 -07:00
Jake Hamby
ee60f3fb1b resolved conflicts for merge of 18cc814c to honeycomb-plus-aosp
Change-Id: I2b569ada3baec2dc486296623063bc2b504c5e96
2011-05-10 15:52:15 -07:00
Jake Hamby
18cc814c94 am 4d53cb02: Merge "Enable support for SMS national language shift tables." into gingerbread
* commit '4d53cb02168fe35104d7e644dd9b3efd8ca4c91b':
  Enable support for SMS national language shift tables.
2011-05-05 13:31:03 -07:00
Jake Hamby
b49a73dfc4 Enable support for SMS national language shift tables.
Add support for encoding and decoding SMS 7 bit user data using the
national language shift tables defined in 3GPP TS 23.038 (GSM/UMTS only),
including the new tables added in Release 9 for Indic languages.

Decoding is always supported, but encoding is only enabled for the
specific language tables added to the new integer array resources
"config_sms_enabled_single_shift_tables" and
"config_sms_enabled_locking_shift_tables" defined in
frameworks/base/core/res/res/values/config.xml. The default empty arrays
should be overridden in an OEM overlay for the specific nationalities where
SMS national language shift table encoding is allowed/mandated (e.g. Turkey).
GsmAlphabet.countGsmSeptets() will try to find the most efficient encoding
among all combinations of enabled locking shift and single shift tables.
If no 7 bit encoding is possible, 16 bit UCS-2 encoding will be used.

This change also fixes a bug in the decoder: when an escape septet
is followed by a septet with no entry in the extension (single shift)
table, TS 23.038 Table 6.2.1.1 states that the MS shall display
the character in the main GSM 7 bit default alphabet table, or the
active national language locking shift table. Previously, we were
decoding this sequence as a space character. Two consecutive escape
septets will continue to decode as a space character, according to
Note 1 of table 6.2.1.1.

Change-Id: I4dab3f0ffe39f3df2064ed93c9c05f26e274d18b
2011-04-06 14:20:04 -07:00
Ramesh Sudini
074f83515f Do not merge: ApnSettings: Removal of Enabled, Class and Inactivity Timer.
Bug: 3479209
Change-Id: I08b30c4868a12342221b6428eca8ffbb08f2b22a
2011-03-14 12:39:01 -07:00
Wink Saville
9d7d62801d Do not merge: Revert the revert of "LTE Changes for Telephony including Multiple PDN support and IPV6 support"
This reverts commit eca208fae6d1b6ae9c8c0e42eee092e86dbddbb7
and is the first of the LTE commits in master being back ported
to the LTE branch.

Change-Id: I17d4a1b779ed74bc7dfb409d2c1a30f60fdb27c7
2011-03-14 12:25:04 -07:00
Lorenzo Colitti
362da50989 am b028ce55: Merge "Add a protocol property to the APNs and use it." into gingerbread
* commit 'b028ce55cac88f1778cdad59c63c52a5b66afb69':
  Add a protocol property to the APNs and use it.
2011-03-03 17:07:56 -08:00
Wink Saville
eca208fae6 DO NOT MERGE: Revert "LTE Changes for Telephony including Multiple PDN support and IPV6 support"
This reverts commit 2b8bcfe5b74e1a34d136f4ff46e3c94397f38f82.

Change-Id: Ifc4e9aaccb54e065a36380710694cd6e4d347636
2011-03-03 09:53:52 -08:00
Lorenzo Colitti
3c4e929cfd Add a protocol property to the APNs and use it.
1. Database changes:
   - Add a protocol and a roaming_protocol column to the
     carriers table in the telephony provider database.
   - Set the protocol and roaming_protocol fields when
     creating APN objects from the database.

2. ApnSetting class changes:
   - Add protocol and roamingProtocol fields to the
     ApnSetting class that encapsulates APN settings within
     the framework.
   - Add the fields to ApnSetting.toString and support a new
     syntax containing the fields in ApnSetting.fromString.
   - Add a unit test for ApnSetting.

3. Telephony changes:
   - Specify the APN protocol when setting up a data call,
     using protocol when not roaming and roaming_protocol
     when roaming.

This change depends on #86896 in the telephony provider,
which adds the new column to the database schema on
upgrades.

Bug: 3333633
Change-Id: If3d9ed4c851d0192849df0d64581db03b066e052
2011-02-28 11:17:05 -08:00
Wink Saville
2b8bcfe5b7 LTE Changes for Telephony including Multiple PDN support and IPV6 support
Added init for CDMAPhone.java

Change-Id: I2392b5ad3382ee1993537b8477ef00dd036c6fe9
2011-02-24 18:23:36 -08:00
Lorenzo Colitti
8e63c3e33b Add a protocol property to the APNs and use it.
1. Database changes:
   - Add a protocol and a roaming_protocol column to the
     carriers table in the telephony provider database.
   - Set the protocol and roaming_protocol fields when
     creating APN objects from the database.

2. ApnSetting class changes:
   - Add protocol and roamingProtocol fields to the
     ApnSetting class that encapsulates APN settings within
     the framework.
   - Add the fields to ApnSetting.toString and support a new
     syntax containing the fields in ApnSetting.fromString.
   - Add a unit test for ApnSetting.

3. Telephony changes:
   - Specify the APN protocol when setting up a data call,
     using protocol when not roaming and roaming_protocol
     when roaming.

This change depends on #94983 in the telephony provider,
which adds the new column to the database schema on
upgrades.

Change-Id: Ic4e3f02e48f17990f657187b9919d265671f0138
2011-02-03 15:19:13 -08:00
Henrik Hall
4f95b1250f Adding support for parsing of SMS-CB pdus in UMTS format.
This enables RIL to dispatch pdus in both GSM or UMTS format.
The RAT that was used will be transparent to clients.

Change-Id: I57c53ec79496d274e18b3fee196551af97c0857d
2011-01-11 10:44:11 +01:00
Erik Zivkovic
aad6f806c5 Support for KSC5601 on SIM.
Korean phones write to the ADN record of the SIM in a non-standard way.
When UCS2 is not used, the alphaTag will be written in the KSC5601
encoding. This contribution adds support for reading that format when
a Korean SIM card is used.

Also adds support for KSC5601 in SMS.

Change-Id: I81a4a6949359b4d23a937ac2d813bafed2b85ff6
2010-12-21 10:26:48 -08:00
Jean-Baptiste Queru
8503144665 resolved conflicts for merge of 8484e57f to master
Change-Id: I6a8cc70250fd2be9a1e9a728940a1e9f5721a653
2010-11-22 16:43:59 -08:00
Jean-Baptiste Queru
8484e57f30 resolved conflicts for merge of e4ae7fc3 to gingerbread-plus-aosp
Change-Id: I2e0a0ed622bc4c32d79936b30ebbf9068b3bdee8
2010-11-22 16:32:34 -08:00
Henrik Hall
95bc625e29 Enabling cell broadcast (SMS-CB) support in the platform.
Adding a simple API enabling applications to control SMS-CB reception.
Implementing parsing, assembly and dispatching of SMS-CB messages over GSM.

Change-Id: Iee841605a45a3af60c7602af175056afb03a38da
2010-11-19 15:00:00 +01:00
Irfan Sheriff
ed4f28b492 Set country code in the driver and remove channel set
With dual band support, using country code
settings is the way to go

Bug: 2936741
Change-Id: I760dce4c43b1af19ee205c28f0d287420c8d9e85
2010-11-02 16:35:56 -07:00
Wink Saville
fd2d013027 Add PhoneStateListener.onOtaspChanged.
Bug: 3102320
Change-Id: I46e8d33a4ed80e5e074e92135653d57598d4c865
2010-11-01 11:46:57 -07:00
Xia Wang
a5496cd28c resolved conflicts for merge of d4e3bf4d to master
Change-Id: I41c0ae2b3f557f84b25c39e247894f66a4e7e702
2010-10-12 11:05:54 -07:00
Jean-Baptiste Queru
cf88cf878b am 15f7ff3c: Merge "Fix compile errors in telephony tests"
Merge commit '15f7ff3c5a0a99f75b6c0babdc1d44e4b8aab39f' into gingerbread-plus-aosp

* commit '15f7ff3c5a0a99f75b6c0babdc1d44e4b8aab39f':
  Fix compile errors in telephony tests
2010-10-11 15:32:12 -07:00
Jean-Baptiste Queru
15f7ff3c5a Merge "Fix compile errors in telephony tests" 2010-10-11 15:11:59 -07:00
Xia Wang
d4e3bf4d03 am c8511af0: Merge "Add mock ril control commands and tests" into gingerbread
Merge commit 'c8511af04a442551a204b1f47fabb317bcf54be0' into gingerbread-plus-aosp

* commit 'c8511af04a442551a204b1f47fabb317bcf54be0':
  Add mock ril control commands and tests
2010-10-11 10:32:04 -07:00
Xia Wang
ffcb68719b Add mock ril control commands and tests
Add mock ril controller commands and test cases:
 - testStartIncomingCallAndHangup: test start incoming cal and hangup remote
 - testSetCallTransitionFlag: test call transition flag and call state transition

Change-Id: I25ff8ef7931159ef7101b5e8638b9b7438db4f66
2010-10-10 15:01:31 -07:00
Xia Wang
d185494da6 am e1c8e388: Merge "Port mock ril controller and tests to GB. DO NOT MERGE" into gingerbread
Merge commit 'e1c8e38834dffbeaeacbbe0490a5eae45b54db8b' into gingerbread-plus-aosp

* commit 'e1c8e38834dffbeaeacbbe0490a5eae45b54db8b':
  Port mock ril controller and tests to GB. DO NOT MERGE
2010-10-07 15:47:27 -07:00
Xia Wang
afeeaf351a Port mock ril controller and tests to GB. DO NOT MERGE
Change-Id: Ie58236ecb8648d026356610f429054cb46b8640b
2010-10-07 11:34:46 -07:00
John Wang
7e36e0c3b7 Merge "Fix SimUtilsTest after changing in bcdToString." 2010-09-09 13:39:43 -07:00
Sang-il, Lee
b55df4471e Support MBCS characters in contacts and SMS messages that are stored in SIM cards.
Change-Id: I0438c5748a47512fc2a0e4b89ac85e30e3f5c6de
2010-09-09 13:23:42 -07:00
John Wang
4214c6d707 Fix SimUtilsTest after changing in bcdToString.
After changes in IccUtils.bcdToString() to ignore high nibble 'F'

(see change #55090), the testBasic() need to be changed accordingly.

Change-Id: If52a66b1c80b5d16af5bd3f431284e79012be300
2010-09-08 18:04:35 -07:00
Bai Tao
2a4e96067d Added new method to format the phone number when neccessary.
Change-Id: I90fb38c1d36dc1ccf7eaa3b4cc34cd29f5151493
2010-08-30 10:52:15 +08:00
Xia Wang
0dde515777 Merge "Add setRadioState to MockRilController and the corresponding test case. Add test case for setRadioState command in Mock Ril" 2010-08-18 09:45:45 -07:00
Jake Hamby
a774f5817b resolved conflicts for merge of 31202b1a to master
Change-Id: Ia8ae32c5ebcd13843ed9cc82c80bf551b38e586f
2010-08-16 14:42:01 -07:00
Jake Hamby
31202b1a40 am 3f442ece: Merge "Fix character count bug and Javadoc typos in SMS (with test cases)" into gingerbread
Merge commit '3f442ece257d416b48f7803a4cc263f0215faa0d' into gingerbread-plus-aosp

* commit '3f442ece257d416b48f7803a4cc263f0215faa0d':
  Fix character count bug and Javadoc typos in SMS (with test cases)
2010-08-13 15:19:11 -07:00
Jake Hamby
17f616823a Fix character count bug and Javadoc typos in SMS (with test cases)
Fix a character count bug I discovered while working on related SMS
bugs. Includes a new set of test cases to verify the fix for the
buggy calculateLength() methods ("runtest frameworks-telephony").

You can also verify that the counter works properly in the Mms app
by typing characters until the boundary is crossed where an
additional message part is required. The counter should count down
to 0 characters remaining before increasing the message count.

Change-Id: I4de68b82dfc53dcae094865798f2c0235a355d43
2010-08-13 14:01:31 -07:00