2034 Commits

Author SHA1 Message Date
David Brown
158f116eb7 Fix a crash caused by SIP addresses containing "%40" instead of "@"
CallerInfo.doSecondaryLookupIfNecessary() was assuming that SIP addresses
would always contain the character '@', but that's not always true since
the username/domainname delimiter can actually be "%40" (the URI-escaped
equivalent.)

This would cause the in-call UI to crash if you ever called a SIP address
like "xyz%40example.com".

TESTED:
 - Make an outgoing call to the SIP address "xyz%40example.com"
   ==> The call ultimately fails, but the in-call UI no longer crashes when
       it first comes up.

Bug: 5637074
Change-Id: I62d15a7ccd509924d38b780b92e657b9efa26125
2011-11-17 15:39:21 -08:00
David Brown
85a80ba8cd am 19a57bde: am 1733a3de: Merge "SIP addresses containing "911" shouldn\'t be considered emergency calls" into ics-mr1
* commit '19a57bdedf3f9ccfa4d45cd35ef4b379853c6a81':
  SIP addresses containing "911" shouldn't be considered emergency calls
2011-11-17 15:12:54 -08:00
Robert Greenwalt
89d94e3550 am 795fcd07: am 33fe4a36: Merge "Fix TelephonyManager to grab the best context" into ics-mr1
* commit '795fcd07943ac1aaab309a4fa0d6bad1b67671a8':
  Fix TelephonyManager to grab the best context
2011-11-17 05:46:05 -08:00
David Brown
277b13e091 SIP addresses containing "911" shouldn't be considered emergency calls
This change updates isEmergencyNumberInternal() to always return false if
you pass in a SIP address, since the concept of "emergency numbers" is
only meaningful for calls placed over the cell network.

Previously we *did* try to compare SIP addresses against the list of known
emergency numbers, which caused bad behavior with SIP addresses that even
contained "911"/"112"/etc as a substring (since we were filtering out
non-dialable characters before doing the comparison!)

TESTED:

  - Before this change, calls to "abc911def@example.com" or
    "911abcdef@example.com" were incorrectly detected as emergency
    numbers, and fail.

  - After this change, SIP addresses like "abc911def@example.com" and
    "911abcdef@example.com" work fine.

  - Also, confirmed that this change doesn't break the restriction that
    3rd party apps shouldn't be able to make emergency calls.

    Specifically, I fired off ACTION_CALL intents (using the CallDialTest
    activity) for a bunch of numbers *similar* to emergency numbers, and
    confirmed that none of them actually resulted in an emergency call
    being placed.
    The specific ACTION_CALL intents I tested were:
      "911"         ==> Didn't place the call; brought up dialer instead
      "tel:911"     ==> Didn't place the call; brought up dialer instead
      "911@foo"     ==> Tried to start a SIP call (which failed)
      "911%40foo"     ==> Tried to start a SIP call (which failed)
      "tel:911@foo" ==> Tried to start a SIP call (which failed)
      "tel:911%40foo" ==> Tried to start a SIP call (which failed)
      "911@example.com" ==> Tried to start a SIP call (which failed)
      "sip:911"     ==> Didn't place the call; brought up dialer instead
      "sip:911@foo" ==> Tried to start a SIP call (which failed)
      "sip:911%40foo" ==> Tried to start a SIP call (which failed)

Bug: 5515452
Change-Id: I6f9f8690b08564c53c7a76f480654477b475d94d
2011-11-16 21:14:11 -08:00
Robert Greenwalt
33fe4a36b7 Merge "Fix TelephonyManager to grab the best context" into ics-mr1 2011-11-16 12:06:53 -08:00
Robert Greenwalt
8f4f814beb Fix TelephonyManager to grab the best context
It may not be called from an app so the app context may not exist.
Check and grab the best one.
Also remove the log that nobody paid attention to if the constructor
is called again from the same process.  One context seems to be as
useful as another.

bug:5572369
bug:5622514
Change-Id: Iad23b30c7c8fe5b8d1f81a1e060eaf0cd0e3019d
2011-11-16 11:36:08 -08:00
Jake Hamby
ac62c901b7 am 0f2dec50: am bd783684: am 7d4046e9: Merge "Fix 3GPP SMS send failure for 7-bit national language tables." into ics-mr0
* commit '0f2dec5033919fab77a2b52bb3cf33cf4975f2c9':
  Fix 3GPP SMS send failure for 7-bit national language tables.
