1997 Commits

Author SHA1 Message Date
Wink Saville
f4ae6aabbc Allow CDMA on LTE devices to get data connections even if otasp is needed.
Bearer Independent Protocol (BIP) connections as defined in
ETSI TS 102 223 "Smart Cards; Card Application Toolkit (CAT) (Release 11)"
need to be able to establish data connections even when not provisioned.
This can occur when trying to provision on via and EVDO network.

Bug: 6110632
Change-Id: I85722e0ba2e2606ffcf2516b8f00be6ff5271adf
2012-03-10 13:23:35 -08:00
Robert Greenwalt
c8711ca7eb Merge "Stop using shared DUN APN when tethering stops." into ics-mr1 2012-02-14 13:38:15 -08:00
Robert Greenwalt
2384386f31 Stop using shared DUN APN when tethering stops.
Backported from master, including a bug fix and a cdma enhancement.

Even if other people are sharing the connection (ie, carrier wants
default and tethered traffic on the same APN) stop using a carrier-
described APN when the tethering stops.

bug:5972599
Change-Id: I25e4831855e6b62c0c3ab3a6f4d4846aaee6ac50
2012-02-14 11:44:09 -08:00
Robert Greenwalt
8d27f20ac2 Add a config to set Dun capabilities.
Since CDMA doesn't use APN settings there was no place to say what a cdma
device's DUN connection would support, so by default normal device
originating traffic would be blocked on a tethering single-connection device.

With this change you can (via overlay) say that it supports everything
so mms and on-device browsing/email will still work even when on a dun connection.

The reason to allow both: some carriers will charge per byte for dun access
and so they don't want lots of non-tethering traffic used (costs the user alot)
but other carriers just use a dun connection to limit access to tethering, but
once there give unlimited data, so it makes sense to support everything there.

bug:5972599
Change-Id: I78fd7f3ac63c51a0560b659ed5ec219b10a93f8d
2012-02-14 11:29:36 -08:00
John Wang
7c70cefcae Don't use SNR in the invalid check.
Since some RILs use -1 instead of INVALID_SNR as invalid vlue for
LTE SNR, SignalStrength will not use LTE SNR to check if LTE valid.

bug:5970403
Change-Id: Ia948e076f8f5878e081e87680076b187857879c8
2012-02-06 14:03:57 -08:00
John Wang
5e39519396 Use LTE SNR and RSRP to set signal level bar.
The LTE signal strength level is the smaller one
between lte rsrp level and lte snr level if both
rsrp and snr are valid.

The lte snr mapping are

  Four  bars: SNR >= 45
  Three bars: 10 <= SNR < 45
  Two   bars: -30 <= SNR < 10
  One   bars: SNR < -30
  No    bars: No Service

The invalid value of lte snr is changed to INVALID_SNR
from -1, since -1 is a valid value of lte snr.

bug:5640958
Change-Id: If26aaba0c7fcc0fee3db488b5adfa02922f06715
2012-01-31 11:15:28 -08:00
John Wang
2c911b2416 Adjust the LTE signal bar mapping.
The new mapping are

  Four  bars: RSRP >= -95dBm
  Three bars: -105 dBm <= RSRP < -95 dBm
  Two   bars: -115 dBm <= RSRP < -105 dBm
  One   bars: RSRP < -115 dBm
  No    bars: No Service

bug:5640958
Change-Id: I9efabaeac33b624ea0a58a4d3760169dff6544f6
2012-01-27 11:05:24 -08:00
Wink Saville
1e6329d454 Use new preferredAPN URI avoiding onApnChanged() call with self-change
Solving the issue that setting preferred APN from GDCT triggers
back APN change event and force unnecessary data call disconnects
and setups.

The new URI is added in Telephony Provider so ContentObserver
callback (results in onApnChanged) will not be triggered.

Bug:5448858
Change-Id: I4c0bcf32cec69cf1d0a0430f7a27495b89e93625
2012-01-17 11:31:54 -08:00
Robert Greenwalt
2fceb7fec0 Fix teardown of secondary connections on CDMA
Restores functionallity from Gingerbread.  We should tear down when the
enabledcount goes to zero, but we should always notify and attempt to
switch back to default when indicated.

bug:5830081
Change-Id: Ib8469bb5369da21e8cc05fb755b2d7e24c8e02a6
2012-01-12 17:38:54 -08:00
John Wang
6ad68ba9d9 Adjust the mapping of LTE signal bars.
bug:5640958
Change-Id: I91efc5a81b505aae59dac9b1d69314efaffda6b6
2012-01-11 14:47:19 -08:00
Wink Saville
17907a7b74 Fix an RuntimeExcpetion in GsmDCT.onDataSetupComplete
Instead of throwing an exception when the connection between
the DCT and a DC is broken (i.e. its null) it is treated as
an error with a new cause. And thus will be handled as other
typical errors.

Bug: 5798643
Change-Id: I46f1660ae78f118b54ab62504809723ca302b2ef
2012-01-05 17:21:46 -08:00
Wink Saville
c697ebfdd6 Merge "Enhancement on ICS data stall polling logic" into ics-mr1 2012-01-04 13:53:25 -08:00
Wink Saville
d4d3516812 Merge "Add support of dislaying Alpha tag for BIP commands" into ics-mr1 2012-01-04 13:50:04 -08:00
Kazuhiro Ondo
7efb89b955 Enhancement on ICS data stall polling logic
Put enhancements on data stall polling logic in ICS so that
stall recovery can kick in earler while screen is on.

