402 Commits

Author SHA1 Message Date
Robert Greenwalt
61c082603f Futher reduce the logging of EriManager.
There was another log statement that was poluting radio logs.

bug: 2180891
2009-10-13 13:53:22 -07:00
Libin Tang
febb94cdbb Make standard roaming indicator display indications configurable
Allow the ERI overlay file to specify the text for any built-in strings.
Currently only the hard-coded strings are used for those.

Bug: 2170881
Change-Id: I5d6169696a4558e62587585e17f908f823c54a2b
2009-10-12 14:13:04 -07:00
Robert Greenwalt
71f48a21b0 Reduce the amount of EriManager Logging.
It was filling the radio log with noise.  Added a VDBG set to false to preserve the logging
but deactivate it.

bug: 2180891
2009-10-12 12:13:14 -07:00
Robert Greenwalt
98e0b146b8 Make PhoneStateListeners not call TelephonyManager
Since the StatusBarPolicy is run in the System Process and shouldn't therefore call into
the Telephony process we decided to make sure all the needed info was passed along with the
original notifications.

bug: 2173053
2009-10-09 00:54:31 -07:00
Tammo Spalink
61aac7b377 Add PERIOD char to CDMA address sugar list.
Addresses issue:
http://buganizer/issue?id=2164455
2009-10-05 14:20:06 +08:00
John Wang
99510681e9 Unhide constant DATA_ACTIVITY_DORMANT. 2009-10-01 10:00:54 -07:00
Dianne Hackborn
29e4a3c566 Update from API review.
Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
2009-09-30 23:21:02 -07:00
Robert Greenwalt
984d22b180 Revert setDataEnabled to setting a master switch.
This is independent of whether or not the ConnectivityManager wanted any particular APN on
and allows us to track the two seperately - so when data is re-enabled we don't turn
things on that CM wants off.

bug: 2158290
2009-09-30 16:36:12 -07:00
Naveen Kalla
27d074e0ef Telephony: Add a failure cause for CDMA call failures and rename
RIL_REQUEST_CDMA_VALIDATE_AKEY to
RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY

Add failure cause for CDMA call failures due to access blocked by the
CDMA network. Rename RIL_REQUEST_CDMA_VALIDATE_AKEY to
RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY. This change needs to go in
with the corresponding change in ril.h (1141)
2009-09-29 15:41:14 -07:00
Robert Greenwalt
c46c255f7f Fix the reporting of ActiveApnTypes on CDMA
Previous fix limiting what was reported active was too strict, leading to
DISCONNECTED messages not being accepted (apn list was empty).

bug: 2151520
2009-09-29 13:23:45 -07:00
Android (Google) Code Review
22cbf51ef5 Merge change I49fbfc68 into eclair
* changes:
  Add PhoneNumberUtils.compare() method that uses a resource to determine strictness.
2009-09-29 13:43:17 -04:00
Android (Google) Code Review
ac5bd144f1 Merge change Ib23e57cf into eclair
* changes:
  Set roaming based on both data and voice.
2009-09-29 13:26:06 -04:00
Evan Millar
db1f499398 Add PhoneNumberUtils.compare() method that uses a resource to determine strictness.
Change-Id: I49fbfc683f7089f052671b567ad3e19203a568f0
2009-09-29 08:38:07 -07:00
Robert Greenwalt
59ceeae4ec Fix the reporting of ActiveApnTypes on CDMA
Previous fix limiting what was reported active was too strict, leading to
DISCONNECTED messages not being accepted (apn list was empty).

bug: 2151520
2009-09-28 21:04:22 -07:00
John Wang
37b80ee451 Set roaming based on both data and voice.
In GSM network the data roaming (from +CGREG) and the voice roaming (from +CREG) could be different. Set GSM roaming based on both data and voice roaming status and set it true if either indicates roaming.

This solves the unwanted roaming billing issues and respects the download roaming setting in systemUpdater, DownloadProvider, and MMS downloader. For more details refer to bug 2052473.
2009-09-28 18:53:16 -07:00
Robert Greenwalt
e436d46e57 Fix Cdma re-start of default connection.
We dropped an onTrySetupData call because onEnableNewApn calls that automatically on GSM,
but CDMA was not doing anything.  Made CDMA simply call onTrySetupData.