2011-11-15 20:24:45 -08:00
Jake Hamby
bd7836846c am 7d4046e9: Merge "Fix 3GPP SMS send failure for 7-bit national language tables." into ics-mr0
* commit '7d4046e9b7b95e1d5de12a54109b44d8305a6fdc':
  Fix 3GPP SMS send failure for 7-bit national language tables.
2011-11-15 20:16:12 -08:00
Jake Hamby
87d14a1756 Fix 3GPP SMS send failure for 7-bit national language tables.
Fix a NullPointerException when sending a single-part SMS containing
characters in one of the enabled national language tables.

Also added a few log messages for several error cases to help with
debugging any future problems in the SMS dispatcher.

Bug: 5553544
Change-Id: I61c1cbe297b2e222027f0db7c833df6a03c2974a
2011-11-14 18:30:01 -08:00
John Wang
196c215a8b am 6504d74b: am 72a31ab9: Merge "[maguro] Fix STK issues" into ics-mr1
* commit '6504d74b8f7b98f7c2d5fb550042c644510d5f34':
  [maguro] Fix STK issues
2011-11-14 12:14:09 -08:00
dujin.cha
e81932e92a [maguro] Fix STK issues
1. Fix Bug 5574160 (Abnormal Setup menu)
2. Fix Bug 5558273 (GetInkey issue)
3. Fix BUg 5558612 (No default alpha id)
4. Fix Vodafone UK ALS issue.

Bug : 5574160, 5558273, 5558612

Change-Id: Ief74d0e4f4f28dff7a435e9dab1fab1ca1d9bfaf
Signed-off-by: dujin.cha <dujin.cha@samsung.com>
2011-11-14 10:46:19 -08:00
Wink Saville
2f87ca01c7 am 99d858b0: am a092ba56: am e562287c: Merge "[maguro] Update COMPREHENSION-TLV parser in CAT" into ics-mr0
* commit '99d858b04b27b51e346fb5d3860e6953cee64ecd':
  [maguro] Update COMPREHENSION-TLV parser in CAT
2011-11-10 19:39:27 +00:00
Wink Saville
407f8973bd am f1633291: am 08b3ffe6: am 16ee60a5: Merge "Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes." into ics-mr0
* commit 'f1633291aa13ee1bd210a38e007b9e133c178f37':
  Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes.
2011-11-10 18:51:11 +00:00
Wink Saville
a092ba5667 am e562287c: Merge "[maguro] Update COMPREHENSION-TLV parser in CAT" into ics-mr0
* commit 'e562287c85662457864255028cd4bc3b04f13750':
  [maguro] Update COMPREHENSION-TLV parser in CAT
2011-11-10 15:22:35 +00:00
Wink Saville
e562287c85 Merge "[maguro] Update COMPREHENSION-TLV parser in CAT" into ics-mr0 2011-11-10 07:20:55 -08:00
Wink Saville
08b3ffe611 am 16ee60a5: Merge "Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes." into ics-mr0
* commit '16ee60a5ae0336a46a417a72bca64a1a04b0fce2':
  Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes.
2011-11-10 03:42:09 +00:00
Wink Saville
16ee60a5ae Merge "Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes." into ics-mr0 2011-11-09 19:39:39 -08:00
Wink Saville
6fc3ca7e19 Increase DATA_STALL_ALARM_DELAY_IN_MS_DEFAULT to 6 minutes.
Initially set to 3 minutes this raised the standby current
by 12.5% so changing to 6 minutes.

Bug: 5534004
Change-Id: I602f5fe4de35d0db2dbacf0c615c300c57dd2d0d
2011-11-09 18:53:08 -08:00
Wink Saville
f08455451c [maguro] Update COMPREHENSION-TLV parser in CAT
1. Fix the ClassCastException while handling spec out 'Setup menu'
   -Ghana MTN simcard and JDI simcard sends abnormal 'setup menu'cmd.
   -Those 'setup menu' is spec out.
   -At the end of the proactive cmd,extra bytes '0x00 0x00 0x00 0x00' is
   followed.
   - That cause ClassCastException and phone crash.

