159 Commits

Author SHA1 Message Date
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
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
John Wang
0d45e37069 Clean up RIL_SIM_* in RILConstants
GET_SIM_STATUS now returns structure RIL_CardStatus. So RIL_SIM_* status are obsoleted.

	modified:   java/com/android/internal/telephony/RILConstants.java
2009-07-30 15:45:12 -07:00
Jaikumar Ganesh
0da3bdb476 Fix public API caused due to CDMA changes. 2009-07-30 12:37:43 -07:00
Wink Saville
b307c8945d Fix bug 1994955 where PHONE_TYPE_CDMA was 0 and it should be 2 and added RILConstants.NO_PHONE.
This bug originally reported that PHONE_TYPE_CDMA needed to be 2 because
it was public. But as far as I can tell it has never been public and it
is still marked @hide so is not public now. There is a bug in that
PHONE_TYPE_NONE and PHONE_TYPE_CDMA were both 0. But this doesn't
appear to have been a problem because PHONE_TYPE_NONE doesn't looked to be
used anywhere except in TelephonyManagerTest.
2009-07-29 10:25:09 -07:00
Tammo Spalink
5e5b8c45db Fix swapped gsm/cdma function dispatch, and 7bit text fragmentation. 2009-07-27 16:20:31 +08:00
Wink Saville
abccd7eaa5 DO NOT MERGE. Implement IMSI function for CDMA phones
Includes support to get the MCC and MNC from system properties, since
they are known to be unreliable from the network.

This is known to conflict with master and will be
added by hand so as not to break the build.
2009-07-16 16:07:13 -07:00
jsh
ae49180f28 Minor tweak to CDMA_SUBSCRIPTION.
H_SID and H_NID are now comma separated lists, so update CdmaServiceTracker
accordingly. Note: For now, we still only store away the first of each.

Also remove H_SID and H_NID fetching from RuimRecords.java, since it is unused
(and unlikely to be used) in that class.
2009-07-15 16:41:11 -07:00
Android (Google) Code Review
35eea54a40 Merge change 6935 into donut
* changes:
  DO NOT MERGE: backporting from master:
2009-07-13 15:44:57 -07:00
Mike Lockwood
2872e30684 DO NOT MERGE: backporting from master:
CDMA: Add Network ID and System ID to CdmaCellLocation.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-13 16:27:43 -04:00
jsh
aa4593706e Update javadoc for TelephonyManager.getNetwork* for CDMA.
These are unreliable for CDMA, so note it in the javadoc. Also update
for the corresponding TelephonyProperties.
2009-07-13 12:54:45 -07:00
jsh
dafa22a3ef Extra parameters for sendBurstDtmf.
ON length and OFF length.
Also, define PROFILEs for use with SETUP_DATA_CALL.
2009-07-10 15:52:28 -07:00
Dianne Hackborn
854060af30 Fix bug #1873249i: Apps can DoS/brick device
This is the problem where various things are listening for broadcasts
(such as battery status, PIN/PUK/Network) that an application can send
to cause harm to the system.

Solving this is tricky because many of these broadcasts are sticky,
and I have never figured out how to do permissions with sticky
broadcasts in a sane way.  So instead, I am going to punt on the
general problem and just brute force it:

There is new a way for system components to declare specific
broadcast actions to be protected, which means that only the system
and the phone can send them.  This is good enough for now.  None
of it is exposed in the public API so we can make something a little
less stupid in the future if we ever need to.
2009-07-09 18:14:31 -07:00
Android (Google) Code Review
62edc96022 Merge change 6383 into donut
* changes:
  Cleanup connection when airplane mode is entered.
