merge from open-source master

Change-Id: Ib711450566694550d9cb9ba01c25599010d2e5e4
This commit is contained in:
The Android Open Source Project
2010-05-18 12:47:02 -07:00
20 changed files with 115 additions and 119 deletions

View File

@@ -57,7 +57,7 @@ public class ServiceState implements Parcelable {
public static final int STATE_EMERGENCY_ONLY = 2; public static final int STATE_EMERGENCY_ONLY = 2;
/** /**
* Radio of telephony is explictly powered off. * Radio of telephony is explicitly powered off.
*/ */
public static final int STATE_POWER_OFF = 3; public static final int STATE_POWER_OFF = 3;
@@ -220,7 +220,8 @@ public class ServiceState implements Parcelable {
return 0; return 0;
} }
public static final Parcelable.Creator<ServiceState> CREATOR = new Parcelable.Creator() { public static final Parcelable.Creator<ServiceState> CREATOR =
new Parcelable.Creator<ServiceState>() {
public ServiceState createFromParcel(Parcel in) { public ServiceState createFromParcel(Parcel in) {
return new ServiceState(in); return new ServiceState(in);
} }
@@ -231,7 +232,7 @@ public class ServiceState implements Parcelable {
}; };
/** /**
* Get current servcie state of phone * Get current service state of phone
* *
* @see #STATE_IN_SERVICE * @see #STATE_IN_SERVICE
* @see #STATE_OUT_OF_SERVICE * @see #STATE_OUT_OF_SERVICE
@@ -290,10 +291,10 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Get current registered operator name in long alphanumeric format * Get current registered operator name in long alphanumeric format.
* *
* In GSM/UMTS, long format can be upto 16 characters long * In GSM/UMTS, long format can be up to 16 characters long.
* In CDMA, returns the ERI text, if set, otherwise the ONS * In CDMA, returns the ERI text, if set. Otherwise, returns the ONS.
* *
* @return long name of operator, null if unregistered or unknown * @return long name of operator, null if unregistered or unknown
*/ */
@@ -302,9 +303,9 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Get current registered operator name in short lphanumeric format * Get current registered operator name in short alphanumeric format.
* *
* In GSM/UMST, short format can be upto 8 characters long * In GSM/UMTS, short format can be up to 8 characters long.
* *
* @return short name of operator, null if unregistered or unknown * @return short name of operator, null if unregistered or unknown
*/ */
@@ -313,21 +314,23 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Get current registered operator numeric id * Get current registered operator numeric id.
* *
* In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit * In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit
* network code * network code.
*
* The country code can be decoded using MccTable.countryCodeForMcc()
* *
* @return numeric format of operator, null if unregistered or unknown * @return numeric format of operator, null if unregistered or unknown
*/ */
/*
* The country code can be decoded using
* {@link com.android.internal.telephony.MccTable#countryCodeForMcc(int)}.
*/
public String getOperatorNumeric() { public String getOperatorNumeric() {
return mOperatorNumeric; return mOperatorNumeric;
} }
/** /**
* Get current network selection mode * Get current network selection mode.
* *
* @return true if manual mode, false if automatic mode * @return true if manual mode, false if automatic mode
*/ */
@@ -458,7 +461,7 @@ public class ServiceState implements Parcelable {
mIsEmergencyOnly = false; mIsEmergencyOnly = false;
} }
// TODO - can't this be combined with the above func.. // TODO - can't this be combined with the above method?
public void setStateOff() { public void setStateOff() {
mState = STATE_POWER_OFF; mState = STATE_POWER_OFF;
mRoaming = false; mRoaming = false;
@@ -528,8 +531,8 @@ public class ServiceState implements Parcelable {
} }
/** /**
* In CDMA mOperatorAlphaLong can be set from the ERI * In CDMA, mOperatorAlphaLong can be set from the ERI text.
* text, this is done from the CDMAPhone and not from the CdmaServiceStateTracker * This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
* *
* @hide * @hide
*/ */
@@ -542,7 +545,7 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Test whether two objects hold the same data values or both are null * Test whether two objects hold the same data values or both are null.
* *
* @param a first obj * @param a first obj
* @param b second obj * @param b second obj
@@ -553,7 +556,7 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Set ServiceState based on intent notifier map * Set ServiceState based on intent notifier map.
* *
* @param m intent notifier map * @param m intent notifier map
* @hide * @hide
@@ -575,7 +578,7 @@ public class ServiceState implements Parcelable {
} }
/** /**
* Set intent notifier Bundle based on service state * Set intent notifier Bundle based on service state.
* *
* @param m intent notifier Bundle * @param m intent notifier Bundle
* @hide * @hide

View File

@@ -56,7 +56,7 @@ import java.util.ArrayList;
* the current default SMSC * the current default SMSC
* @param text the body of the message to send * @param text the body of the message to send
* @param sentIntent if not NULL this <code>PendingIntent</code> is * @param sentIntent if not NULL this <code>PendingIntent</code> is
* broadcast when the message is sucessfully sent, or failed. * broadcast when the message is successfully sent, or failed.
* The result code will be <code>Activity.RESULT_OK<code> for success, * The result code will be <code>Activity.RESULT_OK<code> for success,
* or one of these errors: * or one of these errors:
* <code>RESULT_ERROR_GENERIC_FAILURE</code> * <code>RESULT_ERROR_GENERIC_FAILURE</code>

View File

@@ -284,7 +284,7 @@ public class CallerInfoAsyncQuery {
*/ */
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number, public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
OnQueryCompleteListener listener, Object cookie) { OnQueryCompleteListener listener, Object cookie) {
//contruct the URI object and start Query. //construct the URI object and start Query.
Uri contactRef = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); Uri contactRef = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
CallerInfoAsyncQuery c = new CallerInfoAsyncQuery(); CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();