Bug: 5574160
Change-Id: Ieafb6c4efd94bb4e2a39a04612a6761c958654bb
Signed-off-by: dujin.cha <dujin.cha@samsung.com>
2011-11-09 17:31:34 -08:00
David Brown
17fe6c8d07 am 6e82e95c: am b6b44cef: am 59882fb8: Merge "Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()" into ics-mr0
* commit '6e82e95c08bd1e2c46837e9ddb8759e5ca977f84':
  Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()
2011-11-10 01:11:37 +00:00
Jeff Sharkey
629cb84fda am cef1300e: am f3882914: Merge "Make policy data enabled flag static." into ics-mr1
* commit 'cef1300ebd6bc88e93ee1420e5fec359531533d2':
  Make policy data enabled flag static.
2011-11-09 21:51:35 +00:00
Jake Hamby
7aa2376609 am 2c6539e8: am fee5f29b: Merge "Fix exception when sending multi-page SMS with Turkish characters." into ics-mr0
* commit '2c6539e83ea80c62ee1a299fb686b4bdf043bfa7':
  Fix exception when sending multi-page SMS with Turkish characters.
2011-11-09 21:18:56 +00:00
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
Jeff Sharkey
cef1300ebd am f3882914: Merge "Make policy data enabled flag static." into ics-mr1
* commit 'f3882914e668501ee1dabd42207ed18348050c14':
  Make policy data enabled flag static.
2011-11-09 14:36:53 +00:00
Flavio Lerda
228a1af213 Merge "Adding two tests to ensure formatNumber is working correctly with Polish numbers, both valid and invalid." 2011-11-09 02:13:41 -08:00
David Brown
59882fb8e0 Merge "Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()" into ics-mr0 2011-11-08 18:25:30 -08:00
Jeff Sharkey
3f3115b277 Make policy data enabled flag static.
For devices with both CDMA and GSM stack, ConnectivityService only
connects with the GSM variant.  Making this flag static communicates
the policy state between all DCT.

Bug: 5586935
Change-Id: Iff0384027303470dd382d5173558d2d091ce4bf6
2011-11-08 17:15:46 -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
Jake Hamby
2c6539e83e 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-08 22:02:49 +00: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
John Wang
f885e87884 Remain in call audio mode while phone is offhook.
While offhook, even the call is on hold, setAudioMode() remains in
MODE_IN_CALL (or MODE_IN_COMMUNICATION for SIP) rather than
switching back to NORMAL.

bug:5546901
Change-Id: I0189dc010d1109895cc38e17b1b80418445d514a
2011-11-07 15:45:18 -08:00
Shaopeng Jia
21aff6bd90 Adding two tests to ensure formatNumber is working correctly with
Polish numbers, both valid and invalid.

Change-Id: I5f3bfc34cd5b88526853c0da0aa299a77e8f1901
2011-11-07 11:30:14 +01:00
Wink Saville
9ca0f12227 am e4ca9242: Fix the build.
* commit 'e4ca92421cc07c2f7f152b774dd1ac7a8944028b':
  Fix the build.
2011-11-04 11:59:29 +00:00
Wink Saville
8b77124395 am 3d708451: Merge "Separate data stall detection and recovery from net stats." into ics-mr0
* commit '3d7084519b03da0681da13fb8d7d4a0914d11646':
  Separate data stall detection and recovery from net stats.
2011-11-04 11:59:25 +00:00
Wink Saville
e4ca92421c Fix the build.
Needed to update EventLogTags.logtags

Change-Id: Ie7d13e012c52778892167380f4fd273f67bb7d62
2011-11-03 23:16:55 -07:00
Wink Saville
2861d23d66 Separate data stall detection and recovery from net stats.
Also use the AlarmManager instead of messages so the delays
are consistent whether sleeping or not.

Bug: 5534004
Change-Id: I24118b30214dddf8183c1200a89555d6c528e606
2011-11-03 18:52:58 -07:00
Jake Hamby
e3a31d0340 am 31d157ba: Merge "Fix bug in enabling/disabling SMS cell broadcast activation." into ics-mr0
* commit '31d157bad27e4ecbe415f6f581946b6da7cc2ba3':
  Fix bug in enabling/disabling SMS cell broadcast activation.
