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>
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
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
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
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
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
Use Log.isLoggable() to enable logs at runtime. Implement SmsResponse.toString()
so we can see what's returned.
Hopefully helps with debugging b/2086832.
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
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
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.
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
For testing purposes it is deseriable to allow
vendors to provide an alternate eri file. This
fixes Part A of bug 2108379.
Bug:2108379
Change-Id: I51703c9ac211ced053418e28e277dfab68deea21
Phone.updateServiceLocation() is the internal routine triggered by
external calls to CellLocation.requestLocationUpdate().
addresses bug http://b/issue?id=1724246
Change-Id: Id3d5cab1a77df12d3e94373a58ae94688a8630c6
Refer to 3GPP Spec 31.102 for more details.
We read and parse USIM records instead of the RIL doing it for us.
We only support reading of USIM Phonebook records.
This is accomplished by adding hasIccCard to ITelephony and do
the implemenation in PhoneInterfaceManager.java. Then change
TelephonyManager to use getITelephony().hasIccCard().
Change-Id: I26970fdf92a058502b8156a4f52c14e213217fc6
If the phone process crashes while the phone is in ECM, there
is currently no way to get out of ECM without rebooting the
phone. This change forces the phone out of ECM if the phone
process restarts.
Change-Id: Ie4eb103fdc151ca20aa0b29dec43e60ad819e5b7
The change fixes the issue that dialing *86 during the call, the dialing voicemail
screen is not shown, instead it shows feature code screen.
For CDMA, when flash is sent to the network, there is no response from the
network to indicate if the feature code is completed or not. This is different
from MMI code in GSM network. So it's confusing to show any UI to indicate MMI
(feature code) for CDMA.
The change is to remove the feature code handling in CDMAPone, and handle the
feature code dialing the same way as the 3 way call dialing. Basically, when
feature code is dialed, the dialing screen will be shown.
Certain carrier websites allow sending SMS to phones on their network. They allow filling
out a "Reply to Address" which can be a phone number. The website may send that message to
the device as an SMS-to-email, but the "From" address will be an SMS short code and not a
valid email address. When the user replies to this message, the response is directed to the
short code and not delivered correctly.
In extractEmailAddressFromMessageBody(), currently it checks if the sender is a shortcode
and an email address is present as the first word in the message body. If so, it replaces
the email address as the sender replacing the short code.
The fix to support the above case is remove the email address check and treat the first word
as FROM address regardless of what the user types.
Change-Id: Ifd39a39b352f204024c76fde293164dcd2b0896b
AccountManagerService.SimWatcher was checking if storedImsi = "initial"
instead of null as an initial condition. Also, on NV-only CDMA devices
we were only sending SIM_STATE_CHANGED notifications when the radio
powered down, which meant storedImsi was only initialized if the radio
powered down.
Expose the presence/absence of IccCards in the system.
This is needed to fix bug 2033811 which needs to show
some SIM menus in the Mms app and Contact apps only if
there is a SIM and on CDMA there is no sims yet.
The current implementation assumes CDMA never has an
IccCard this is true at the moment but needs to change.
Change-Id: I4167368e364623ea68e9b2778556e6d730b1e715
Always process class 0 and other unstored SMS (eg, MWI). We were
rejecting all SMS messages in storage full situations, but certain
messages do not require storage.
Also, notify apps when the framework rejects MT SMS, with new
SMS_REJECTED_ACTION intent.
b/2066775
b/2015906
Previously pdu creation was haphazardly done sometimes by the app and
sometimes centrally by the phone process -- specifically the phone
process did creation for multipart texts. This change gets rid of the
previous IPC interface for sending raw pdus to SMSDispatch in the
phone process, and instead makes everything work like multipart
messages worked before, namely the structured data is passed and pdu
encoding done centrally.
The motivation for this was the need to ensure that CDMA message id
numbers were strictly monotonic, including across reboots, which
necessitated central state in the form of a system property, which
could in turn only be modified by the phone process.
Hence, this (in part) addresses issue: http://buganizer/issue?id=2075760
Change-Id: I94ca207b6e657c465e8472534704db8646ee277c
We need to leave the phone in a connectable state so that it connects whenever it's able
(reception or just timing). If we mark it disabled on failure it wont try again. The retry
comes from the phone layer, not from ConnectivityService.
Also Fix the Phone layer so it retries even if it disconnected by request (DATA_DISABLED).
This was a bug from long ago that didn't become visible until recently with fast wifi and slow
mobile teardown.
Change-Id: I04bf39fba0cb578c87d5fc6ea5d220820ff9f364
After sending 100 messages, SMSDispatcher always displays dialog to user to
confirm the sending. If the user sends messages too fast then there will be more
than one dialogs waiting for the response, but SMSDisptcher can only handle one.
The phone only rang once on rings that did't loop. In the GSM phones
the vendor ril sends a RIL_UNSOL_CALL_RING event to cause the phone
to properly play non-looping ring tones. To reproduce select a non-looping
ring tone such as "Digital Phone" and call it from another phone, the
phone will only ring once.
Three solutions were discussed:
*) Have all ring tones loop; rejected because to more space would be taken
by the silence.
*) Require all vendor RIL's to send RIL_UNSOL_CALL_RING; rejected because
it is inefficient to send a notification from the bottom of the stack.
*) Modify the PhoneApp or the audio layer; rejected because it would be
to big of change.
*) Modify the framework; this is the solution accepted.
The framework was modified to use two now properties to control the
call ring notification.
ro.telephony.multiple_call_ring: a boolean that if true the vendor ril
is assumed to send multiple RIL_UNSOL_CALL_RING messages. If false
only one is assumed and the framework will generate additional events.
(The default if absent is true).
ro.telephony.call_ring_delay: the delay in milli-seconds between
the generated events. (default if absent is 3000)
To minimize code duplication this change does some reorganization
of the PhoneBase class hierarchy and PhoneBase becomes a handler
and implements a default handleMessage method handles events associated
with call ring notification. This handler is overridden by derived
classes, CDMAPhone and GSMPhone which will pass unknown events
to PhoneBase.handleMessage and thus handle call notification for any
derived class.
Change-Id: I5b147b2b69b647d9987052f16ada41c9b66e4bf1
Replace a table of objects that was created at boot
in a costly manner, with a pre-generated table of
more densely formatted numerical data.
Based on data from runhat on the phone process,
this looks to shrink the memory footprint from about
16kB to less then 2kB.
Addresses http://buganizer/issue?id=874072
Change-Id: I5a7b9d7de4c9b9a0360e8370252582969fbd8d4f
Another way to fix this problem. Notice the failures of dataSetup and mark the requesting
apn as unenabled so future attempts can be made.
bug: 2069221