Bug: 5767897
Change-Id: I4683fc45c0161f4374749c8e5840261c19a48f77
2012-01-04 11:09:51 -08:00
Wink Saville
81fa7f305b Add support of dislaying Alpha tag for BIP commands
While BIP data call setup is still handled in RIL/Modem,
this patch is adding support of Alpha tag display on UI.
Alpha tag is optionally included in "OPEN Channel", "Close Channel",
"Send Data" or "Receive Data" command.

"Open channel" will be notified via RIL_UNSOL_STK_PROACTIVE_COMMAND
which requires TERMINAL RESPONSE based on user input.
"Close channel", "Send Data" and "Receive Data" commands
are send via RIL_UNSOL_STK_EVENT_NOTIFY just to display
transient notice.

Bug:5165510
Change-Id: I873e55274c860886bc816ce6fb07cb882d339214
2012-01-03 15:06:15 -08:00
Kazuhiro Ondo
6de972a5c3 Support suggestedRetryTime in CDMA DCT
Support suggestedRetryTime in SETUP_DATA response in CDMA DCT.

Bug: 5740832
Change-Id: I4abd884bec76f1d9ee29d1ba36c7ea2cac9e0fb3
2011-12-20 17:04:52 -08:00
Wink Saville
975d348c18 When the SIM_READY set current preferred network type.
This looks to fix a problem where the nv_data.bin file
file gets corrupted. When greping a radio log for "md5" if something
like following is seen:

  RIL(s)  : load_md5_state: MD5 state 1
  RIL(s)  : check_md5:
  RIL(s)  : compute_md5: path /efs/nv_data.bin
  RIL(s)  : check_md5: MD5 fail. orignal md5 '628647a8e5c6cac2d586199417c0103c' computed md5 '58a635cbaf5fe4ffb2797aeaa2b32709' (rild)
  RIL(s)  : check_md5:
  RIL(s)  : compute_md5: path /efs/.nv_data.bak

It means that corruption was detected and a back version was used
which is ok. Apparently that backup version can have the default
network type revert to 2G only thus causing the symptoms reported
in b/5695729 where after taking an OTA 2G becomes the default.

By calling setCurrentPreferredNetworkType when the sim is ready we
can reset the the network type to 3G.

Note: I also tried calling setCurrentPreferredNetworkType in
EVENT_RADIO_AVAILABLE but that didn't work and we would see
the response to setPreferredNetworkType failing as the ril wasn't ready.

  RILJ    : setCurrentPreferredNetworkType: 0
  RILJ    : [0004]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 0
  RILJ    : [0004]< REQUEST_SET_PREFERRED_NETWORK_TYPE error: com.android.internal.telephony.CommandException: RADIO_NOT_AVAILABLE


Bug: 5695729
Change-Id: Ibbd29cda0b201a8c08f4dcfa5cec211611e1d599
2011-12-07 20:07:54 -08:00
John Wang
ca0a68cc8a Merge "Correct the dialing number of structured MMI." into ics-mr1 2011-12-07 18:49:28 -08:00
John Wang
2690817815 Correct the dialing number of structured MMI.
According to TS 22.030 6.5.2 "Structure of the MMI", the dialing number
can not end with #. The format is like *SC*SI#DN. Correct the mmi pattern
to exclude DN# case. With this fix, processCode() will tread *NNN#DN#,
e.g. *400#16 digit number# in bug 5622718, as USSD and send via
RIL_REQUEST_SEND_USSD.

bug:5622718
Change-Id: Ifc8d0edff4308602a5f3fc651cf116bf6bad3cbc
2011-12-07 16:38:56 -08:00
Robert Greenwalt
d4420ab2fb Trim leading zeros from ipv4 addrs.
Underlying libraries will interpret leading zeros as octal values and
fail.

bug:5262995
Change-Id: Iff949225bb6b941f7274ee81754e1f41ed719a6c
2011-12-07 09:58:48 -08:00
Robert Greenwalt
7cb88dda5b Be careful sharing connections when dun is in play
A request for a DUN connection should only use the carriers requested dun connection.  Don't
share another connection unless it matches the carriers settings.

bug:5701374
Change-Id: I75a65fcfce1b218bd9ca4ce2ab85cbe850813321
2011-12-02 16:42:18 -08:00
Robert Greenwalt
645c80654f Fix state synchronization problem.
Don't report that we're disconnected immediately if we're disconnecting when another
disconnect comes in.  Remove this behavior from the default handler and add a catch
all "yeah, we're disconnected already" to the inactive state.

bug:5568633
Change-Id: Iff7ccde2069b47f8ad8255f3bca0292b80041388
2011-11-30 15:07:30 -08:00
John Wang
b74ecb1d45 Fix a build break.
Change-Id: I2a9ceaace02f442c5e36fa8425b051116c81e76f
2011-11-23 16:26:13 -08:00
John Wang
9b1080091c Check watingApns before access it.
bug:5663125
Change-Id: I66275fafd316f318f9035ac11c16a30fcb32f7c8
2011-11-23 14:26:38 -08:00
Robert Greenwalt
eaeb4f4e3c Merge "Fix some policy-base routing issues." into ics-mr1 2011-11-23 11:25:39 -08:00
Robert Greenwalt
e83d181606 Fix some policy-base routing issues.
Secondary nets sometimes come up with no routes, but parsing errors end up with null
routes getting added.  Trim that away.  Also added some dumpstate logging of the secondary
route tables and rules.

bug:5615697
Change-Id: I94c9d888bab958df44891b9117236436e046cc7f
2011-11-23 09:36:16 -08:00
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
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
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
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
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
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
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
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
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