2011-10-28 02:14:08 +00:00
Jake Hamby
f044a370d4 Fix bug in enabling/disabling SMS cell broadcast activation.
When enabling/disabling SMS cell broadcast channels, we were not calling
setGsmBroadcastActivation() with the correct value after updating the
message IDs. It should be called with true if any message IDs are enabled,
or false if the list is empty.

Added an isEmpty() method to IntRangeManager, and moved the call to
setGsmBroadcastActivation() in SimSmsInterfaceManager to the end of the
enableCellBroadcastRange() and disableCellBroadcastRange() methods,
where it sets the correct value using the new isEmpty() method to test
if there are any message IDs enabled after updating the range list.

Bug: 5525441
Change-Id: I7d1ebd54dacf1de20910947efbf5e87e1957fd1a
2011-10-27 17:23:09 -07:00
Ed Heyl
e49cf107e2 merge ics-mr0
Change-Id: I4f0b2bb1b1136c9467e9d55f57f5333153cae65d
2011-10-25 20:47:51 +00:00
Wink Saville
cd3ec73f0c Add getAvailableNetworks.
To allow a operator test to pass we need to manually select
a network. Therefore getAvailableNetworks needs to be implemented
on CDMALTEPhone so that RIL_REQUEST_QUERY_AVAILABLE_NETWORKS is
sent to the RIL/radio.

Bug: 5420630
Change-Id: I8e138b211d42755399a9e30f3e45dde2f579401e
2011-10-24 11:10:36 -07: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
Jake Hamby
094854091b Add new RIL requests to support SIM data download via SMS over IMS.
On an LTE device where incoming SMS messages over IMS are sent to
the framework via RIL_UNSOL_RESPONSE_NEW_SMS responses sent to
the RIL, it may be necessary to process USIM data download SM's
(message class 2). This requires the RIL to implement two new requests.

1) RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS:
   send an ENVELOPE command to the UICC, receiving the SW1 and SW2
   status bytes in addition to the command response.

2) RIL_REQUEST_SMS_ACKNOWLEDGE_WITH_PDU:
   send an RP-ACK or RP-ERROR acknowledgement to the incoming SM,
   including an acknowledgement PDU containing the envelope response.

Change-Id: If597a14fa8c4780c75da84fa96c49abcb05960f2
2011-10-20 16:31:28 -07:00
Wink Saville
b7219108c2 Merge "Non-default link should be cleaned up on telephony db change." 2011-10-19 16:27:32 -07:00
Wink Saville
3119b96098 Non-default link should be cleaned up on telephony db change.
Fixed onApnChanged method to handle multiple APN scenario.
Non-default links also needs to be cleaned up once telephony db
is updated.

Bug: 5333303
Change-Id: I6d8d2b4e2f5b07ebf0e22669c910e4ebaddfe392
2011-10-19 15:42:19 -07:00
Wink Saville
7d50525511 Do not always say OTASP_NOT_NEEDED for LTE.
Do not override CdamServiceStateTracker#getOtasp as we
should report the "real" status as OTASP can be needed
for LTE.

Bug: 5413788
Change-Id: Ia34c9e1169bfc9682f81f9c4935eb2853507bd04
2011-10-19 12:39:28 -07:00
Robert Greenwalt
09cd10c7e2 am dd466152: Merge "Initialize Hipri correctly." into ics-mr0
* commit 'dd466152dd1b88f7b5bd73c47715eb84b76e6dab':
  Initialize Hipri correctly.
2011-10-18 14:31:47 -07:00
Robert Greenwalt
dd466152dd Merge "Initialize Hipri correctly." into ics-mr0 2011-10-18 14:29:50 -07:00
Wink Saville
7a0390b97c am 07848843: Merge "Add DataConnection#isEmergency and use in trySetupData." into ics-mr0
* commit '07848843b23e10e4728fa779cc79fc38a341cf6b':
  Add DataConnection#isEmergency and use in trySetupData.
2011-10-18 13:38:09 -07:00