2150 Commits

Author SHA1 Message Date
John Wang
b11ce4284e Show plmn in emergency call allowed mode.
When emergency call is allowed, plmn string is used to pass up the
"Emergency calls only" string. This change set showPlmn to true
in that situation regardless the SIMRecords.SPN_RULE_SHOW_PLMN value.

bug:7103854
Change-Id: I35ce0cc265d648191cb3b5f87261895f862143db
2012-09-12 16:46:41 -07:00
Jake Hamby
b35e4d778a Fix CDMA decoding of multipart UTF-16 SMS messages.
Recent changes to support CMAS over CDMA introduced a bug causing
an exception to be thrown when decoding multipart UTF-16 encoded
messages. This change fixes the exception by correctly subtracting
the header size from the number of bytes to decode. It also adds
more robust error handling to try to decode the maximum length
possible instead of throwing an exception if the length is still
larger than the user data length after subtracting the header.

This also fixes a bug in the encoder, which was padding the
UTF-16 user data to 16-bit alignment, which is incorrect (should
be padded to an 8-bit boundary). The code happened to work because
we always generated a UDH that was an even number of bytes
(including length) so the padding was a no-op. The decoder works
correctly.

Bug: 6939151
Change-Id: Iba9e7156bd7df94e972963959a7ce1c78464f7f5
2012-08-29 16:36:22 -07:00
Wink Saville
b44b13a3f5 Empty DC's apnList when the DC is free.
Not doing this causes DC.apnList's to have multiple entries in the
apnlist which causes DC's to look like its connected to both IMS and
INTERNET. And when selecting CDMA only mode on a Xoom we will not bring
up the connection thus no data connectivity.

Bug: 6939338
Change-Id: I17bc17cd1938ebac773db8131d12d0fa724348b0
2012-08-21 22:58:54 -07:00
Robert Greenwalt
41508f0544 Fix a logging NPE problem
bug:6864064
Change-Id: I3237e55cb164462b9616515b0de009bf687f1dca
2012-08-02 16:06:56 -07:00
Jake Hamby
7b661fb3fc Implement CMAS service category program results.
Correctly handle CDMA Service Category Program Data requests,
and send the SCPT response to the message center. Parcel SCPD
operations as an ArrayList instead of an array (current version
will throw ClassCastException when the array is cast).

Bug: 6853691
Change-Id: I949ea68891c78306059248832e59a593ab606e11
2012-07-24 17:31:05 -07:00
Wink Saville
bc8bab8949 Merge "Don't send terminal response without cmd details." into jb-dev 2012-07-24 08:27:03 -07:00
Jake Hamby
15c257eb8f Fix detection of CDMA cell broadcast messages.
The bIsServicePresent field of an incoming CDMA SMS RIL message
is not a reliable way to distinguish broadcast from point-to-point
messages on some RILs. Change CDMA SmsMessage.getMessageType() to
return MESSAGE_TYPE_BROADCAST when the service category is not 0,
and MESSAGE_TYPE_POINT_TO_POINT when the service category is 0.

Bug: 6853691
Change-Id: I0d44a8ce0bb295da5125271db90652570d655bc1
2012-07-23 14:42:33 -07:00
John Wang
aeffc933e9 Don't send terminal response without cmd details.
bug:6481578
Change-Id: Ie9f6e33c49307ddd884015a400f90e5477cc551e
2012-07-20 15:41:40 -07:00
Robert Greenwalt
7d551361d1 Fix our interpretation of apn setting's bearer.
Between ICS and JB we changed it to use TelephonyManager's network type
enumeration.  This changes it back to represent the RIL's radio
technology.  The only diff between the two is 13 and 14 are swapped,
so the change was causing problems with LTE and eHRPD.

bug:6830908
Change-Id: I85a7c8037f370f368e5cbf6dc2c9395c6889b541
2012-07-17 14:46:34 -07:00
Wink Saville
d224693027 Merge "Preserve retryCount when retrying." into jb-dev 2012-07-10 16:38:44 -07:00
Wink Saville
e87c71f8c1 Merge "When reconnecting disassociate dc and apnContext." into jb-dev 2012-07-10 16:38:09 -07:00
Wink Saville
829edb8a53 Fix country code for Netherlands Antilles.
Change the cc to "ai" from "nl" otherwise the timezone is
set to Netherlands which is +1 rather than the Caribbean
which is -4.

