Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ea4498f authored by Jake Hamby's avatar Jake Hamby Committed by Steve Kondik
Browse files

Fix some typos and other cosmetic cleanups in telephony framework.

- Fix typos in Javadoc and comments.
- Fix Javadoc @link references to other classes/methods.
- Rename MISSING_UKNOWN_APN to MISSING_UNKNOWN_APN in DataConnection.
- Remove unused (and misspelled) RETRYIES_* consts in RetryManager.

Change-Id: I3b44ac8320d6c1e4c350be600c7ef266aaf735e4
parent 0f19536a
Loading
Loading
Loading
Loading
+20 −18
Original line number Diff line number Diff line
@@ -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;

@@ -213,7 +213,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);
        }
@@ -224,7 +225,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
@@ -276,10 +277,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
     */
@@ -288,9 +289,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
     */
@@ -299,12 +300,13 @@ 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
     * network code.
     *
     * The country code can be decoded using MccTable.countryCodeForMcc()
     * The country code can be decoded using
     * {@link com.android.internal.telephony.MccTable#countryCodeForMcc(int)}.
     *
     * @return numeric format of operator, null if unregistered or unknown
     */
@@ -313,7 +315,7 @@ public class ServiceState implements Parcelable {
    }

    /**
     * Get current network selection mode
     * Get current network selection mode.
     *
     * @return true if manual mode, false if automatic mode
     */
@@ -438,7 +440,7 @@ public class ServiceState implements Parcelable {
        mCdmaEriIconMode = -1;
    }

    // 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;
@@ -499,8 +501,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
     */
@@ -513,7 +515,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
@@ -524,7 +526,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
@@ -545,7 +547,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
+1 −1
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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();
+21 −21
Original line number Diff line number Diff line
@@ -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 */
@@ -55,7 +55,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 */
@@ -68,8 +68,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
     */
@@ -77,7 +77,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() {
@@ -85,15 +85,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
     */

@@ -115,45 +115,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();

+4 −4
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public abstract class DataConnection extends Handler {
        NONE,
        OPERATOR_BARRED,
        INSUFFICIENT_RESOURCES,
        MISSING_UKNOWN_APN,
        MISSING_UNKNOWN_APN,
        UNKNOWN_PDP_ADDRESS,
        USER_AUTHENTICATION,
        ACTIVATION_REJECT_GGSN,
@@ -75,7 +75,7 @@ public abstract class DataConnection extends Handler {
        RADIO_ERROR_RETRY;

        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) ||
@@ -102,12 +102,12 @@ public abstract class DataConnection extends Handler {
                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:
Loading