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

Commit ffc69362 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Moving classes that must be used by an ImsService to base/

This change moves classes that need to be used by an unbundled
ImsService to frameworks/base to facilitate its usage.

Bug: 30290416
Test: Build and run device
Change-Id: Id90f09ff445a6918996e35dc83e55ec98238de89
parent b5f30c78
Loading
Loading
Loading
Loading
+0 −243
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except compliance with the License.
 * You may obtaa copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.ims;

import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;

/*
 * Stub for IImsCallSessionListener interface. To enable forward compatibility during
 * development - empty APIs should not be deployed. To be used in vendor code - not in
 * framework code (since framework should be updated whenever interface is updated).
 *
 * @hide
 */
public abstract class ImsCallSessionListenerBase extends IImsCallSessionListener.Stub {
    /**
     * Notifies the result of the basic session operation (setup / terminate).
     */
    @Override
    public void callSessionProgressing(IImsCallSession session, ImsStreamMediaProfile profile) {
        // no-op
    }

    @Override
    public void callSessionStarted(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionStartFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionTerminated(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    /**
     * Notifies the result of the call hold/resume operation.
     */
    @Override
    public void callSessionHeld(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionHoldFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionHoldReceived(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionResumed(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionResumeFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionResumeReceived(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    /**
     * Notifies the result of call merge operation.
     */
    @Override
    public void callSessionMergeStarted(IImsCallSession session, IImsCallSession newSession,
            ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionMergeComplete(IImsCallSession session) {
        // no-op
    }

    @Override
    public void callSessionMergeFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    /**
     * Notifies the result of call upgrade / downgrade or any other call
     * updates.
     */
    @Override
    public void callSessionUpdated(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionUpdateFailed(IImsCallSession session, ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionUpdateReceived(IImsCallSession session, ImsCallProfile profile) {
        // no-op
    }

    /**
     * Notifies the result of conference extension.
     */
    @Override
    public void callSessionConferenceExtended(IImsCallSession session, IImsCallSession newSession,
            ImsCallProfile profile) {
        // no-op
    }

    @Override
    public void callSessionConferenceExtendFailed(IImsCallSession session,
            ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionConferenceExtendReceived(IImsCallSession session,
            IImsCallSession newSession,
            ImsCallProfile profile) {
        // no-op
    }

    /**
     * Notifies the result of the participant invitation / removal to/from the
     * conference session.
     */
    @Override
    public void callSessionInviteParticipantsRequestDelivered(IImsCallSession session) {
        // no-op
    }

    @Override
    public void callSessionInviteParticipantsRequestFailed(IImsCallSession session,
            ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionRemoveParticipantsRequestDelivered(IImsCallSession session) {
        // no-op
    }

    @Override
    public void callSessionRemoveParticipantsRequestFailed(IImsCallSession session,
            ImsReasonInfo reasonInfo) {
        // no-op
    }

    /**
     * Notifies the changes of the conference info. the conference session.
     */
    @Override
    public void callSessionConferenceStateUpdated(IImsCallSession session,
            ImsConferenceState state) {
        // no-op
    }

    /**
     * Notifies the incoming USSD message.
     */
    @Override
    public void callSessionUssdMessageReceived(IImsCallSession session, int mode,
            String ussdMessage) {
        // no-op
    }

    /**
     * Notifies of handover information for this call
     */
    @Override
    public void callSessionHandover(IImsCallSession session, int srcAccessTech,
            int targetAccessTech,
            ImsReasonInfo reasonInfo) {
        // no-op
    }

    @Override
    public void callSessionHandoverFailed(IImsCallSession session, int srcAccessTech,
            int targetAccessTech,
            ImsReasonInfo reasonInfo) {
        // no-op
    }

    /**
     * Notifies the TTY mode change by remote party.
     *
     * @param mode one of the following: -
     *            {@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}
     */
    @Override
    public void callSessionTtyModeReceived(IImsCallSession session, int mode) {
        // no-op
    }

    /**
     * Notifies of a change to the multiparty state for this
     * {@code ImsCallSession}.
     *
     * @param session The call session.
     * @param isMultiParty {@code true} if the session became multiparty,
     *            {@code false} otherwise.
     */
    @Override
    public void callSessionMultipartyStateChanged(IImsCallSession session, boolean isMultiParty) {
        // no-op
    }

    /**
     * Notifies the supplementary service information for the current session.
     */
    @Override
    public void callSessionSuppServiceReceived(IImsCallSession session,
            ImsSuppServiceNotification suppSrvNotification) {
        // no-op
    }
}
+0 −695

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.ims;

/**
 * This class defines a general IMS-related exception.
 *
 * @hide
 */
public class ImsException extends Exception {

    /**
     * Refer to CODE_LOCAL_* in {@link ImsReasonInfo}
     */
    private int mCode;

    public ImsException() {
    }

    public ImsException(String message, int code) {
        super(message + ", code = " + code);
        mCode = code;
    }

    public ImsException(String message, Throwable cause, int code) {
        super(message, cause);
        mCode = code;
    }

    /**
     * Gets the detailed exception code when ImsException is throwed
     *
     * @return the exception code in {@link ImsReasonInfo}
     */
    public int getCode() {
        return mCode;
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.ims;
/**
 * This class defines an identifier for each IMS service category.
 *
 * @deprecated Use {@link android.telephony.ims.feature.ImsFeature} definitions instead.
 * @hide
 */
public class ImsServiceClass {
+0 −179
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.ims;

import android.os.Message;

/**
 * Provides APIs for the supplementary service settings using IMS (Ut interface).
 * It is created from 3GPP TS 24.623 (XCAP(XML Configuration Access Protocol)
 * over the Ut interface for manipulating supplementary services).
 *
 * @hide
 */
public interface ImsUtInterface {
    /**
     * Actions
     * @hide
     */
    public static final int ACTION_DEACTIVATION = 0;
    public static final int ACTION_ACTIVATION = 1;
    public static final int ACTION_REGISTRATION = 3;
    public static final int ACTION_ERASURE = 4;
    public static final int ACTION_INTERROGATION = 5;

    /**
     * OIR (Originating Identification Restriction, 3GPP TS 24.607)
     * OIP (Originating Identification Presentation, 3GPP TS 24.607)
     * TIR (Terminating Identification Restriction, 3GPP TS 24.608)
     * TIP (Terminating Identification Presentation, 3GPP TS 24.608)
     */
    public static final int OIR_DEFAULT = 0;    // "user subscription default value"
    public static final int OIR_PRESENTATION_RESTRICTED = 1;
    public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2;

    /**
     * CW (Communication Waiting, 3GPP TS 24.615)
     */

    /**
     * CDIV (Communication Diversion, 3GPP TS 24.604)
     *     actions: target, no reply timer
     */
    public static final int CDIV_CF_UNCONDITIONAL = 0;
    public static final int CDIV_CF_BUSY = 1;
    public static final int CDIV_CF_NO_REPLY = 2;
    public static final int CDIV_CF_NOT_REACHABLE = 3;
    // For CS service code: 002
    public static final int CDIV_CF_ALL = 4;
    // For CS service code: 004
    public static final int CDIV_CF_ALL_CONDITIONAL = 5;
    // It's only supported in the IMS service (CS does not define it).
    // IR.92 recommends that an UE activates both the CFNRc and the CFNL
    // (CDIV using condition not-registered) to the same target.
    public static final int CDIV_CF_NOT_LOGGED_IN = 6;

    /**
     * CB (Communication Barring, 3GPP TS 24.611)
     */
    // Barring of All Incoming Calls
    public static final int CB_BAIC = 1;
    // Barring of All Outgoing Calls
    public static final int CB_BAOC = 2;
    // Barring of Outgoing International Calls
    public static final int CB_BOIC = 3;
    // Barring of Outgoing International Calls - excluding Home Country
    public static final int CB_BOIC_EXHC = 4;
    // Barring of Incoming Calls - when roaming
    public static final int CB_BIC_WR = 5;
    // Barring of Anonymous Communication Rejection (ACR) - a particular case of ICB service
    public static final int CB_BIC_ACR = 6;
    // Barring of All Calls
    public static final int CB_BA_ALL = 7;
    // Barring of Outgoing Services (Service Code 333 - 3GPP TS 22.030 Table B-1)
    public static final int CB_BA_MO = 8;
    // Barring of Incoming Services (Service Code 353 - 3GPP TS 22.030 Table B-1)
    public static final int CB_BA_MT = 9;
    // Barring of Specific Incoming calls
    public static final int CB_BS_MT = 10;

    /**
     * Invalid result value.
     */
    public static final int INVALID = (-1);



    /**
     * Operations for the supplementary service configuration
     */

    /**
     * Retrieves the configuration of the call barring.
     * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
     */
    public void queryCallBarring(int cbType, Message result);

    /**
     * Retrieves the configuration of the call forward.
     * The return value of ((AsyncResult)result.obj) is an array of {@link ImsCallForwardInfo}.
     */
    public void queryCallForward(int condition, String number, Message result);

    /**
     * Retrieves the configuration of the call waiting.
     * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
     */
    public void queryCallWaiting(Message result);

    /**
     * Retrieves the default CLIR setting.
     */
    public void queryCLIR(Message result);

    /**
     * Retrieves the CLIP call setting.
     */
    public void queryCLIP(Message result);

    /**
     * Retrieves the COLR call setting.
     */
    public void queryCOLR(Message result);

    /**
     * Retrieves the COLP call setting.
     */
    public void queryCOLP(Message result);

    /**
     * Modifies the configuration of the call barring.
     */
    public void updateCallBarring(int cbType, int action,
            Message result, String[] barrList);

    /**
     * Modifies the configuration of the call forward.
     */
    public void updateCallForward(int action, int condition, String number,
            int serviceClass, int timeSeconds, Message result);

    /**
     * Modifies the configuration of the call waiting.
     */
    public void updateCallWaiting(boolean enable, int serviceClass, Message result);

    /**
     * Updates the configuration of the CLIR supplementary service.
     */
    public void updateCLIR(int clirMode, Message result);

    /**
     * Updates the configuration of the CLIP supplementary service.
     */
    public void updateCLIP(boolean enable, Message result);

    /**
     * Updates the configuration of the COLR supplementary service.
     */
    public void updateCOLR(int presentation, Message result);

    /**
     * Updates the configuration of the COLP supplementary service.
     */
    public void updateCOLP(boolean enable, Message result);
}
Loading