Bug: 6765706
Change-Id: Ie399efe95ce93b73eb4e60cfc47e621cce85e6e5
2012-07-02 12:26:21 -07:00
Wink Saville
68e66497e7 Preserve retryCount when retrying.
Bug: 6529189
Change-Id: I743aed08aa161d91899aeb2ccacffcd224e48c0a
2012-06-28 09:34:41 -07:00
Wink Saville
1157e1a8d4 When reconnecting disassociate dc and apnContext.
This is done in onActionIntentReconnectAlarm, which is called when
retrying after an error, by setting the ApnContext.DataConnection &
DataConnctionAc to null which intern clears the DataConnection.mApnList.

With the mApnList cleared DataConnection.mRefCount will not be incremented
because the DC will not be found by findReadyDataConnection. Thus fixing
at least one cause of 6529189.

Bug: 6529189
Change-Id: I40ff1966f6fbd2f69e97d77b9db7122e4c5b992f
2012-06-27 16:23:33 -07:00
Jake Hamby
0f40a51b20 Fix detection of CDMA CMAS cell broadcasts.
CMAS cell broadcasts do not necessarily set the message
priority indicator subparameter. Interpret the user data as a
CMAS message if the service category is in the CMAS range.

Includes a new test case in CdmaSmsCbTest to verify correct
decoding of an actual CMAS monthly test message.

Bug: 6506785
Change-Id: I2a26a5194a1a02e34c1ef862ff348e1571df51c4
2012-06-25 16:30:06 -07:00
Jake Hamby
004ff5ad2a DO NOT MERGE: Remove SMS shortcode warning feature.
Fix jb-dev build. The SMS shortcode warning feature has some usability
limitations which need to be resolved before shipping. Remove the code
for JellyBean. It will be added back to a future release when the
feature is complete.

Bug: 6605549
Change-Id: Ic8a68dc0b1ad038618962185f5ee680d5281ca21
2012-06-06 13:56:50 -07:00
Jake Hamby
b1fc08ca08 DO NOT MERGE: Remove SMS shortcode warning feature.
The SMS shortcode warning feature has some usability limitations which need
to be resolved before shipping. Remove the code for JellyBean. It will be
added back to a future release when the feature is complete.

Bug: 6605549
Change-Id: Ifb23d20f30199f242abb8bf7db015232a085c8e3
2012-06-05 12:21:02 -07:00
Jake Hamby
8367627f3a Allow apps with SEND_SMS_NO_CONFIRMATION to bypass short code check.
Change SMSDispatcher to bypass SMS premium short code confirmation
dialog when caller has "android.permission.SEND_SMS_NO_CONFIRMATION"
permission (instead of checking package name against hardcoded list).

This permission is only available to system apps or those signed with
the same certificates as those in the system image.

Bug: 6502817
Change-Id: I6098d448892cc5e842ba6dc10cf494295e7226af
2012-05-25 15:16:33 -07:00
Wink Saville
f19540a2d7 Add debug for tracking down connectivity issues.
bug: 6529189
Change-Id: I5dc4316ceacf48625f0839e0200b77a1e0984465
2012-05-24 15:44:01 -07:00
Kazuhiro Ondo
8f669f49fa Improve sim ready event handling for CdmaLte.
bug: 6463933
Change-Id: I751f760badb87c1fe4b78fd68921257cec4a4b9d
2012-05-21 14:09:17 -07:00
John Wang
45131d0c3b Merge "Only reset time from NITZ in zone fix." into jb-dev 2012-05-21 10:33:08 -07:00
John Wang
df7bbfd7c2 Only reset time from NITZ in zone fix.
When timezone property gets reset by mcc change, SST only adjusts time to
reflect new timezone settings if there is NITZ string w/o timezone.

bug:6465783
Change-Id: I1a27b3f371f79aa532de1c94ec5cb12285bdfdb4
2012-05-18 17:36:31 -07:00
John Wang
8834538a4e Change "uk" to "gb" in COUNTRY_CODES.
Since MccTable uses "gb" instead of "uk" for United Kingdom.

bug:6465783
Change-Id: Ifc2e2e7e72bd8405c698474d2ab9d01cb4ca006b
2012-05-18 17:16:12 -07:00
Jake Hamby
172d97edcd Enable SMS short code patterns to be updated from secure settings.
The premium SMS short code detector loads patterns from an XML resource
by default (frameworks/base/core/res/res/xml/sms_short_codes.xml).
Add support for updated patterns to be loaded on a per-country basis
from a secure setting named "sms_short_codes_" + the country code.
Updated patterns can be pushed to Google devices via Gservices.

