369 Commits

Author SHA1 Message Date
Robert Greenwalt
0badd0b700 Note net availability even when apn not enabled
Fixes a problem where mms apn was on when we lost the network (airplane mode) but mms was
off when airplane mode was turned off so it kept thinking we didn't have access and
future mms always failed.

bug: 2075145
2009-08-24 17:41:49 -07:00
Dianne Hackborn
4a51c20ce6 I am getting tired of the java doc warnings, so fix them.
Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
2009-08-24 17:37:32 -07:00
Wink Saville
55c6f8881f Fix missing break statement found by Motorola. 2009-08-22 22:48:46 -07:00
Android (Google) Code Review
7b0cdc8890 Merge change 22362 into eclair
* changes:
  Fix +NANP issue and cleanup plus code conversion.
2009-08-21 17:05:24 -07:00
Guo-Bin Zhang
1cef22890d Disable data call in emergency call
Same change as 79ef673d56e2599932b8b7f13695d23b4df54d09 rebased
2009-08-21 17:02:49 -07:00
Li Zhe
ebe66345e7 Framework changes to support HSDPA/HSUPA/HSPA
HSDPA: High-Speed Downlink Packet Access
HSUPA: High-Speend Uplink Packet Access
HSPA:  High-Speed Packet Access

Add support for HSDPA/HSUPA/HSPA:
 1) extend TelephonyManager.NETWORK_TYPE for HSDPA/HSUPA/HSPA
 2) extend ServiceState.RADIO_TECHNOLOGY for HSDPA/HSUPA/HSPA
 3) set radioTechnology into ServiceState in GsmServiceStateTracker
 4) change the implementation of TelephonyManager.getNetworkType to
    solve the competition timing issue between the time of setting
    system property and the time of receiving notification through
    PhoneStateListener
    4.1) add a getNetworkType interface in ITelephony.aidl
 5) add icons resources for HSDPA/HSUPA/HSPA
 6) make use of HSDPA/HSUPA/HSPA icons in StatusBarPolicy
2009-08-21 13:41:05 -07:00
Libin Tang
7850cdde66 Fix +NANP issue and cleanup plus code conversion.
This patch includes the plus code conversion clean up.
1. change the plus code conversion based on the current and default
   number systems retrieved from MCC.
2. for format such as +NANP, replace the '+' with the current IDP (011).
3. comments changes.
2009-08-21 10:26:58 -07:00
Android (Google) Code Review
c813129fe7 Merge change 22282 into eclair
* changes:
  Fix Calling screen shows "In Call" on pressing mute button
2009-08-21 09:55:41 -07:00
Yong Zhang
25254db31a Delay radio reset to wait for data cleanup in CdmaDataConnectionTracker
Issue to be addressed:
In radioRestart() method in CdmaDataConnectionTracker, if the radio is
restarted right after cleaning up connection, it is possible that the
connection setup request triggered by radio-on may happen before the
connection cleanup has been completed so that the connection may not
be set up correctly after the radio is restarted. The end result could
be that the phone lost the data capability.

The patch includes the following changes:
1) Add EVENT_RESTART_RADIO in DataConnectionTracker.
2) In CdmaDataConnectionTracker, method restartRadio(), send a message
   delayed by 20s, the purpose of which is to wait for connection cleanup
   to be completed, then to restart radio.
3) In CdmaDataConnectionTracker, method trySetupData(), don't try to setup
   data if there is pending message to restart radio.

Addtional notes:
   A system property is not used to config the delayed timer because we
   think this fix is to address the unusual error case and waiting for
   long time should not impact user experience much. 12s is the longest
   time to complete the data cleanup as we have seen so far, so we are
   using a 20s timer.
2009-08-20 18:16:02 -07:00
Guo-Bin Zhang
5abc78405f Fix Calling screen shows "In Call" on pressing mute button
Send a flash command to CDMA network for putting the other party on hold.
For CDMA networks which do not support this the user would just hear a beep
from the network.
For CDMA networks which do support this, it will put the other party on hold.
2009-08-20 17:40:40 -07:00
Tammo Spalink
49bd918dc2 more cdma sms debug logging 2009-08-20 14:40:29 -07:00
Tammo Spalink
079ad20da7 cdma sms encoding tweaks and logging / debugging annotations. 2009-08-20 11:18:04 -07:00
Robert Greenwalt
a64bf834ff Fix various issues found when testing Mms.
Fix some race conditions (check isTeardownRequested).
Fix the passing of mInterfaceName to subtypes (mms, etc).
Fix the generation of CONNECTED message to already active subtypes.
Fix the enabling of Data in DataConnectionTracker.