Also, isApnTypeActive for CDMA was returning true even when no data was working.  Changed
to report true when initing or connected, like GSM.
2009-09-27 14:55:37 -07:00
Robert Greenwalt
d1aca6aa73 Fix ConnectivityManager's handling of apn switch.
It was clearing the interfacename when it was needed later in the process - the prevented us
from clearing the route to private dns servers and clearing the flag that this was set.
Consequently future uses would not set the private dns servers (since it thought they were already
set) and our lookups would fail.

bug: 2146929
2009-09-25 16:43:20 -07:00
John Wang
fb2b04b7bc Unhide NETWORK_TYPE_XXX.
Make NETWORK_TYPE_HSDPA etc. unhide in TelephonyManager.
2009-09-25 14:50:26 -07:00
johnwang
9c118c80fd Update CID in NeighboringCellInfo
NeighboringCellInfo works in GSM and UMTS network.

In GSM network, the locaiton value is the combination of LAC and CID.

In UMTS network, the locaiton value is PSC code.

NeighboringCellInfo should access and store those two values seperately.

It involves the change of Public API.

1. Add new API getRadioType(), getLac(), and getPsc() to get location info in GSM and UMTS.

2. Deprecate setCid() and NeighboringCellInfo(int cid) because cid is set by interpreting network type.
2009-09-25 12:17:46 -07:00
Peng Zhu
694bd8bf73 Add null check at isEmergencyNumber().
Change-Id: I7eca1ba1ce42e02c7506a7d969e4865778bb49cc
2009-09-24 18:02:37 -07:00
jsh
70f8faf4ec Print IMEI/MEID in dumpsys.
Helps with debugging.
http://b/issue?id=2133066
2009-09-24 13:03:55 -07:00
Tammo Spalink
3cc97f8dbc Add Phone.getPhoneType() operation.
This routine returns integer values defined in the Phone interface,
derived from RILConstants values.  Direct references to the
RILConstants are replaced by references to these new ones for
consistency.

API CHANGE:
  unhide TelephonyManager.PHONE_TYPE_CDMA

Addresses issue:
http://buganizer/issue?id=1905415

Change-Id: Icfec6d457231b098c031677a66770b5e57be4a44
2009-09-24 13:19:08 +08:00
Yong Zhang
e4e8e4d4f2 Resolve race conditions with disconnect of CDMA data and airplane mode
Specifically, wait for data to be deactivated when setPowerStateToDesired()
is called during data activation.

Bug: 2101430
Change-Id: Ia97dd799f779c3f88f66bc1235e7a65958e1e04f
2009-09-21 15:31:09 -07:00
Android (Google) Code Review
8451c25b91 Merge change 26171 into eclair
* changes:
  Fix several CDMA call collision cases
2009-09-21 13:50:27 -04:00
Wink Saville
b14300140d Fix several CDMA call collision cases
1. Continous ringing after receiving a call waiting while in a call,
and before user answers the call waiting, the 1st call drops.  If another
MT call comes in, while it rings, it also drops, the phone will keep
ringing.

2. Data call is not re-initiated if emergency MO call collides with an MT call.

Bug: 2123287
Change-Id: I6b12a900ec60b478691544ab5326eac4952ce834
2009-09-21 09:25:45 -07:00
Wei Huang
02b5948a43 make PhoneNumberUtils.compareLoosely use MIN_MATCH of 7 instead of 5.
Change-Id: Id4a08c3834b727e253ab189293d5715ffbbe8f35
2009-09-20 21:13:45 -07:00
John Wang
bbd754b8fe Add ring back tone notification.
Some networks may not play ring back tone, RIL will send UNSOL ringback notification.

Apps can register for ring back tone msg and play tone to user for receiving ALERTING message.

The return value indicates to play or stop ring tone.
2009-09-20 13:40:38 -07:00
Daisuke Miyakawa
9a24bc563f Implement compareStrictly() using phone_number_compare() written in C.
As per several discussions, we stick to the default behavior now.
In stead, we provide compareStrictly() as a hidden method, so that some
internal components are able to use the method if needed.

Since these are static methods, they cannot refer to the configuration files,
whose values can be obtained only via Resources object.

Please make callers' side if you want to use strict version of compare().