Bug: 5513975
Change-Id: Ibfc0be4f12227ba45c28396ec7cdbc307442af81
2012-05-17 16:29:44 -07:00
Robert Greenwalt
2977286dde Merge "Log more RetryManager information." into jb-dev 2012-05-16 17:25:40 -07:00
John Wang
3a64109db6 Merge "Restore ready apns once voice call ended" into jb-dev 2012-05-16 17:15:51 -07:00
Robert Greenwalt
83daf6c5ae Log more RetryManager information.
6505637 had unexplainable behavior.  Add some logging so we can see
what's going on.

bug:6505637
Change-Id: I43c2ce7f8d12271d988b112f47589d0fba2b6955
2012-05-16 17:15:12 -07:00
yoonsung.nam
32eda207cd Restore ready apns once voice call ended
Currently GsmDCT does not setup default data if secondary APNs are
connected but default is disconnected. Sometimes retry alarm of default
expries during voice call but it's rejected due to voice calling and
eHRPD attached status.

Fix onVocieCallEnded() to restore all ready apns inclduing defautl
regardless of isConnected().

bug:6502005

Change-Id: I25db9be010cb588dfee51bdaf435f24055ecb431
Signed-off-by: yoonsung.nam <yoonsung.nam@samsung.com>
2012-05-16 17:00:23 -07:00
Robert Greenwalt
33961892a9 Don't start data-stall checks if not connected
We did this only if connected in most places, but screen-on/off didn't
care.  On no-radio devices it caused extra timers/wakeups that
didn't help anybody.

bug:6375908
Change-Id: Iba72da323de716acb0e67361b955c7381f18f67d
2012-05-16 15:34:46 -07:00
Jake Hamby
47509c744f Merge "Change SMS security check to enforceCallingPermission()." into jb-dev 2012-05-14 13:12:14 -07:00
Jeff Brown
7304c34382 Move power HAL interactions to PowerManagerService.
This refactoring sets the stage for a follow-on change that
will make use additional functions of the power HAL.

Moved functionality from android.os.Power into PowerManagerService.
None of these functions make sense being called outside of the
system server.  Moving them to the PowerManagerService makes it
easier to ensure that the power HAL is initialized exactly once.

Similarly, moved ShutdownThread out of the policy package and into
the services package where it can tie into the PowerManagerService
as needed.

Bug: 6435382
Change-Id: I958241bb124fb4410d96f5d5eb00ed68d60b29e5
2012-05-11 18:42:42 -07:00
Wink Saville
e9aa4b27af Merge "Add additional debug for time zone handling." into jb-dev 2012-05-10 23:05:54 -07:00
Wink Saville
26e1a02ba3 Add additional debug for time zone handling.
Change-Id: Ie46bba7e0ef7737a865f7efadbf963c2d14e488f
2012-05-10 16:23:39 -07:00
Robert Greenwalt
26ee989576 Fix some apn settings issues.
Correct some logging that was misleading and be more precise in our
removal of things from the waiting list.

bug:6445253
Change-Id: I97b20b851617149a24303276392de403dbde2a8f
2012-05-09 15:35:06 -07:00
Jake Hamby
6de4da4461 Change SMS security check to enforceCallingPermission().
The permission check for IccSmsInterfaceManager.sendText() was changed from
enforceCallingPermission() to enforceCallingOrSelfPermission() to enable the
Phone app to send SMS's directly for the "reply by SMS" feature. That feature
was implemented in a different way (handled by the MMS app), so the permission
check can be changed back to the original enforceCallingPermission(). Verified
that SMS can still be sent, including "reply by SMS" for an incoming call.

Bug: 4686733
Change-Id: If844a0c485de0a87857d8f82a3452e776005153e
2012-05-09 15:17:16 -07:00
Daisuke Miyakawa
e69ec2253c Remove STOPSHIP part of the logging in telephony
We still need the log itself to trap the exceptional case.

Bug: 6201805
Change-Id: I62d12f6a1ed41817ee12c0f5c7fc4aa0a967a60f
2012-05-09 11:44:58 -07:00
John Wang
290e1c9396 Set provider name in airplane mode.
Set eriText to correct provider alpha during power_off state.