bug: 2065037
2009-08-19 21:58:12 -07:00
Dmitri Plotnikov
3c513ed95c Converting CallerInfo to new Contacts API. 2009-08-19 16:31:01 -07:00
Jaikumar Ganesh
41e7363f98 Return ICC Card ABSENT instead of NOT_READY when it is not present. 2009-08-18 19:00:43 -07:00
Wink Saville
d324c81c04 Dormant ICON was not being displayed, fixes bug 2039239. 2009-08-18 13:41:07 -07:00
Wink Saville
95a1d1a89e E911 call fix in ECM
Based on the VZW requirement, phone should be still in ECM mode in 2nd emergency call.
but in the current phone call, if a 2nd emergency call is originated, ECM mode will exit.

For fixing this problem, the coding design is as below:
1. In framework, canceling the first ECM timer immediately upon the origination of the
   2nd E911 call, and restarting a new timer when the 2nd E911 ends.
2. Framework needs to syncronize the timer with phone app by sending notification to phone app to
   inform timer is canceled or re-started, since phone app needs to show how much ECM time left
   on the status bar.
3. In phone app's emergency callback mode service, the timer in this service will be canceled
   when it receives the timer cancel notification from framework; the timer will be restarted
   once it receives timer restart notification from framework.
2009-08-18 12:08:59 -07:00
johnwang
01ae863611 resolved conflicts for merge of 696b912e to eclair
modified:   telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
	modified:   telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java

	modified:   telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
	modified:   telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
2009-08-17 19:20:07 -07:00
Robert Greenwalt
25a5d3db3f Fix CDMA to startup/shutdown based on apn en/disab
Fixes MMS during wifi.
Also fixes CDMA for ConnectivityManager change.
2009-08-17 15:20:14 -07:00
Yong Zhang
fa2944d93f Replace loop-delay in setPowerStateToDesired() with async approach
Issues to be addressed:
The method setPowerStateToDesired() in CdmaServiceStateTracker class sends
a msg to CdmaDataConnectionTracker class to deactive data call, and then starts
a loop which calls SystemClock.sleep() to wait for several seconds.The purpose
of this is to wait for data-disconnection before sending RADIO_POWER off request.
However, the CdmaServiceStateTracker and CdmaDataConnectionTracker are running in
the same process so that the CdmaDataConnectionTracker is not able to process the
message to deactive data before the loop ends.

The patch includes the following changes:
1) In setPowerStateToDesired() in CdmaServiceStateTracker, replace implementation
   of loop-delay by sending a delayed msg to set RADIO_POWER off.

2) In CdmaDataConnectionTracker, when getting EVENT_DISCONNECT_DONE, call a new
   method in CdmaServiceStateTracker to process pending request to turn RADIO_POWER
   off.
2009-08-15 13:01:52 -07:00
Wink Saville
e6a9bcb7e8 A hack that when restartRadio is called the CdmaDataConnectionTracker
to retry a connection and possibly reconnect after a temporary data loss.

The root cause appears to be because DEACTIVATE and POWER_RADIO_OFF are
sent back to back and POWER_RADIO_OFF completes before DEACTIVATE.
When this happens CdmaDataConnectionTracker won't attempt to reestablish
a data connection until a voice call terminates.

At this time it appears the better solution is have CdmaDataConnectionTracker
wait for DEACTIVATE to complete before issuing POWER_RADIO_OFF, this fix
will be implemented in the near future.
2009-08-15 11:17:18 -07:00
Wink Saville
ad4d9e5beb Allow CdmaDataConnectionTracker to handle RIL_UNSOL_OTA_PROVISION_STATUS
and when data roaming is enabled reset the retry manager.

This change also refactors mRetryMgr to DataConnectionTracker
removing it from Cdma and Gsm data connection trackers child classes.
2009-08-15 08:40:30 -07:00
Android (Google) Code Review
763101efcd Merge change 21171
* changes:
  Allow max_retires to be set to infinite.