2009-07-07 15:22:15 -07:00
Jaikumar Ganesh
024af038a7 Cleanup connection when airplane mode is entered.
The message was being sent to the wrong handler.
2009-07-07 12:34:59 -07:00
Tammo Spalink
0fd833a50f septet-align UD after any UDH for GSM-7bit coding 2009-07-07 14:17:28 +08:00
Wink Saville
1eee698c3e Fixing 1949086 Sholes telephony crash after waking from sleep. 2009-07-02 20:50:11 -07:00
jsh
8890aaf77c SimRecords.getServiceProviderName() always returned null.
Fixes bug 1955060.  spn was defined in both SimRecords and base class IccRecords.
2009-07-01 12:55:28 -07:00
Android (Google) Code Review
daa5a21562 Merge change 5810 into donut
* changes:
  Fix bug 1930055 of NullPointerException.
2009-06-30 15:16:38 -07:00
Android (Google) Code Review
85d650c899 Merge change 5804 into donut
* changes:
  Ensure that we never trigger ArrayIndexOutOfBoundsException by checking that the index is always < the array's length. Also ensures that the object's state is consistent. Should resolve a denial-of-service bug when handling malformed WAP pushes.
2009-06-30 15:05:56 -07:00
John Wang
107821369b Fix bug 1930055 of NullPointerException.
The NullPointerException in getCallState is caused by the restarting of phone process. getITelephony() was not ready to be used at that moment.

	modified:   java/android/telephony/TelephonyManager.java
2009-06-30 12:01:35 -07:00
Chris Palmer
3856785225 Ensure that we never trigger ArrayIndexOutOfBoundsException by checking that
the index is always < the array's length. Also ensures that the object's
state is consistent. Should resolve a denial-of-service bug when handling
malformed WAP pushes.
2009-06-30 11:50:50 -07:00
Jaikumar Ganesh
34267f7e17 Fix typo introduced during variable cleanup.
This prevented data connection being established after voice calls on 2G networks.
2009-06-30 10:53:16 -07:00
Tammo Spalink
8561de157c eliminate byte-typed cdma sms fields 2009-06-30 11:02:46 +08:00
Android (Google) Code Review
0178afe415 Merge change 5485 into donut
* changes:
  cdma sms is91 support
2009-06-29 19:22:11 -07:00
Android (Google) Code Review
8aadf7ae27 Merge change 5359 into donut
* changes:
  fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
2009-06-29 19:22:05 -07:00
Jaikumar Ganesh
c0303921d0 Fix setting of the APN type.
The user is on wifi, then enables SUPL APN. When wifi is switched off,
we try to establish DATA connection on the Default APN. If this fails,
we were not retrying as the mRequestedApnType variable was not being reset.
This was happening because the SUPL APN and the data connection APN
were the same.
2009-06-29 13:33:47 -07:00
Tammo Spalink
3a08cec99e fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
addresses http://buganizer/issue?id=1489784
2009-06-29 12:51:22 +08:00
Tammo Spalink
8203dc1bc8 cdma sms is91 support 2009-06-28 16:23:53 +08:00
Jaikumar Ganesh
e7e12b44bc Tune the Reconnect back off timer.
Cap the max limit to 30 mins.
Re-register to the network once, when we reach the 30 min max.
2009-06-26 18:43:46 -07:00
Android (Google) Code Review
ae3522734e Merge change 5192 into donut
* changes:
  make BitwiseInputStream.read return int
2009-06-26 14:41:51 -07:00
David Krause
5c7d9e8194 CDMA incoming MMS fixes
Need to correctly interpret WAP Datagram data. Specifically the
source and destination ports are only included in the 1st segment,
not subsequent segments but the original implementation was looking
for the ports for all segments.
2009-06-25 21:56:24 -07:00
jsh
3960ced463 Fix SMS Ack.
There were a few places where we were not sending SMS ack.  This change fixes that, and helps ensure that we don't miss any others.

Also fix a bug I introduced in RIL.java for CDMA SMS ACK (it uses RIL_CDMA_SMS_Ack and not int[]).
2009-06-25 13:08:08 -07:00
Android (Google) Code Review
d48388ab82 Merge change 5344 into donut
* changes:
  frameworks/base: CDMA voicemail support