bug:5262482
Change-Id: Ic72aaf0465cde6934a2b46d4b9520627ac0ac335
2012-05-07 16:41:29 -07:00
Wink Saville
1d7c1f1117 Rename isTimeZoneFixNeeded to shouldFixTimeZoneNow.
Change-Id: I01c73a0afaa17793f9dea1b78c9fe49fa138f787
2012-05-03 10:34:57 -07:00
Wink Saville
9a992450cb Merge "Time can become incorrect when no sim is present or mcc changes." into jb-dev 2012-05-03 09:35:27 -07:00
Wink Saville
f0f43227a7 Time can become incorrect when no sim is present or mcc changes.
bug: 6393147
Change-Id: I07ad74998b03af532ccf704a8a7e4844f5829b14
2012-05-03 09:26:25 -07:00
John Wang
6ac0471da7 Enable restart in getSpnFsm().
If the FSM gets restart while waiting for one of
SPN EFs results (i.e. a SIM refresh occurs after issuing
read EF_CPHS_SPN), it will re-initialize only after
receiving and discarding the unfinished SPN EF result.

bug:5499225

Change-Id: I715fc2feabdd03435903f7dcb785c8f0154619bc
2012-05-02 17:10:51 -07:00
Robert Greenwalt
4dafaf117e Fix data roaming notification.
We shouldn't tell people we're not connected due to roaming if it's really because
of data-disabled.

Use the data-disabled setting to decide if we should inform people about
data-discon due to roaming.  Note this doesn't effect other notifications about roaming.

Also fix the data-enable/disable code to take roaming into account and clear/set the
roaming notification as needed (if data is enabled while we can't get on due to roaming
we should put up the roaming notifcation..  if data is disabled while that notification is
up we should take it down).

bug:5805666
Change-Id: I5c925dfdca4abc27e0034b113508df5719f04fae
2012-04-30 10:59:56 -07:00
Robert Greenwalt
7725180c64 Prefer the preferred APN for all types it supports
We used to only prefer it when connecting for default connection purposes,
but it makes sense to use the preference for all apn types it supports.

bug:6377793
Change-Id: I8b26b77fc0787121749cce9d32303ab24cc72c75
2012-04-25 09:44:53 -07:00
Daisuke Miyakawa
0205537536 Add debug log for 5914560 and 6383850
This won't be shown in usual condition since in most cases the method
will just use the block just above the logging and return true/false
there. On the other hand this might be useful if the case is truely
exceptional and thus this path is really used.

Bug: 5914560
Bug: 6383850
Change-Id: I2242f93a9b905b5a39d997aa30d9fd6f5bfbdf49
2012-04-25 08:03:22 -07:00
Ye Jingjing
53eb13ce0a Set AuthType to NONE if username of APN is not set
When APN is edited, if authType and username are both not
set, authType should be set to NONE before setup of
data call.

The code today checks mApn.user for NULL, but if
user has edited APN the mApn.user field will be set
to an empty string.

Change the check of mApn.user to also take care of
this case.

Change-Id: I0e49247d46e1ba93da6dd951bbb75acc63fac73f
2012-04-20 12:04:34 -07:00
Jake Hamby
d65c2be548 Merge "Add ContentProvider for apps to read received SMS cell broadcasts." 2012-04-19 16:15:42 -07:00
Wink Saville
d38e766e5e Merge "Fix calcuation of CMD_TO_STRING_COUNT." 2012-04-19 09:53:52 -07:00
Wink Saville
01ce0ce472 Fix calcuation of CMD_TO_STRING_COUNT.
Change-Id: I03ae1a545474d7dcd4e65c58d9befd020d5b9c54
2012-04-18 21:42:44 -07:00
Jake Hamby
c3296ffdfc Add ContentProvider for apps to read received SMS cell broadcasts.
The CellBroadcastReceiver app will allow apps with the new permission
"android.permission.READ_CELL_BROADCASTS" to read previously received
cell broadcast messages from a new ContentProvider database at URI
"content://cellbroadcasts". This will enable third parties to provide
additional information to users in the event of emergencies without
delaying or interfering with the initial system alert dialog to warn
the user when the alert is received.

Includes a new android.telephony.CellBroadcastMessage class which
can be instantiated from the Cursor retrieved from the ContentProvider.
This was previously a part of the CellBroadcastReceiver app, but can now
be used by third party apps with read permission on the ContentProvider.

Change-Id: I2c31f62b63c050c7946de2d81c28a5f4dc6f00b0
2012-04-18 16:41:19 -07:00
Wink Saville
ecd302259a Revert "Telephony: Dynamically instantiate IccCard"
This reverts commit fe37acae729529b8bf3a3140fa397bddce42b1e0

There are two bugs that are weekend release blockers:

  b/6357558
  b/6357880

6357558 is easily fixed with:

  https://android-git.corp.google.com/g/#/c/182228/

But there are still questions. Bug 6357880 has
unknown causes at the moment but this change is the
most likely candidate. So for today's pre-weekend
build we are reverting this change.
2012-04-18 15:37:21 -07:00