Internal issue number: 1892808
2009-09-19 14:44:02 -07:00
Nicolas Catania
338c48554f Moved the toString method in the parent Connection class.
Beefed up the output to get more info in the logs about
a connection.
Personal data is only logged at debug level.
2009-09-19 07:48:06 -07:00
jsh
001d0abd3e Fix potential ArrayIndexOutOfBoundsException.
When parsing an SMS message as email, extractEmailAddressFromMessageBody()
checks parts.length >= 1, but then proceeds to access parts[1] (which
may not exist).  Instead, check for parts.length >= 2, and treat
parts.length = 1 as non-email.

b/2122698
2009-09-18 15:31:10 -07:00
Android (Google) Code Review
6286f311c3 Merge change 25810 into eclair
* changes:
  Fix pause-wait dial string conversion error
2009-09-18 17:02:56 -04:00
Libin Tang
963558b0f3 Fix pause-wait dial string conversion error
Resolves these specific cases:
- 8475766800;,1234
- 8475766800,;1234

Both of these should be converted to 8475766800;1234

Change-Id: Ic329007a3a6e99b1dd55cd8cdec7239dd734c3ca
2009-09-18 11:30:05 -07:00
Robert Greenwalt
aad261730c Fix typo in SECONDARY_DATA_RETRY_CONFIG
The parser doesn't like ';'.

bug: 2130639
2009-09-18 11:23:58 -07:00
Mike Lockwood
1b90def3c6 telephony: Add CdmaCellLocation class to the public API.
Its twin sister GsmCellLocation is public, so this really should be in the SDK too.

Change-Id: If6f5899047546a7398f1e4191c67acf15555c21b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-17 19:23:15 -04:00
Satish Roddom
ea803b8e0c Message Reject notification shouldn't be shown in Emergency Calling Mode
Issue: While in emergency mode, if we receive a message, there is a notification
being shown as "Text Message rejected".

Fix: In CdmaSMSDispatcher.java, send RESULT_OK response instead of RESULT_SMS_GENERIC_ERROR
for messages during Emergency mode. So, that SMS_REJECTED action is not broadcasted.

If the result is RESULT_OK from CdmaSMSDispatcher, the function notifyAndAcknowledgeLastIncomingSms()
is not called from SMSDispatcher.java and hence SMS_REJECTED_ACTION intent is not broadcast.
Consequently SMSRejectReceiver.java will not receive the broadcast and will not show reject
notification.

Change-Id: I2aa8f239393b3e6eeac6b0c2bb69799018e9ae9d
2009-09-17 11:59:47 -07:00
Android (Google) Code Review
8460be7a57 Merge change 25535 into eclair
* changes:
  CDMA Check for network duplicate sms
2009-09-17 14:53:45 -04:00
Christian Gustafsson
9d34319f1c CDMA Check for network duplicate sms
In some cases a sms acknowledgement might be lost. The network will then resend
the same sms. These duplicate sms should be acknowledged but not shown to the
user.

C.S0015-B  4.3.1.6 Unique Message Identification.

The fields used to identify a message are:
* Message Identifier,
* Originating Address,
* Originating Subaddress, and
* Message Center Time Stamp.

Since some of the fields are optional, the Teleservice Layer shall use as
many of the fields as are present in the SMS message to determine message
uniqueness. Mobile stations should discard repeated messages.

1. Add a fingerprint function to SmsMessage.java. This returns a byte array
   to be used as a unique identifier. Parts that make up the identifier are
   the originating address, teleservice id and the bearerdata. Using all of
   the bearerdata saves parsing time. There are no random bits allowed in
   the standard. This makes binary comparison possible. Using all of the
   bearerdata accounts for the message id, smsc timestamp and "... shall
   use as many of the fields as are present in the SMS message".
2. Have CdmaSMSDispatcher.dispatchMessage() pull a fingerprint and check if
   it matches the last acknowledged fingerprint. When it matches return and
   signal that message was handled.
3. Have CdmaSMSDispatcher.acknowledgeLastIncomingSms() take the last
   dispatched fingerprint move it to the last acknowledged fingerprint.
   Only do this if processing of the sms was successful.

Change-Id: If79f8fe40896cd290940b7ccd5a17531ab937b60
2009-09-17 10:36:05 -07:00
Nicolas Catania
60d45f0f03 Added a field to track if the call is to a voicemail instance.
Refactored common code between CallerInfo and CallerInfoAsyncQuery that deal
with voicemail number comparison.