2009-08-13 15:14:12 -07:00
Android (Google) Code Review
9e0426087b Merge change 21166
* changes:
  Rename bcdByteToInt to gsmBcdByteToInt and beBcdByteToInt to cdmaBcdByteToInt.
2009-08-13 15:13:58 -07:00
Android (Google) Code Review
a646c56b21 Merge change 21186
* changes:
  Trigger data connection update if network type changes.
2009-08-13 15:13:47 -07:00
jsh
50e05ead5e Trigger data connection update if network type changes.
Data connection icon could be stale otherwise.
2009-08-13 15:02:18 -07:00
Wink Saville
a03ab1a6a0 Allow max_retires to be set to infinite.
Setting max_retires to infinite sets mRetryForever to true and therefore
isRetryNeeded will always be true. This is better than an alternative
which is to set max_retires to a large value such as 2147483647.
2009-08-13 14:18:00 -07:00
Android (Google) Code Review
a9085a59ec Merge change 20853
* changes:
  Add net type to mobile for mobile-required traffic
2009-08-13 14:02:08 -07:00
Wink Saville
9688c6046f Rename bcdByteToInt to gsmBcdByteToInt and beBcdByteToInt to cdmaBcdByteToInt. 2009-08-13 11:11:46 -07:00
John Wang
8c6b883cd3 Use dataRoaming in dataConnectionTracker.
Seperate dataRoaming from gsmRoaming. dataRoaming is based on +CGREG returns in GSM while gsmRoaming is based on +CREG returns. Previously, the status of dataRoaming is always treated the same as gsmRoaming. However there is a situation where +CREG returns 0 and +CGREG returns 5, i.e., gsmRoaming is off and dataRoaming is on. In such situation, the phone should setup data connection if the phone enables data service when roaming (for example, data only card). The phone shouldn't setup data connection if the phone disable data service when roaming (to prevent roaming data charge). So gsmDataConnectionTracker should use dataRoaming instead of gsmRoaming to decide if data service allowed.

	modified:   GsmDataConnectionTracker.java
	modified:   GsmServiceStateTracker.java
2009-08-13 08:42:18 -07:00
Robert Greenwalt
42acef3733 Add net type to mobile for mobile-required traffic
This also refactors ConnectivityService a bit towards supporting multiple simultaneous connections by making each a seem like a seperate Network with it's own stateTracker, etc.
Also adds tracking of process death to clean orphaned startUsingNetworkFeature features.
2009-08-12 16:08:25 -07:00
Android (Google) Code Review
aaa1fa96e1 Merge change 21006
* changes:
  Fix the issue of incorrect conversion of the plus sign in a dial string.
2009-08-12 15:48:31 -07:00
Tang@Motorola.com
18e7b98c1c Fix the issue of incorrect conversion of the plus sign in a dial string.
The issue is that the plus sign in a dial string is always converted
to the IDP (International Dial Prefix).

This fix implements a plus sign conversion mechanism based on the default
telephone numbering system that the phone is activated and the current telephone
number system that the phone is camped on. Currently, we only support the cases
where the default and current telephone numbering system are NANP.
2009-08-12 15:41:33 -07:00
jsh
71a08c1d78 am 4cc16a7b: Merge change 20859 into donut
Merge commit '4cc16a7b9f146c4a324202db6b1777d2e0150fc3'

* commit '4cc16a7b9f146c4a324202db6b1777d2e0150fc3':
  Fix for sending 16-bit SMS message with header.
2009-08-12 12:36:35 -07:00
jsh
7f304d2cce Fix for sending 16-bit SMS message with header.
Header length was missing from the PDU.  This addresses http://b/issue?id=2040561
2009-08-11 17:25:37 -07:00
Android (Google) Code Review
7d89133364 Merge change 20683
* changes:
  Add operator name in network selection.
2009-08-11 12:07:16 -07:00
Jeff Sharkey
f28ca902ad Update getNumberFromIntent() to read from both providers.
This method is used by the Phone app to decode ACTION_CALL
Intents, resolving to a real phone number.  Because the
columns are changing with the new provider, I added logic
to query using the correct columns for the authority of the
requested Uri.
2009-08-11 10:11:03 -07:00
johnwang
c6f79ce6bc Add operator name in network selection.
Save the operator name during network selection. The name will be used by UI to provide network selection notification. See bug 1414247.

	modified:   java/com/android/internal/telephony/PhoneBase.java
	modified:   java/com/android/internal/telephony/gsm/GSMPhone.java
