merge from open-source master
Change-Id: Ib711450566694550d9cb9ba01c25599010d2e5e4
This commit is contained in:
@@ -57,7 +57,7 @@ public class ServiceState implements Parcelable {
|
||||
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;
|
||||
|
||||
@@ -220,7 +220,8 @@ public class ServiceState implements Parcelable {
|
||||
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) {
|
||||
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_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 CDMA, returns the ERI text, if set, otherwise the ONS
|
||||
* In GSM/UMTS, long format can be up to 16 characters long.
|
||||
* In CDMA, returns the ERI text, if set. Otherwise, returns the ONS.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@@ -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
|
||||
* network code
|
||||
*
|
||||
* The country code can be decoded using MccTable.countryCodeForMcc()
|
||||
* network code.
|
||||
*
|
||||
* @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() {
|
||||
return mOperatorNumeric;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current network selection mode
|
||||
* Get current network selection mode.
|
||||
*
|
||||
* @return true if manual mode, false if automatic mode
|
||||
*/
|
||||
@@ -458,7 +461,7 @@ public class ServiceState implements Parcelable {
|
||||
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() {
|
||||
mState = STATE_POWER_OFF;
|
||||
mRoaming = false;
|
||||
@@ -528,8 +531,8 @@ public class ServiceState implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* In CDMA mOperatorAlphaLong can be set from the ERI
|
||||
* text, this is done from the CDMAPhone and not from the CdmaServiceStateTracker
|
||||
* In CDMA, mOperatorAlphaLong can be set from the ERI text.
|
||||
* This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
|
||||
*
|
||||
* @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 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
|
||||
* @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
|
||||
* @hide
|
||||
|
||||
@@ -56,7 +56,7 @@ import java.util.ArrayList;
|
||||
* the current default SMSC
|
||||
* @param text the body of the message to send
|
||||
* @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,
|
||||
* or one of these errors:
|
||||
* <code>RESULT_ERROR_GENERIC_FAILURE</code>
|
||||
|
||||
@@ -284,7 +284,7 @@ public class CallerInfoAsyncQuery {
|
||||
*/
|
||||
public static CallerInfoAsyncQuery startQuery(int token, Context context, String number,
|
||||
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));
|
||||
|
||||
CallerInfoAsyncQuery c = new CallerInfoAsyncQuery();
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class Connection {
|
||||
POWER_OFF, /* radio is turned off explicitly */
|
||||
OUT_OF_SERVICE, /* out of service */
|
||||
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 */
|
||||
CS_RESTRICTED, /* call was blocked by restricted all 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_REORDER, /* MS has been redirected, call is cancelled */
|
||||
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_PREEMPTED,
|
||||
CDMA_NOT_EMERGENCY, /* not an emergency call */
|
||||
@@ -69,8 +69,8 @@ public abstract class Connection {
|
||||
/* Instance Methods */
|
||||
|
||||
/**
|
||||
* Gets address (e.g., phone number) associated with connection
|
||||
* TODO: distinguish reasons for unavailablity
|
||||
* Gets address (e.g. phone number) associated with connection.
|
||||
* TODO: distinguish reasons for unavailability
|
||||
*
|
||||
* @return address or null if unavailable
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ public abstract class Connection {
|
||||
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
|
||||
*/
|
||||
public String getCnapName() {
|
||||
@@ -86,15 +86,15 @@ public abstract class Connection {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get orignal dial string
|
||||
* @return orignal dial string or null if unavailable
|
||||
* Get original dial string.
|
||||
* @return original dial string or null if unavailable
|
||||
*/
|
||||
public String getOrigDialString(){
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets cdma CNAP presentation associated with connection
|
||||
* Gets CDMA CNAP presentation associated with connection.
|
||||
* @return cnap name or null if unavailable
|
||||
*/
|
||||
|
||||
@@ -116,45 +116,45 @@ public abstract class Connection {
|
||||
public abstract long getCreateTime();
|
||||
|
||||
/**
|
||||
* Connection connect time in currentTimeMillis() format
|
||||
* For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition
|
||||
* For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition
|
||||
* Returns 0 before then
|
||||
* Connection connect time in currentTimeMillis() format.
|
||||
* For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition.
|
||||
* For incoming calls: Begins at (INCOMING|WAITING) -> ACTIVE transition.
|
||||
* Returns 0 before then.
|
||||
*/
|
||||
public abstract long getConnectTime();
|
||||
|
||||
/**
|
||||
* Disconnect time in currentTimeMillis() format
|
||||
* The time when this Connection makes a transition into ENDED or FAIL
|
||||
* Returns 0 before then
|
||||
* Disconnect time in currentTimeMillis() format.
|
||||
* The time when this Connection makes a transition into ENDED or FAIL.
|
||||
* Returns 0 before then.
|
||||
*/
|
||||
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.
|
||||
* If the call is still connected, then returns the elapsed
|
||||
* time since connect
|
||||
* time since connect.
|
||||
*/
|
||||
public abstract long getDurationMillis();
|
||||
|
||||
/**
|
||||
* If this connection is HOLDING, return the number of milliseconds
|
||||
* that it has been on hold for (approximently)
|
||||
* If this connection is in any other state, return 0
|
||||
* that it has been on hold for (approximately).
|
||||
* If this connection is in any other state, return 0.
|
||||
*/
|
||||
|
||||
public abstract long getHoldDurationMillis();
|
||||
|
||||
/**
|
||||
* Returns "NOT_DISCONNECTED" if not yet disconnected
|
||||
* Returns "NOT_DISCONNECTED" if not yet disconnected.
|
||||
*/
|
||||
public abstract DisconnectCause getDisconnectCause();
|
||||
|
||||
/**
|
||||
* Returns true of this connection originated elsewhere
|
||||
* ("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();
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ public abstract class DataConnection extends HierarchicalStateMachine {
|
||||
NONE,
|
||||
OPERATOR_BARRED,
|
||||
INSUFFICIENT_RESOURCES,
|
||||
MISSING_UKNOWN_APN,
|
||||
MISSING_UNKNOWN_APN,
|
||||
UNKNOWN_PDP_ADDRESS,
|
||||
USER_AUTHENTICATION,
|
||||
ACTIVATION_REJECT_GGSN,
|
||||
@@ -181,7 +181,7 @@ public abstract class DataConnection extends HierarchicalStateMachine {
|
||||
RADIO_NOT_AVAILABLE;
|
||||
|
||||
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 == ACTIVATION_REJECT_GGSN) || (this == ACTIVATION_REJECT_UNSPECIFIED) ||
|
||||
(this == SERVICE_OPTION_NOT_SUPPORTED) ||
|
||||
@@ -208,12 +208,12 @@ public abstract class DataConnection extends HierarchicalStateMachine {
|
||||
return "Operator Barred";
|
||||
case INSUFFICIENT_RESOURCES:
|
||||
return "Insufficient Resources";
|
||||
case MISSING_UKNOWN_APN:
|
||||
case MISSING_UNKNOWN_APN:
|
||||
return "Missing / Unknown APN";
|
||||
case UNKNOWN_PDP_ADDRESS:
|
||||
return "Unknown PDP Address";
|
||||
case USER_AUTHENTICATION:
|
||||
return "Error User Autentication";
|
||||
return "Error User Authentication";
|
||||
case ACTIVATION_REJECT_GGSN:
|
||||
return "Activation Reject GGSN";
|
||||
case ACTIVATION_REJECT_UNSPECIFIED:
|
||||
|
||||
@@ -243,15 +243,14 @@ public interface Phone {
|
||||
/**
|
||||
* Get the current DataState. No change notification exists at this
|
||||
* interface -- use
|
||||
* {@link com.android.telephony.PhoneStateListener PhoneStateListener}
|
||||
* instead.
|
||||
* {@link android.telephony.PhoneStateListener} instead.
|
||||
*/
|
||||
DataState getDataConnectionState();
|
||||
|
||||
/**
|
||||
* Get the current DataActivityState. No change notification exists at this
|
||||
* interface -- use
|
||||
* {@link TelephonyManager} instead.
|
||||
* {@link android.telephony.TelephonyManager} instead.
|
||||
*/
|
||||
DataActivityState getDataActivityState();
|
||||
|
||||
@@ -853,7 +852,7 @@ public interface Phone {
|
||||
* @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 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);
|
||||
@@ -993,7 +992,7 @@ public interface Phone {
|
||||
* ((AsyncResult)onComplete.obj) is an array of int, with a length of 2.
|
||||
*
|
||||
* @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);
|
||||
|
||||
@@ -1015,7 +1014,7 @@ public interface Phone {
|
||||
* ((AsyncResult)onComplete.obj) is an array of int, with a length of 1.
|
||||
*
|
||||
* @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);
|
||||
|
||||
@@ -1458,7 +1457,7 @@ public interface Phone {
|
||||
* setTTYMode
|
||||
* 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.
|
||||
* @param onComplete a callback message when the action is completed
|
||||
*/
|
||||
|
||||
@@ -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() {
|
||||
mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE");
|
||||
|
||||
@@ -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() {
|
||||
return mPhoneSubInfo.getSubscriberId();
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* may be initialized using configure with three integer parameters
|
||||
* The other configure method allows a series to be declared using
|
||||
@@ -54,18 +54,18 @@ import java.util.ArrayList;
|
||||
*<p>
|
||||
* Examples:
|
||||
* <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>
|
||||
*
|
||||
* <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:
|
||||
* <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:
|
||||
* <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.
|
||||
* <ul><li><code>"max_retries=infinite,1000,2000,3000</code></ul>
|
||||
* </ul>
|
||||
@@ -75,9 +75,6 @@ import java.util.ArrayList;
|
||||
public class RetryManager {
|
||||
static public final String LOG_TAG = "RetryManager";
|
||||
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
|
||||
@@ -104,7 +101,7 @@ public class RetryManager {
|
||||
*/
|
||||
private int mMaxRetryCount;
|
||||
|
||||
/** The current number of retires */
|
||||
/** The current number of retries */
|
||||
private int mRetryCount;
|
||||
|
||||
/** Random number generator */
|
||||
@@ -125,7 +122,7 @@ public class RetryManager {
|
||||
* @param randomizationTime a random value between 0 and
|
||||
* randomizationTime will be added to retryTime. this
|
||||
* parameter may be 0.
|
||||
* @return true if successfull
|
||||
* @return true if successful
|
||||
*/
|
||||
public boolean configure(int maxRetryCount, int retryTime, int randomizationTime) {
|
||||
Pair<Boolean, Integer> value;
|
||||
@@ -242,7 +239,7 @@ public class RetryManager {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public boolean isRetryNeeded() {
|
||||
@@ -289,7 +286,7 @@ public class RetryManager {
|
||||
if (mRetryCount > mMaxRetryCount) {
|
||||
mRetryCount = mMaxRetryCount;
|
||||
}
|
||||
if (DBG) log("increseRetryCount: " + mRetryCount);
|
||||
if (DBG) log("increaseRetryCount: " + mRetryCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -207,8 +207,8 @@ public abstract class ServiceStateTracker extends Handler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reregister network through toggle perferred network type
|
||||
* This is a work aorund to deregister and register network since there is
|
||||
* Re-register network by toggling preferred network type.
|
||||
* This is a work-around to deregister and register network since there is
|
||||
* no ril api to set COPS=2 (deregister) only.
|
||||
*
|
||||
* @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
|
||||
* 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
|
||||
* interfere with more permanent lock holds -- in other words, the
|
||||
* lock will only be released if both flags are false, and so
|
||||
|
||||
@@ -61,7 +61,7 @@ public final class CdmaCallTracker extends CallTracker {
|
||||
RegistrantList callWaitingRegistrants = new RegistrantList();
|
||||
|
||||
|
||||
// connections dropped durin last poll
|
||||
// connections dropped during last poll
|
||||
ArrayList<CdmaConnection> droppedDuringPoll
|
||||
= new ArrayList<CdmaConnection>(MAX_CONNECTIONS);
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
||||
// if we have no active Apn this is null
|
||||
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.
|
||||
// Do consider technology changes if it is promoted.
|
||||
BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
|
||||
@@ -420,7 +420,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
|
||||
CdmaDataConnection conn = findFreeDataConnection();
|
||||
|
||||
if (conn == null) {
|
||||
if (DBG) log("setupData: No free CdmaDataConnectionfound!");
|
||||
if (DBG) log("setupData: No free CdmaDataConnection found!");
|
||||
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
|
||||
protected void onEnableNewApn() {
|
||||
|
||||
@@ -66,7 +66,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
CdmaCellLocation cellLoc;
|
||||
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 int mNitzUpdateSpacing = SystemProperties.getInt("ro.nitz_update_spacing",
|
||||
NITZ_UPDATE_SPACING_DEFAULT);
|
||||
@@ -395,7 +395,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
}
|
||||
|
||||
// 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();
|
||||
break;
|
||||
|
||||
@@ -591,7 +591,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
boolean showPlmn = false;
|
||||
int rule = 0;
|
||||
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
|
||||
// rule = phone.mRuimRecords.getDisplayRule(ss.getOperatorNumeric());
|
||||
// spn = phone.mSIMRecords.getServiceProvideName();
|
||||
@@ -872,7 +872,6 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
* and start over again if the radio notifies us that some
|
||||
* event has changed
|
||||
*/
|
||||
|
||||
private void
|
||||
pollState() {
|
||||
pollingContext = new int[1];
|
||||
@@ -1260,7 +1259,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
return ServiceState.STATE_IN_SERVICE;
|
||||
case 2: // 2 is "searching", 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;
|
||||
case 5:// 5 is "Registered, roaming"
|
||||
return ServiceState.STATE_IN_SERVICE;
|
||||
@@ -1299,12 +1298,12 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
*/
|
||||
private boolean isRoamIndForHomeSystem(String roamInd) {
|
||||
// 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,
|
||||
// return true if one is found.
|
||||
for (String homeRoamInd : homeRoamIndcators.split(",")) {
|
||||
for (String homeRoamInd : homeRoamIndicators.split(",")) {
|
||||
if (homeRoamInd.equals(roamInd)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class SmsMessage extends SmsMessageBase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an SMS-SUBMIT PDU for a data message to a destination address & 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 destAddr the address of the destination for the message
|
||||
|
||||
@@ -56,10 +56,10 @@ public class TtyIntent {
|
||||
/**
|
||||
* The lookup key for an int that indicates preferred TTY mode.
|
||||
* Valid modes are:
|
||||
* - {@link Phone.TTY_MODE_OFF}
|
||||
* - {@link Phone.TTY_MODE_FULL}
|
||||
* - {@link Phone.TTY_MODE_HCO}
|
||||
* - {@link Phone.TTY_MODE_VCO}
|
||||
* - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
||||
* - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
||||
* - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
||||
* - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class GsmCallTracker extends CallTracker {
|
||||
RegistrantList voiceCallStartedRegistrants = new RegistrantList();
|
||||
|
||||
|
||||
// connections dropped durin last poll
|
||||
// connections dropped during last poll
|
||||
ArrayList<GsmConnection> droppedDuringPoll
|
||||
= new ArrayList<GsmConnection>(MAX_CONNECTIONS);
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ public class GsmDataConnection extends DataConnection {
|
||||
cause = FailCause.INSUFFICIENT_RESOURCES;
|
||||
break;
|
||||
case PDP_FAIL_MISSING_UKNOWN_APN:
|
||||
cause = FailCause.MISSING_UKNOWN_APN;
|
||||
cause = FailCause.MISSING_UNKNOWN_APN;
|
||||
break;
|
||||
case PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE:
|
||||
cause = FailCause.UNKNOWN_PDP_ADDRESS;
|
||||
|
||||
@@ -45,7 +45,6 @@ import android.provider.Telephony;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
import android.text.TextUtils;
|
||||
import android.util.EventLog;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -150,9 +149,9 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
static final String APN_ID = "apn_id";
|
||||
private boolean canSetPreferApn = false;
|
||||
|
||||
// for tracking retrys on the default APN
|
||||
// for tracking retries on the default APN
|
||||
private RetryManager mDefaultRetryManager;
|
||||
// for tracking retrys on a secondary APN
|
||||
// for tracking retries on a secondary APN
|
||||
private RetryManager mSecondaryRetryManager;
|
||||
|
||||
BroadcastReceiver mIntentReceiver = new BroadcastReceiver ()
|
||||
@@ -189,8 +188,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED;
|
||||
|
||||
if (!enabled) {
|
||||
// when wifi got disabeled, the NETWORK_STATE_CHANGED_ACTION
|
||||
// quit and wont report disconnected til next enalbing.
|
||||
// when wifi got disabled, the NETWORK_STATE_CHANGED_ACTION
|
||||
// quit and won't report disconnected til next enabling.
|
||||
mIsWifiConnected = false;
|
||||
}
|
||||
}
|
||||
@@ -447,7 +446,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
waitingApns = buildWaitingApns();
|
||||
if (waitingApns.isEmpty()) {
|
||||
if (DBG) log("No APN found");
|
||||
notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN);
|
||||
notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
|
||||
return false;
|
||||
} else {
|
||||
log ("Create from allApns : " + apnListToString(allApns));
|
||||
@@ -1125,7 +1124,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {
|
||||
SystemProperties.set("gsm.defaultpdpcontext.active", "true");
|
||||
if (canSetPreferApn && preferredApn == null) {
|
||||
Log.d(LOG_TAG, "PREFERED APN is null");
|
||||
Log.d(LOG_TAG, "PREFERRED APN is null");
|
||||
preferredApn = mActiveApn;
|
||||
setPreferredApn(preferredApn.id);
|
||||
}
|
||||
@@ -1275,7 +1274,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
if (allApns.isEmpty()) {
|
||||
if (DBG) log("No APN found for carrier: " + operator);
|
||||
preferredApn = null;
|
||||
notifyNoData(GsmDataConnection.FailCause.MISSING_UKNOWN_APN);
|
||||
notifyNoData(GsmDataConnection.FailCause.MISSING_UNKNOWN_APN);
|
||||
} else {
|
||||
preferredApn = getPreferredApn();
|
||||
Log.d(LOG_TAG, "Get PreferredAPN");
|
||||
|
||||
@@ -39,7 +39,7 @@ import java.util.regex.Matcher;
|
||||
* {@hide}
|
||||
*
|
||||
*/
|
||||
public final class GsmMmiCode extends Handler implements MmiCode {
|
||||
public final class GsmMmiCode extends Handler implements MmiCode {
|
||||
static final String LOG_TAG = "GSM";
|
||||
|
||||
//***** Constants
|
||||
@@ -51,7 +51,7 @@ public final class GsmMmiCode extends Handler implements MmiCode {
|
||||
static final String ACTION_REGISTER = "**";
|
||||
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
|
||||
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
|
||||
* 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".
|
||||
* 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.
|
||||
@@ -457,12 +457,13 @@ public final class GsmMmiCode extends Handler implements MmiCode {
|
||||
&& !PhoneNumberUtils.isEmergencyNumber(dialString)
|
||||
&& (phone.isInCall()
|
||||
|| !((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.
|
||||
*/
|
||||
|| dialString.equals("0")
|
||||
|| dialString.equals("00"))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @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:
|
||||
* " * 31 # <called number> SEND "
|
||||
* " * 31 # [called number] SEND "
|
||||
* In temporary mode, to invoke CLIR for a single call enter:
|
||||
* " # 31 # <called number> SEND "
|
||||
* " # 31 # [called number] SEND "
|
||||
*/
|
||||
|
||||
boolean
|
||||
isTemporaryModeCLIR() {
|
||||
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
|
||||
// response does not complete this MMI code...we wait for
|
||||
// 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,
|
||||
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
|
||||
// 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
|
||||
// the response text based on that
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ import android.provider.Settings.SettingNotFoundException;
|
||||
import android.provider.Telephony.Intents;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.SignalStrength;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Config;
|
||||
@@ -130,7 +129,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
||||
*/
|
||||
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;
|
||||
|
||||
/** 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
|
||||
// aquired to allow a single-shot location update.
|
||||
// acquired to allow a single-shot location update.
|
||||
disableSingleLocationUpdate();
|
||||
break;
|
||||
|
||||
@@ -500,9 +499,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
||||
break;
|
||||
|
||||
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
|
||||
// possible a network or baseband side error
|
||||
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
|
||||
@@ -1027,7 +1026,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
||||
phone.notifyLocationChanged();
|
||||
}
|
||||
|
||||
if (! isGprsConsistant(gprsState, ss.getState())) {
|
||||
if (! isGprsConsistent(gprsState, ss.getState())) {
|
||||
if (!mStartedGprsRegCheck && !mReportedGprsNoReg) {
|
||||
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 serviceState for voice registration state, i.e. CREG in GSM
|
||||
* @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) &&
|
||||
(gprsState != ServiceState.STATE_IN_SERVICE));
|
||||
}
|
||||
@@ -1105,13 +1104,13 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* send signal-strength-changed notification if changed
|
||||
* Called both for solicited and unsolicited signal stength updates
|
||||
* Send signal-strength-changed notification if changed.
|
||||
* Called both for solicited and unsolicited signal strength updates.
|
||||
*/
|
||||
private void onSignalStrengthResult(AsyncResult ar) {
|
||||
SignalStrength oldSignalStrength = mSignalStrength;
|
||||
@@ -1332,7 +1331,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
|
||||
|
||||
/**
|
||||
* @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() {
|
||||
return (networkType >= DATA_ACCESS_UMTS);
|
||||
|
||||
Reference in New Issue
Block a user