2009-06-25 00:09:18 -07:00
David Krause
ce099c3226 frameworks/base: CDMA voicemail support 2009-06-24 21:29:52 -07:00
David Krause
8a9ae45015 Fix intermittent crash related to call waiting
Previously, when call waiting is ignored by user or timed out
by PhoneApp, the connection object for call waiting does not
release the wake lock. It causes the phone process to crash
randomly.

The fix is to release the wake lock when call waiting is
ignored by user or timed out by PhoneApp.
2009-06-24 20:53:15 -07:00
Tammo Spalink
326c66d888 make BitwiseInputStream.read return int
Keep the maximum access 8 bits to avoid dealing with
endianness issues.
2009-06-24 14:42:33 +08:00
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
jsh
be7f0f78af Add remaining retry count to response for PIN/PUK commands.
RIL_REQUEST_ENTER_SIM_PIN
RIL_REQUEST_ENTER_SIM_PUK
RIL_REQUEST_ENTER_SIM_PIN2
RIL_REQUEST_ENTER_SIM_PUK2
RIL_REQUEST_CHANGE_SIM_PIN
RIL_REQUEST_CHANGE_SIM_PIN2
RIL_REQUEST_SET_FACILITY_LOCK
RIL_ENTER_NETWORK_DEPERSONALIZATION
2009-06-22 09:17:08 -07:00
Android (Google) Code Review
4da7dff5e7 Merge change 4731 into donut
* changes:
  gsm: Remove PppLink since pppd_gprs service does not exist.
2009-06-20 14:48:33 -07:00
Android (Google) Code Review
ab48bb9c00 Merge change 4686 into donut
* changes:
  Set AuthType to 0 if username is not specified.
2009-06-19 12:13:50 -07:00
Jaikumar Ganesh
238bfa9efd Set AuthType to 0 if username is not specified.
If username is not specified, set authType to No PAP / No CHAP
so that the code is backward compatible.
2009-06-19 12:06:48 -07:00
Chia-chi Yeh
4df90a869c gsm: Remove PppLink since pppd_gprs service does not exist. 2009-06-19 16:02:30 +08:00
Tammo Spalink
fc78f358cb for cdma concatenated (long) messages, replace ascii7bit with gsm7bit encoding 2009-06-18 14:57:06 +08:00
Jaikumar Ganesh
59cbd7c86f Add PDP Reject causes.
The RIL call LAST_PDP_FAIL_CAUSE, gives us the
PDP setup failure cause. Add support for retry based
on these causes.
2009-06-15 21:34:31 -07:00
Jaikumar Ganesh
bbf7c00e06 Fix data connection issues.
a)Fix cleanup connection being called twice when switching to wifi.
b) Reset the reconnect timer when voice call ends and APN is changed.
2009-06-12 12:14:08 -07:00
Android (Google) Code Review
cb9534f920 Merge change 3907 into donut
* changes:
  Support SMS cell broadcasting for GSM in RIL.java
2009-06-11 15:54:51 -07:00
johnwang
e337d651a5 Support SMS cell broadcasting for GSM in RIL.java
enable gsm related cell broadcast requests in RIL.java and add SmsBraodcastConfigInfo class.

The gsm related cell broadcast requests include

RIL_REQUEST_GET_BROADCAST_CONFIG
RIL_REQUEST_GET_BROADCAST_CONFIG
RIL_REQUEST_BROADCAST_ACTIVATION
RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS

	modified:   BaseCommands.java
	modified:   CommandsInterface.java
	modified:   RIL.java
	modified:   RILConstants.java
	modified:   cdma/CdmaSMSDispatcher.java
	new file:   gsm/SmsBroadcastConfigInfo.java
	modified:   test/SimulatedCommands.java
2009-06-11 15:43:29 -07:00
Tammo Spalink
a94945d3a1 make sms calculateLength radio-independent 2009-06-11 15:24:43 +08:00
Android (Google) Code Review
2795c2d6b7 Merge change 3806 into donut
* changes:
  Fix a couple null pointer exceptions in CDMA voice call handling.
2009-06-10 16:38:12 -07:00