2009-08-10 17:10:32 -07:00
johnwang
597f2b7022 Add ro.telephony.disable-call check in dialing.
When ro.telephony.disable-call is set to true the phone disable actual calls. It provides a way to test in user-debug builds for stability runs. See bug 2031157.

	modified:   java/com/android/internal/telephony/TelephonyProperties.java
	modified:   java/com/android/internal/telephony/cdma/CdmaCallTracker.java
	modified:   java/com/android/internal/telephony/gsm/GsmCallTracker.java

	modified:   java/com/android/internal/telephony/TelephonyProperties.java
	modified:   java/com/android/internal/telephony/cdma/CdmaCallTracker.java
	modified:   java/com/android/internal/telephony/gsm/GsmCallTracker.java
2009-08-10 17:10:32 -07:00
Tammo Spalink
e00dd1e5a3 Make GSM 7-bit encoding properly deal with initial padding.
For CDMA, clean up the GSM encapsulation to properly align
user data payload after the user data header.

Addresses http://buganizer/issue?id=2007011
2009-08-10 14:12:35 +08:00
Wink Saville
3918e13b24 Add configurable data-retry.
Add RetryManager and change GsmDataConnectionTracker and
CdmaDataConnectionTracker to use it.

Add TelephonyUtilsTest which tests RetryManager.
2009-08-09 15:23:45 -07:00
Christian Gustafsson
e4ebbd29f7 CDMA voicemail notification fixes
1.  Convert the voicemail count of a VM notification from
    BCD to decimal. That way the user will not be notified
    of 16 new VM when there are only 10.
    Ref: 3GPP2 C.S0015-B / 4.5.12 Number of Messages.
2.  Allow VMN-95 notifications without "User Data" to be
    processed. Only mandatory items for VMN-95 are
    "Message Identifier" and "Number of Messages".
    Ref: 3GPP2 C.S0015-B / 4.3.5 Voice Mail Notification.
2009-08-09 12:11:51 -07:00
Wink Saville
5221dfdec9 Revert "Disable data call in emergency call"
Temporary rollback of this change, for now the radio can prevent data traffic,
but that's not the desired long-term solution.

This reverts commit 79ef673d56e2599932b8b7f13695d23b4df54d09.
2009-08-08 22:06:01 -07:00
Jinghui Guo
9e652dcc21 Touch activation screen shown up fix
During the time of OTA activation screen startup, the app needs
to get MIN by calling getCdmaMin(). The issue in current code is that
OTA app calls getCdmaMin() before framework gets MIN data from lower
layer.

To fix this issue, framework will be providing the following new APIs
to applications for checking if MIN data is ready:
1. isMinInfoReady():
   Check if mMin variable in getCdmaMin() has been assigned a non-null value.
2. registerForSubscriptionInfoReady():
   Apps uses this API to register for notification.
3. unregisterForSubscriptionInfoReady():
   This API is used by apps to unregister notification.

Framework will be sending out the notification in the following situations:
1. when mMin is assigned a non-null MIN value;
2. When app calls register API and MIN is ready.
2009-08-07 10:35:11 -07:00
jsh
d1cb1d22af Bubble up SMS send fail error code to the app.
Framework portion of the fix for http://b/1978375:
We'll pass up the error code returned by the RIL on send failure.
2009-08-06 13:23:04 -07:00
Libin Tang
33777d2096 Fix the issue of datacall not being reinitiated after exiting
Emergency Callback Mode.
2009-08-05 11:29:38 -07:00
Tammo Spalink
2d65082b15 fix CDMA SMS ASCII decode and mapping 2009-08-05 11:12:53 +08:00
Android (Google) Code Review
529fcf97ea Merge change 9684
* changes:
  Add a DISCONNECTING call state.
2009-08-04 16:28:13 -07:00
jsh
e7a9201edb Add a DISCONNECTING call state.
This indicates to the UI that the hangup command has been received by the
Telephony layer and passed down to the RIL, but we have not yet been notified
of a successful DISCONNECT.

Addresses http://b/issue?id=1659876.
2009-08-04 11:30:09 -07:00
Tang@Motorola.com
dfb8f07a95 Fix WPS Queued pip tone not working issue.
The alert pitch included in the signal information record
should not be involved in the calculation for Pip tone type
mapping.
2009-08-03 12:06:40 -07:00