View File

@@ -45,7 +45,7 @@ public abstract class Connection {
POWER_OFF, /* radio is turned off explicitly */ POWER_OFF, /* radio is turned off explicitly */
OUT_OF_SERVICE, /* out of service */ OUT_OF_SERVICE, /* out of service */
ICC_ERROR, /* No ICC, ICC locked, or other ICC error */ ICC_ERROR, /* No ICC, ICC locked, or other ICC error */
CALL_BARRED, /* call was blocked by call barrring */ CALL_BARRED, /* call was blocked by call barring */
FDN_BLOCKED, /* call was blocked by fixed dial number */ FDN_BLOCKED, /* call was blocked by fixed dial number */
CS_RESTRICTED, /* call was blocked by restricted all voice access */ CS_RESTRICTED, /* call was blocked by restricted all voice access */
CS_RESTRICTED_NORMAL, /* call was blocked by restricted normal voice access */ CS_RESTRICTED_NORMAL, /* call was blocked by restricted normal voice access */
@@ -56,7 +56,7 @@ public abstract class Connection {
CDMA_INTERCEPT, /* INTERCEPT order received, MS state idle entered */ CDMA_INTERCEPT, /* INTERCEPT order received, MS state idle entered */
CDMA_REORDER, /* MS has been redirected, call is cancelled */ CDMA_REORDER, /* MS has been redirected, call is cancelled */
CDMA_SO_REJECT, /* service option rejection */ CDMA_SO_REJECT, /* service option rejection */
CDMA_RETRY_ORDER, /* requeseted service is rejected, retry delay is set */ CDMA_RETRY_ORDER, /* requested service is rejected, retry delay is set */
CDMA_ACCESS_FAILURE, CDMA_ACCESS_FAILURE,
CDMA_PREEMPTED, CDMA_PREEMPTED,
CDMA_NOT_EMERGENCY, /* not an emergency call */ CDMA_NOT_EMERGENCY, /* not an emergency call */
@@ -69,8 +69,8 @@ public abstract class Connection {
/* Instance Methods */ /* Instance Methods */
/** /**
* Gets address (e.g., phone number) associated with connection * Gets address (e.g. phone number) associated with connection.
* TODO: distinguish reasons for unavailablity * TODO: distinguish reasons for unavailability
* *
* @return address or null if unavailable * @return address or null if unavailable
*/ */
@@ -78,7 +78,7 @@ public abstract class Connection {
public abstract String getAddress(); public abstract String getAddress();
/** /**
* Gets cdma CNAP name associated with connection * Gets CDMA CNAP name associated with connection.
* @return cnap name or null if unavailable * @return cnap name or null if unavailable
*/ */
public String getCnapName() { public String getCnapName() {
@@ -86,15 +86,15 @@ public abstract class Connection {
} }
/** /**
* Get orignal dial string * Get original dial string.
* @return orignal dial string or null if unavailable * @return original dial string or null if unavailable
*/ */
public String getOrigDialString(){ public String getOrigDialString(){
return null; return null;
} }
/** /**
* Gets cdma CNAP presentation associated with connection * Gets CDMA CNAP presentation associated with connection.
* @return cnap name or null if unavailable * @return cnap name or null if unavailable
*/ */
@@ -116,45 +116,45 @@ public abstract class Connection {
public abstract long getCreateTime(); public abstract long getCreateTime();
/** /**
* Connection connect time in currentTimeMillis() format * Connection connect time in currentTimeMillis() format.
* For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition * For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition.
* For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition * For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition.
* Returns 0 before then * Returns 0 before then.
*/ */
public abstract long getConnectTime(); public abstract long getConnectTime();
/** /**
* Disconnect time in currentTimeMillis() format * Disconnect time in currentTimeMillis() format.
* The time when this Connection makes a transition into ENDED or FAIL * The time when this Connection makes a transition into ENDED or FAIL.
* Returns 0 before then * Returns 0 before then.
*/ */
public abstract long getDisconnectTime(); public abstract long getDisconnectTime();
/** /**
* returns the number of milliseconds the call has been connected, * Returns the number of milliseconds the call has been connected,
* or 0 if the call has never connected. * or 0 if the call has never connected.
* If the call is still connected, then returns the elapsed * If the call is still connected, then returns the elapsed
* time since connect * time since connect.
*/ */
public abstract long getDurationMillis(); public abstract long getDurationMillis();
/** /**
* If this connection is HOLDING, return the number of milliseconds * If this connection is HOLDING, return the number of milliseconds
* that it has been on hold for (approximently) * that it has been on hold for (approximately).
* If this connection is in any other state, return 0 * If this connection is in any other state, return 0.
*/ */
public abstract long getHoldDurationMillis(); public abstract long getHoldDurationMillis();
/** /**
* Returns "NOT_DISCONNECTED" if not yet disconnected * Returns "NOT_DISCONNECTED" if not yet disconnected.
*/ */
public abstract DisconnectCause getDisconnectCause(); public abstract DisconnectCause getDisconnectCause();
/** /**
* Returns true of this connection originated elsewhere * Returns true of this connection originated elsewhere
* ("MT" or mobile terminated; another party called this terminal) * ("MT" or mobile terminated; another party called this terminal)
* or false if this call originated here (MO or mobile originated) * or false if this call originated here (MO or mobile originated).
*/ */
public abstract boolean isIncoming(); public abstract boolean isIncoming();

View File

@@ -164,7 +164,7 @@ public abstract class DataConnection extends HierarchicalStateMachine {
NONE, NONE,
OPERATOR_BARRED, OPERATOR_BARRED,
INSUFFICIENT_RESOURCES, INSUFFICIENT_RESOURCES,
MISSING_UKNOWN_APN, MISSING_UNKNOWN_APN,
UNKNOWN_PDP_ADDRESS, UNKNOWN_PDP_ADDRESS,
USER_AUTHENTICATION, USER_AUTHENTICATION,
ACTIVATION_REJECT_GGSN, ACTIVATION_REJECT_GGSN,
@@ -181,7 +181,7 @@ public abstract class DataConnection extends HierarchicalStateMachine {
RADIO_NOT_AVAILABLE; RADIO_NOT_AVAILABLE;
public boolean isPermanentFail() { public boolean isPermanentFail() {
return (this == OPERATOR_BARRED) || (this == MISSING_UKNOWN_APN) || return (this == OPERATOR_BARRED) || (this == MISSING_UNKNOWN_APN) ||
(this == UNKNOWN_PDP_ADDRESS) || (this == USER_AUTHENTICATION) || (this == UNKNOWN_PDP_ADDRESS) || (this == USER_AUTHENTICATION) ||
(this == ACTIVATION_REJECT_GGSN) || (this == ACTIVATION_REJECT_UNSPECIFIED) || (this == ACTIVATION_REJECT_GGSN) || (this == ACTIVATION_REJECT_UNSPECIFIED) ||
(this == SERVICE_OPTION_NOT_SUPPORTED) || (this == SERVICE_OPTION_NOT_SUPPORTED) ||
@@ -208,12 +208,12 @@ public abstract class DataConnection extends HierarchicalStateMachine {
return "Operator Barred"; return "Operator Barred";
case INSUFFICIENT_RESOURCES: case INSUFFICIENT_RESOURCES:
return "Insufficient Resources"; return "Insufficient Resources";
case MISSING_UKNOWN_APN: case MISSING_UNKNOWN_APN:
return "Missing / Unknown APN"; return "Missing / Unknown APN";
case UNKNOWN_PDP_ADDRESS: case UNKNOWN_PDP_ADDRESS:
return "Unknown PDP Address"; return "Unknown PDP Address";
case USER_AUTHENTICATION: case USER_AUTHENTICATION:
return "Error User Autentication"; return "Error User Authentication";
case ACTIVATION_REJECT_GGSN: case ACTIVATION_REJECT_GGSN:
return "Activation Reject GGSN"; return "Activation Reject GGSN";
case ACTIVATION_REJECT_UNSPECIFIED: case ACTIVATION_REJECT_UNSPECIFIED:

View File

@@ -243,15 +243,14 @@ public interface Phone {
/** /**
* Get the current DataState. No change notification exists at this * Get the current DataState. No change notification exists at this
* interface -- use * interface -- use
* {@link com.android.telephony.PhoneStateListener PhoneStateListener} * {@link android.telephony.PhoneStateListener} instead.
* instead.
*/ */
DataState getDataConnectionState(); DataState getDataConnectionState();
/** /**
* Get the current DataActivityState. No change notification exists at this * Get the current DataActivityState. No change notification exists at this
* interface -- use * interface -- use
* {@link TelephonyManager} instead. * {@link android.telephony.TelephonyManager} instead.
*/ */
DataActivityState getDataActivityState(); DataActivityState getDataActivityState();
@@ -853,7 +852,7 @@ public interface Phone {
* @param dtmfString is string representing the dialing digit(s) in the active call * @param dtmfString is string representing the dialing digit(s) in the active call
* @param on the DTMF ON length in milliseconds, or 0 for default * @param on the DTMF ON length in milliseconds, or 0 for default
* @param off the DTMF OFF length in milliseconds, or 0 for default * @param off the DTMF OFF length in milliseconds, or 0 for default
* @param onCompelte is the callback message when the action is processed by BP * @param onComplete is the callback message when the action is processed by BP
* *
*/ */
void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete); void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete);
@@ -993,7 +992,7 @@ public interface Phone {
* ((AsyncResult)onComplete.obj) is an array of int, with a length of 2. * ((AsyncResult)onComplete.obj) is an array of int, with a length of 2.
* *
* @param onComplete a callback message when the action is completed. * @param onComplete a callback message when the action is completed.
* @see com.android.internal.telephony.CommandsInterface.getCLIR for details. * @see com.android.internal.telephony.CommandsInterface#getCLIR for details.
*/ */
void getOutgoingCallerIdDisplay(Message onComplete); void getOutgoingCallerIdDisplay(Message onComplete);
@@ -1015,7 +1014,7 @@ public interface Phone {
* ((AsyncResult)onComplete.obj) is an array of int, with a length of 1. * ((AsyncResult)onComplete.obj) is an array of int, with a length of 1.
* *
* @param onComplete a callback message when the action is completed. * @param onComplete a callback message when the action is completed.
* @see com.android.internal.telephony.CommandsInterface.queryCallWaiting for details. * @see com.android.internal.telephony.CommandsInterface#queryCallWaiting for details.
*/ */
void getCallWaiting(Message onComplete); void getCallWaiting(Message onComplete);
@@ -1458,7 +1457,7 @@ public interface Phone {
* setTTYMode * setTTYMode
* sets a TTY mode option. * sets a TTY mode option.
* *
* @param enable is a boolean representing the state that you are * @param ttyMode is a boolean representing the state that you are
* requesting, true for enabled, false for disabled. * requesting, true for enabled, false for disabled.
* @param onComplete a callback message when the action is completed * @param onComplete a callback message when the action is completed
*/ */

View File

@@ -65,7 +65,7 @@ public class PhoneSubInfo extends IPhoneSubInfo.Stub {
} }
/** /**
* Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones. * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
*/ */
public String getSubscriberId() { public String getSubscriberId() {
mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE"); mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE");

View File

@@ -47,7 +47,7 @@ public class PhoneSubInfoProxy extends IPhoneSubInfo.Stub {
} }
/** /**
* Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones. * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
*/ */
public String getSubscriberId() { public String getSubscriberId() {
return mPhoneSubInfo.getSubscriberId(); return mPhoneSubInfo.getSubscriberId();

View File

@@ -25,7 +25,7 @@ import java.util.ArrayList;
/** /**
* Retry manager allows a simple way to declare a series of * Retry manager allows a simple way to declare a series of
* retires timeouts. After creating a RetryManager the configure * retry timeouts. After creating a RetryManager the configure
* method is used to define the sequence. A simple linear series * method is used to define the sequence. A simple linear series
* may be initialized using configure with three integer parameters * may be initialized using configure with three integer parameters
* The other configure method allows a series to be declared using * The other configure method allows a series to be declared using
@@ -54,18 +54,18 @@ import java.util.ArrayList;
*<p> *<p>
* Examples: * Examples:
* <ul> * <ul>
* <li>3 retires with no randomization value which means its 0: * <li>3 retries with no randomization value which means its 0:
* <ul><li><code>"1000, 2000, 3000"</code></ul> * <ul><li><code>"1000, 2000, 3000"</code></ul>
* *
* <li>10 retires with a 500 default randomization value for each and * <li>10 retries with a 500 default randomization value for each and
* the 4..10 retries all using 3000 as the delay: * the 4..10 retries all using 3000 as the delay:
* <ul><li><code>"max_retries=10, default_randomization=500, 1000, 2000, 3000"</code></ul> * <ul><li><code>"max_retries=10, default_randomization=500, 1000, 2000, 3000"</code></ul>
* *
* <li>4 retires with a 100 as the default randomization value for the first 2 values and * <li>4 retries with a 100 as the default randomization value for the first 2 values and
* the other two having specified values of 500: * the other two having specified values of 500:
* <ul><li><code>"default_randomization=100, 1000, 2000, 4000:500, 5000:500"</code></ul> * <ul><li><code>"default_randomization=100, 1000, 2000, 4000:500, 5000:500"</code></ul>
* *
* <li>Infinite number of retires with the first one at 1000, the second at 2000 all * <li>Infinite number of retries with the first one at 1000, the second at 2000 all
* others will be at 3000. * others will be at 3000.
* <ul><li><code>"max_retries=infinite,1000,2000,3000</code></ul> * <ul><li><code>"max_retries=infinite,1000,2000,3000</code></ul>
* </ul> * </ul>
@@ -75,9 +75,6 @@ import java.util.ArrayList;
public class RetryManager { public class RetryManager {
static public final String LOG_TAG = "RetryManager"; static public final String LOG_TAG = "RetryManager";
static public final boolean DBG = false; static public final boolean DBG = false;
static public final int RETRYIES_NOT_STARTED = 0;
static public final int RETRYIES_ON_GOING = 1;
static public final int RETRYIES_COMPLETED = 2;
/** /**
* Retry record with times in milli-seconds * Retry record with times in milli-seconds
@@ -104,7 +101,7 @@ public class RetryManager {
*/ */
private int mMaxRetryCount; private int mMaxRetryCount;
/** The current number of retires */ /** The current number of retries */
private int mRetryCount; private int mRetryCount;
/** Random number generator */ /** Random number generator */
@@ -125,7 +122,7 @@ public class RetryManager {
* @param randomizationTime a random value between 0 and * @param randomizationTime a random value between 0 and
* randomizationTime will be added to retryTime. this * randomizationTime will be added to retryTime. this
* parameter may be 0. * parameter may be 0.
* @return true if successfull * @return true if successful
*/ */
public boolean configure(int maxRetryCount, int retryTime, int randomizationTime) { public boolean configure(int maxRetryCount, int retryTime, int randomizationTime) {
Pair<Boolean, Integer> value; Pair<Boolean, Integer> value;
@@ -242,7 +239,7 @@ public class RetryManager {
/** /**
* Report whether data reconnection should be retried * Report whether data reconnection should be retried
* *
* @return {@code true} if the max retires has not been reached. {@code * @return {@code true} if the max retries has not been reached. {@code
* false} otherwise. * false} otherwise.
*/ */
public boolean isRetryNeeded() { public boolean isRetryNeeded() {
@@ -289,7 +286,7 @@ public class RetryManager {
if (mRetryCount > mMaxRetryCount) { if (mRetryCount > mMaxRetryCount) {
mRetryCount = mMaxRetryCount; mRetryCount = mMaxRetryCount;
} }
if (DBG) log("increseRetryCount: " + mRetryCount); if (DBG) log("increaseRetryCount: " + mRetryCount);
} }
/** /**

View File

@@ -207,8 +207,8 @@ public abstract class ServiceStateTracker extends Handler {
} }
/** /**
* Reregister network through toggle perferred network type * Re-register network by toggling preferred network type.
* This is a work aorund to deregister and register network since there is * This is a work-around to deregister and register network since there is
* no ril api to set COPS=2 (deregister) only. * no ril api to set COPS=2 (deregister) only.
* *
* @param onComplete is dispatched when this is complete. it will be * @param onComplete is dispatched when this is complete. it will be
@@ -230,7 +230,7 @@ public abstract class ServiceStateTracker extends Handler {
/** /**
* These two flags manage the behavior of the cell lock -- the * These two flags manage the behavior of the cell lock -- the
* lock should be held if either flag is true. The intention is * lock should be held if either flag is true. The intention is
* to allow temporary aquisition of the lock to get a single * to allow temporary acquisition of the lock to get a single
* update. Such a lock grab and release can thus be made to not * update. Such a lock grab and release can thus be made to not
* interfere with more permanent lock holds -- in other words, the * interfere with more permanent lock holds -- in other words, the
* lock will only be released if both flags are false, and so * lock will only be released if both flags are false, and so

View File

@@ -61,7 +61,7 @@ public final class CdmaCallTracker extends CallTracker {
RegistrantList callWaitingRegistrants = new RegistrantList(); RegistrantList callWaitingRegistrants = new RegistrantList();
// connections dropped durin last poll // connections dropped during last poll
ArrayList<CdmaConnection> droppedDuringPoll ArrayList<CdmaConnection> droppedDuringPoll
= new ArrayList<CdmaConnection>(MAX_CONNECTIONS); = new ArrayList<CdmaConnection>(MAX_CONNECTIONS);

View File

@@ -114,7 +114,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
// if we have no active Apn this is null // if we have no active Apn this is null
protected ApnSetting mActiveApn; protected ApnSetting mActiveApn;
// Possibly promoate to base class, the only difference is // Possibly promote to base class, the only difference is
// the INTENT_RECONNECT_ALARM action is a different string. // the INTENT_RECONNECT_ALARM action is a different string.
// Do consider technology changes if it is promoted. // Do consider technology changes if it is promoted.
BroadcastReceiver mIntentReceiver = new BroadcastReceiver () BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
@@ -420,7 +420,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
CdmaDataConnection conn = findFreeDataConnection(); CdmaDataConnection conn = findFreeDataConnection();
if (conn == null) { if (conn == null) {
if (DBG) log("setupData: No free CdmaDataConnectionfound!"); if (DBG) log("setupData: No free CdmaDataConnection found!");
return false; return false;
} }
@@ -646,7 +646,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
} }
/** /**
* @override com.android.intenral.telephony.DataConnectionTracker * @override com.android.internal.telephony.DataConnectionTracker
*/ */
@Override @Override
protected void onEnableNewApn() { protected void onEnableNewApn() {

View File

@@ -66,7 +66,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
CdmaCellLocation cellLoc; CdmaCellLocation cellLoc;
CdmaCellLocation newCellLoc; CdmaCellLocation newCellLoc;
/** if time between NTIZ updates is less than mNitzUpdateSpacing the update may be ignored. */ /** if time between NITZ updates is less than mNitzUpdateSpacing the update may be ignored. */
private static final int NITZ_UPDATE_SPACING_DEFAULT = 1000 * 60 * 10; private static final int NITZ_UPDATE_SPACING_DEFAULT = 1000 * 60 * 10;
private int mNitzUpdateSpacing = SystemProperties.getInt("ro.nitz_update_spacing", private int mNitzUpdateSpacing = SystemProperties.getInt("ro.nitz_update_spacing",
NITZ_UPDATE_SPACING_DEFAULT); NITZ_UPDATE_SPACING_DEFAULT);
@@ -395,7 +395,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
} }
// Release any temporary cell lock, which could have been // Release any temporary cell lock, which could have been
// aquired to allow a single-shot location update. // acquired to allow a single-shot location update.
disableSingleLocationUpdate(); disableSingleLocationUpdate();
break; break;
@@ -591,7 +591,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
boolean showPlmn = false; boolean showPlmn = false;
int rule = 0; int rule = 0;
if (cm.getRadioState().isRUIMReady()) { if (cm.getRadioState().isRUIMReady()) {
// TODO RUIM SPN is not implemnted, EF_SPN has to be read and Display Condition // TODO RUIM SPN is not implemented, EF_SPN has to be read and Display Condition
// Character Encoding, Language Indicator and SPN has to be set // Character Encoding, Language Indicator and SPN has to be set
// rule = phone.mRuimRecords.getDisplayRule(ss.getOperatorNumeric()); // rule = phone.mRuimRecords.getDisplayRule(ss.getOperatorNumeric());
// spn = phone.mSIMRecords.getServiceProvideName(); // spn = phone.mSIMRecords.getServiceProvideName();
@@ -872,7 +872,6 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
* and start over again if the radio notifies us that some * and start over again if the radio notifies us that some
* event has changed * event has changed
*/ */
private void private void
pollState() { pollState() {
pollingContext = new int[1]; pollingContext = new int[1];
@@ -1260,7 +1259,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
return ServiceState.STATE_IN_SERVICE; return ServiceState.STATE_IN_SERVICE;
case 2: // 2 is "searching", fall through case 2: // 2 is "searching", fall through
case 3: // 3 is "registration denied", fall through case 3: // 3 is "registration denied", fall through
case 4: // 4 is "unknown" no vaild in current baseband case 4: // 4 is "unknown", not valid in current baseband
return ServiceState.STATE_OUT_OF_SERVICE; return ServiceState.STATE_OUT_OF_SERVICE;
case 5:// 5 is "Registered, roaming" case 5:// 5 is "Registered, roaming"
return ServiceState.STATE_IN_SERVICE; return ServiceState.STATE_IN_SERVICE;
@@ -1299,12 +1298,12 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
*/ */
private boolean isRoamIndForHomeSystem(String roamInd) { private boolean isRoamIndForHomeSystem(String roamInd) {
// retrieve the carrier-specified list of ERIs for home system // retrieve the carrier-specified list of ERIs for home system
String homeRoamIndcators = SystemProperties.get("ro.cdma.homesystem"); String homeRoamIndicators = SystemProperties.get("ro.cdma.homesystem");
if (!TextUtils.isEmpty(homeRoamIndcators)) { if (!TextUtils.isEmpty(homeRoamIndicators)) {
// searches through the comma-separated list for a match, // searches through the comma-separated list for a match,
// return true if one is found. // return true if one is found.
for (String homeRoamInd : homeRoamIndcators.split(",")) { for (String homeRoamInd : homeRoamIndicators.split(",")) {
if (homeRoamInd.equals(roamInd)) { if (homeRoamInd.equals(roamInd)) {
return true; return true;
} }

View File

@@ -313,7 +313,7 @@ public class SmsMessage extends SmsMessageBase {
} }
/** /**
* Get an SMS-SUBMIT PDU for a data message to a destination address &amp; port * Get an SMS-SUBMIT PDU for a data message to a destination address and port.
* *
* @param scAddr Service Centre address. null == use default * @param scAddr Service Centre address. null == use default
* @param destAddr the address of the destination for the message * @param destAddr the address of the destination for the message

View File

@@ -56,10 +56,10 @@ public class TtyIntent {
/** /**
* The lookup key for an int that indicates preferred TTY mode. * The lookup key for an int that indicates preferred TTY mode.
* Valid modes are: * Valid modes are:
* - {@link Phone.TTY_MODE_OFF} * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
* - {@link Phone.TTY_MODE_FULL} * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
* - {@link Phone.TTY_MODE_HCO} * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
* - {@link Phone.TTY_MODE_VCO} * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
* *
* {@hide} * {@hide}
*/ */

View File

@@ -66,7 +66,7 @@ public final class GsmCallTracker extends CallTracker {
RegistrantList voiceCallStartedRegistrants = new RegistrantList(); RegistrantList voiceCallStartedRegistrants = new RegistrantList();
// connections dropped durin last poll // connections dropped during last poll
ArrayList<GsmConnection> droppedDuringPoll ArrayList<GsmConnection> droppedDuringPoll
= new ArrayList<GsmConnection>(MAX_CONNECTIONS); = new ArrayList<GsmConnection>(MAX_CONNECTIONS);

View File

@@ -134,7 +134,7 @@ public class GsmDataConnection extends DataConnection {
cause = FailCause.INSUFFICIENT_RESOURCES; cause = FailCause.INSUFFICIENT_RESOURCES;
break; break;
case PDP_FAIL_MISSING_UKNOWN_APN: case PDP_FAIL_MISSING_UKNOWN_APN:
cause = FailCause.MISSING_UKNOWN_APN; cause = FailCause.MISSING_UNKNOWN_APN;
break; break;
case PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE: case PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE:
cause = FailCause.UNKNOWN_PDP_ADDRESS; cause = FailCause.UNKNOWN_PDP_ADDRESS;

View File

@@ -45,7 +45,6 @@ import android.provider.Telephony;
import android.telephony.ServiceState; import android.telephony.ServiceState;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation; import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
import android.util.EventLog; import android.util.EventLog;
import android.util.Log; import android.util.Log;
@@ -150,9 +149,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
static final String APN_ID = "apn_id"; static final String APN_ID = "apn_id";
private boolean canSetPreferApn = false; private boolean canSetPreferApn = false;
// for tracking retrys on the default APN // for tracking retries on the default APN
private RetryManager mDefaultRetryManager; private RetryManager mDefaultRetryManager;
// for tracking retrys on a secondary APN // for tracking retries on a secondary APN
private RetryManager mSecondaryRetryManager; private RetryManager mSecondaryRetryManager;
BroadcastReceiver mIntentReceiver = new BroadcastReceiver () BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
@@ -189,8 +188,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED; WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED;
if (!enabled) { if (!enabled) {
// when wifi got disabeled, the NETWORK_STATE_CHANGED_ACTION // when wifi got disabled, the NETWORK_STATE_CHANGED_ACTION
// quit and wont report disconnected til next enalbing. // quit and won't report disconnected til next enabling.
mIsWifiConnected = false; mIsWifiConnected = false;
} }
} }
@@ -447,7 +446,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
waitingApns = buildWaitingApns(); waitingApns = buildWaitingApns();
if (waitingApns.isEmpty()) { if (waitingApns.isEmpty()) {
if (DBG) log("No APN found"); if (DBG) log("No APN found");
notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN); notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
return false; return false;
} else { } else {
log ("Create from allApns : " + apnListToString(allApns)); log ("Create from allApns : " + apnListToString(allApns));
@@ -1125,7 +1124,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) { if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
SystemProperties.set("gsm.defaultpdpcontext.active", "true"); SystemProperties.set("gsm.defaultpdpcontext.active", "true");
if (canSetPreferApn && preferredApn == null) { if (canSetPreferApn && preferredApn == null) {
Log.d(LOG_TAG, "PREFERED APN is null"); Log.d(LOG_TAG, "PREFERRED APN is null");
preferredApn = mActiveApn; preferredApn = mActiveApn;
setPreferredApn(preferredApn.id); setPreferredApn(preferredApn.id);
} }
@@ -1275,7 +1274,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
if (allApns.isEmpty()) { if (allApns.isEmpty()) {
if (DBG) log("No APN found for carrier: " + operator); if (DBG) log("No APN found for carrier: " + operator);
preferredApn = null; preferredApn = null;
notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN); notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
} else { } else {
preferredApn = getPreferredApn(); preferredApn = getPreferredApn();
Log.d(LOG_TAG, "Get PreferredAPN"); Log.d(LOG_TAG, "Get PreferredAPN");

View File

@@ -39,7 +39,7 @@ import java.util.regex.Matcher;
* {@hide} * {@hide}
* *
*/ */
public final class GsmMmiCode extends Handler implements MmiCode { public final class GsmMmiCode extends Handler implements MmiCode {
static final String LOG_TAG = "GSM"; static final String LOG_TAG = "GSM";
//***** Constants //***** Constants
@@ -51,7 +51,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
static final String ACTION_REGISTER = "**"; static final String ACTION_REGISTER = "**";
static final String ACTION_ERASURE = "##"; static final String ACTION_ERASURE = "##";
// Supp Service cocdes from TS 22.030 Annex B // Supp Service codes from TS 22.030 Annex B
//Called line presentation //Called line presentation
static final String SC_CLIP = "30"; static final String SC_CLIP = "30";
@@ -154,7 +154,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
/** /**
* Some dial strings in GSM are defined to do non-call setup * Some dial strings in GSM are defined to do non-call setup
* things, such as modify or query supplementry service settings (eg, call * things, such as modify or query supplementary service settings (eg, call
* forwarding). These are generally referred to as "MMI codes". * forwarding). These are generally referred to as "MMI codes".
* We look to see if the dial string contains a valid MMI code (potentially * We look to see if the dial string contains a valid MMI code (potentially
* with a dial string at the end as well) and return info here. * with a dial string at the end as well) and return info here.
@@ -457,12 +457,13 @@ public final class GsmMmiCode extends Handler implements MmiCode {
&& !PhoneNumberUtils.isEmergencyNumber(dialString) && !PhoneNumberUtils.isEmergencyNumber(dialString)
&& (phone.isInCall() && (phone.isInCall()
|| !((dialString.length() == 2 && dialString.charAt(0) == '1') || !((dialString.length() == 2 && dialString.charAt(0) == '1')
/* While contrary to TS 22.030, there is strong precendence /* While contrary to TS 22.030, there is strong precedence
* for treating "0" and "00" as call setup strings. * for treating "0" and "00" as call setup strings.
*/ */
|| dialString.equals("0") || dialString.equals("0")
|| dialString.equals("00")))); || dialString.equals("00"))));
} }
/** /**
* @return true if the Service Code is PIN/PIN2/PUK/PUK2-related * @return true if the Service Code is PIN/PIN2/PUK/PUK2-related
*/ */
@@ -472,13 +473,12 @@ public final class GsmMmiCode extends Handler implements MmiCode {
} }
/** /**
* *See TS 22.030 Annex B * See TS 22.030 Annex B.
* In temporary mode, to suppress CLIR for a single call, enter: * In temporary mode, to suppress CLIR for a single call, enter:
* " * 31 # <called number> SEND " * " * 31 # [called number] SEND "
* In temporary mode, to invoke CLIR for a single call enter: * In temporary mode, to invoke CLIR for a single call enter:
* " # 31 # <called number> SEND " * " # 31 # [called number] SEND "
*/ */
boolean boolean
isTemporaryModeCLIR() { isTemporaryModeCLIR() {
return sc != null && sc.equals(SC_CLIR) && dialingNumber != null return sc != null && sc.equals(SC_CLIR) && dialingNumber != null
@@ -779,7 +779,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
// Note that unlike most everything else, the USSD complete // Note that unlike most everything else, the USSD complete
// response does not complete this MMI code...we wait for // response does not complete this MMI code...we wait for
// an unsolicited USSD "Notify" or "Request". // an unsolicited USSD "Notify" or "Request".
// The matching up of this is doene in GSMPhone. // The matching up of this is done in GSMPhone.
phone.mCM.sendUSSD(ussdMessage, phone.mCM.sendUSSD(ussdMessage,
obtainMessage(EVENT_USSD_COMPLETE, this)); obtainMessage(EVENT_USSD_COMPLETE, this));
@@ -1156,7 +1156,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
// Each bit in the service class gets its own result line // Each bit in the service class gets its own result line
// The service classes may be split up over multiple // The service classes may be split up over multiple
// CallForwardInfos. So, for each service classs, find out // CallForwardInfos. So, for each service class, find out
// which CallForwardInfo represents it and then build // which CallForwardInfo represents it and then build
// the response text based on that // the response text based on that

View File

@@ -40,7 +40,6 @@ import android.provider.Settings.SettingNotFoundException;
import android.provider.Telephony.Intents; import android.provider.Telephony.Intents;
import android.telephony.ServiceState; import android.telephony.ServiceState;
import android.telephony.SignalStrength; import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation; import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Config; import android.util.Config;
@@ -130,7 +129,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
*/ */
private boolean mNeedToRegForSimLoaded; private boolean mNeedToRegForSimLoaded;
/** Started the recheck process after finding gprs should registerd but not. */ /** Started the recheck process after finding gprs should registered but not. */
private boolean mStartedGprsRegCheck = false; private boolean mStartedGprsRegCheck = false;
/** Already sent the event-log for no gprs register. */ /** Already sent the event-log for no gprs register. */
@@ -415,7 +414,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
} }
// Release any temporary cell lock, which could have been // Release any temporary cell lock, which could have been
// aquired to allow a single-shot location update. // acquired to allow a single-shot location update.
disableSingleLocationUpdate(); disableSingleLocationUpdate();
break; break;
@@ -500,9 +499,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
break; break;
case EVENT_CHECK_REPORT_GPRS: case EVENT_CHECK_REPORT_GPRS:
if (ss != null && !isGprsConsistant(gprsState, ss.getState())) { if (ss != null && !isGprsConsistent(gprsState, ss.getState())) {
// Can't register data sevice while voice service is ok // Can't register data service while voice service is ok
// i.e. CREG is ok while CGREG is not // i.e. CREG is ok while CGREG is not
// possible a network or baseband side error // possible a network or baseband side error
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation()); GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
@@ -1027,7 +1026,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
phone.notifyLocationChanged(); phone.notifyLocationChanged();
} }
if (! isGprsConsistant(gprsState, ss.getState())) { if (! isGprsConsistent(gprsState, ss.getState())) {
if (!mStartedGprsRegCheck && !mReportedGprsNoReg) { if (!mStartedGprsRegCheck && !mReportedGprsNoReg) {
mStartedGprsRegCheck = true; mStartedGprsRegCheck = true;
@@ -1044,13 +1043,13 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
} }
/** /**
* Check if GPRS got registred while voice is registered * Check if GPRS got registered while voice is registered.
* *
* @param gprsState for GPRS registration state, i.e. CGREG in GSM * @param gprsState for GPRS registration state, i.e. CGREG in GSM
* @param serviceState for voice registration state, i.e. CREG in GSM * @param serviceState for voice registration state, i.e. CREG in GSM
* @return false if device only register to voice but not gprs * @return false if device only register to voice but not gprs
*/ */
private boolean isGprsConsistant (int gprsState, int serviceState) { private boolean isGprsConsistent(int gprsState, int serviceState) {
return !((serviceState == ServiceState.STATE_IN_SERVICE) && return !((serviceState == ServiceState.STATE_IN_SERVICE) &&
(gprsState != ServiceState.STATE_IN_SERVICE)); (gprsState != ServiceState.STATE_IN_SERVICE));
} }
@@ -1105,13 +1104,13 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
long nextTime; long nextTime;
// TODO Done't poll signal strength if screen is off // TODO Don't poll signal strength if screen is off
sendMessageDelayed(msg, POLL_PERIOD_MILLIS); sendMessageDelayed(msg, POLL_PERIOD_MILLIS);
} }
/** /**
* send signal-strength-changed notification if changed * Send signal-strength-changed notification if changed.
* Called both for solicited and unsolicited signal stength updates * Called both for solicited and unsolicited signal strength updates.
*/ */
private void onSignalStrengthResult(AsyncResult ar) { private void onSignalStrengthResult(AsyncResult ar) {
SignalStrength oldSignalStrength = mSignalStrength; SignalStrength oldSignalStrength = mSignalStrength;
@@ -1332,7 +1331,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
/** /**
* @return true if phone is camping on a technology (eg UMTS) * @return true if phone is camping on a technology (eg UMTS)
* that could support voice and data simultaniously. * that could support voice and data simultaneously.
*/ */
boolean isConcurrentVoiceAndData() { boolean isConcurrentVoiceAndData() {
return (networkType >= DATA_ACCESS_UMTS); return (networkType >= DATA_ACCESS_UMTS);