In CallerInfo.java added a new field mIsVoiceMail to indicate this is a
voicemail call.
Added a new method to convert the CallerInfo into a VM instance.
Added a new method to generate a debug string from an instance.

PhoneNumberUtils has a new method "isVoiceMailNumber" to check if a number
is a VM one. I left the method as hidden. Previously any security exception
failure was cached in a static variable. I removed that and
privilege the optmistic scenario. I am not sure if the security exception
is only for the 'regular' telephony layer and if it applies if a 3rd party
VM app is installed (e.g googlevoice), hence i removed the cashing to make
sure we can pick up new voicemail providers when installed/enabled/disabled.

Bug:2112640
2009-09-16 11:11:05 -07:00
Android (Google) Code Review
d9e28017f6 Merge change 25092 into eclair
* changes:
  New field in CallerInfo to cache if the call is an emergency one.
2009-09-15 22:11:57 -04:00
Nicolas Catania
e22415817f New field in CallerInfo to cache if the call is an emergency one.
Fixed a bug in the sync call, the photo resource was not set to picture_emergency.

Added tests to check the correct emergency fields are set in the caller info instance.

Bug 2112640
2009-09-15 18:33:34 -07:00
Libin Tang
2189daf50c Fix call collision issue
This patch is to fix the call collision issue between an MT call
and an MO call causing the MT call screen shown with the MO call info.
The fix is to add the condition of foreground call to determine the
call collision on top of the pendingMO call only.

Bug ID: 2116865
Change-Id: I73aa310d39ebea97e6183281821bf941b5890ccf
2009-09-15 16:02:00 -07:00
jsh
50f7ea53c3 Some SMS logging improvements.
Use Log.isLoggable() to enable logs at runtime.  Implement SmsResponse.toString()
so we can see what's returned.

Hopefully helps with debugging b/2086832.
2009-09-15 13:11:25 -07:00
Christian Gustafsson
70f74b79c3 Assemble WAP datagram correctly when segments arrive out of order
The WAP assembly code will always attach the last received segment at the end
of the WAP datagram. Change the code to add the current segment at the correct
location during the WAP datagram assembly.

Change-Id: I4cc18bf33bc68ab9a328a0107f21e3670b5026ac
2009-09-15 10:57:15 -07:00
Android (Google) Code Review
53793416d4 Merge change 24662 into eclair
* changes:
  Fix URI returned by IccProvider.
2009-09-14 20:30:43 -04:00
Android (Google) Code Review
a28948d754 Merge change 24754 into eclair
* changes:
  Handle secondary APN connect failures.
2009-09-11 20:53:43 -04:00
Robert Greenwalt
89bd269975 Handle secondary APN connect failures.
Without this we'd only try a secondary APN once and the stop silently, leaving
no APN connected.

Adds a second retry manager with configuration strings to do a more approriate
retry.  Don't retry secondary apn forever.

On permanent failure or retry count hit, we send a Phone.REASON_APN_FAILED
disconnect status.

bug: 2112114
2009-09-11 17:35:50 -07:00
Android (Google) Code Review
b942db35c5 Merge change 24773 into eclair
* changes:
  Fix NPE in TelephonyManager.
2009-09-11 18:26:02 -04:00
johnwang
5f1f26a7ff Fix NPE in TelephonyManager.
It is for bug 1971628 but affects almost every API function in TelephonyManager. When phone is not ready (for example, after crash and restart) the getSubscriberInfo and getITelephony returns null and causes NPE.
2009-09-11 14:49:47 -07:00
jsh
12f413d29e Fix URI returned by IccProvider.
insert() had a typo in the URI it returned.

b/2113186
2009-09-10 22:59:11 -07:00
Tammo Spalink
d304ae583d Fix CDMA SMS delivery status reporting.
CDMA SMS status reports are messages with bearer data message type
DELIVERY_ACK.  Identify these messages after parsing during demux,
update the deliveryPendingList and generate a RESULT_OK intent in the
same manner as GSM.

Addresses issue:
http://buganizer/issue?id=2047571

Change-Id: Ia38718b0bb169a0f3398f50c27a95e8bce7e4c99
2009-09-11 13:42:31 +08:00