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

Commit de65acb9 authored by Brad Ebinger's avatar Brad Ebinger Committed by Gerrit Code Review
Browse files

Merge changes from topic "ims_apis"

* changes:
  Modify ImsService API to accomodate compat
  Make ImsService API @SystemApi
  Integrate new MMTel APIs into the framework
  Integrate ImsCallSessionListener API changes
parents 771e229a 19628b43
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -462,15 +462,18 @@ java_library {
        "telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
        "telephony/java/android/telephony/data/IDataService.aidl",
        "telephony/java/android/telephony/data/IDataServiceCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsConfig.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsConfigCallback.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsRcsFeature.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl",
        "telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl",
	    "telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl",
        "telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
        "telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
        "telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl",
@@ -489,13 +492,10 @@ java_library {
        "telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl",
        "telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl",
        "telephony/java/com/android/ims/internal/IImsMultiEndpoint.aidl",
        "telephony/java/com/android/ims/internal/IImsRegistration.aidl",
        "telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl",
        "telephony/java/com/android/ims/internal/IImsRcsFeature.aidl",
        "telephony/java/com/android/ims/internal/IImsService.aidl",
        "telephony/java/com/android/ims/internal/IImsServiceController.aidl",
        "telephony/java/com/android/ims/internal/IImsServiceFeatureCallback.aidl",
	"telephony/java/com/android/ims/internal/IImsSmsListener.aidl",
        "telephony/java/com/android/ims/internal/IImsStreamMediaSession.aidl",
        "telephony/java/com/android/ims/internal/IImsUt.aidl",
        "telephony/java/com/android/ims/internal/IImsUtListener.aidl",
+679 −3

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.service.carrier.CarrierService;
import android.telephony.ims.ImsReasonInfo;

import com.android.ims.ImsReasonInfo;
import com.android.internal.telephony.ICarrierConfigLoader;

/**
@@ -1423,7 +1423,7 @@ public class CarrierConfigManager {
            "allow_video_calling_fallback_bool";

    /**
     * Defines operator-specific {@link com.android.ims.ImsReasonInfo} mappings.
     * Defines operator-specific {@link ImsReasonInfo} mappings.
     *
     * Format: "ORIGINAL_CODE|MESSAGE|NEW_CODE"
     * Where {@code ORIGINAL_CODE} corresponds to a {@link ImsReasonInfo#getCode()} code,
+52 −29
Original line number Diff line number Diff line
@@ -47,12 +47,13 @@ import android.service.carrier.CarrierIdentifier;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telephony.VisualVoicemailService.VisualVoicemailTask;
import android.telephony.ims.aidl.IImsConfig;
import android.telephony.ims.aidl.IImsMmTelFeature;
import android.telephony.ims.aidl.IImsRcsFeature;
import android.telephony.ims.aidl.IImsRegistration;
import android.telephony.ims.feature.ImsFeature;
import android.util.Log;

import com.android.ims.internal.IImsMMTelFeature;
import com.android.ims.internal.IImsRcsFeature;
import com.android.ims.internal.IImsRegistration;
import com.android.ims.internal.IImsServiceFeatureCallback;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telecom.ITelecomService;
@@ -4889,57 +4890,60 @@ public class TelephonyManager {
        }
    }

    /** @hide */
    @IntDef({ImsFeature.EMERGENCY_MMTEL, ImsFeature.MMTEL, ImsFeature.RCS})
    @Retention(RetentionPolicy.SOURCE)
    public @interface Feature {}
    /**
     * Enables IMS for the framework. This will trigger IMS registration and ImsFeature capability
     * status updates, if not already enabled.
     * @hide
     */
    public void enableIms(int slotId) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                telephony.enableIms(slotId);
            }
        } catch (RemoteException e) {
            Rlog.e(TAG, "enableIms, RemoteException: "
                    + e.getMessage());
        }
    }

    /**
     * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id and MMTel
     * feature or {@link null} if the service is not available. If an MMTelFeature is available, the
     * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
     * @param slotIndex The SIM slot that we are requesting the {@link IImsMMTelFeature} for.
     * @param callback Listener that will send updates to ImsManager when there are updates to
     * ImsServiceController.
     * @return {@link IImsMMTelFeature} interface for the feature specified or {@code null} if
     * it is unavailable.
     * Disables IMS for the framework. This will trigger IMS de-registration and trigger ImsFeature
     * status updates to disabled.
     * @hide
     */
    public @Nullable IImsMMTelFeature getImsMMTelFeatureAndListen(int slotIndex,
            IImsServiceFeatureCallback callback) {
    public void disableIms(int slotId) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.getMMTelFeatureAndListen(slotIndex, callback);
                telephony.disableIms(slotId);
            }
        } catch (RemoteException e) {
            Rlog.e(TAG, "getImsMMTelFeatureAndListen, RemoteException: "
            Rlog.e(TAG, "disableIms, RemoteException: "
                    + e.getMessage());
        }
        return null;
    }

    /**
     * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id and MMTel
     * feature for emergency calling or {@link null} if the service is not available. If an
     * MMTelFeature is available, the {@link IImsServiceFeatureCallback} callback is registered as a
     * listener for feature updates.
     * @param slotIndex The SIM slot that we are requesting the {@link IImsMMTelFeature} for.
     * Returns the {@link IImsMmTelFeature} that corresponds to the given slot Id and MMTel
     * feature or {@link null} if the service is not available. If an MMTelFeature is available, the
     * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
     * @param slotIndex The SIM slot that we are requesting the {@link IImsMmTelFeature} for.
     * @param callback Listener that will send updates to ImsManager when there are updates to
     * ImsServiceController.
     * @return {@link IImsMMTelFeature} interface for the feature specified or {@code null} if
     * @return {@link IImsMmTelFeature} interface for the feature specified or {@code null} if
     * it is unavailable.
     * @hide
     */
    public @Nullable IImsMMTelFeature getImsEmergencyMMTelFeatureAndListen(int slotIndex,
    public @Nullable IImsMmTelFeature getImsMmTelFeatureAndListen(int slotIndex,
            IImsServiceFeatureCallback callback) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.getEmergencyMMTelFeatureAndListen(slotIndex, callback);
                return telephony.getMmTelFeatureAndListen(slotIndex, callback);
            }
        } catch (RemoteException e) {
            Rlog.e(TAG, "getImsEmergencyMMTelFeatureAndListen, RemoteException: "
            Rlog.e(TAG, "getImsMmTelFeatureAndListen, RemoteException: "
                    + e.getMessage());
        }
        return null;
@@ -4990,6 +4994,25 @@ public class TelephonyManager {
        return null;
    }

    /**
     * @return the {@IImsConfig} interface that corresponds with the slot index and feature.
     * @param slotIndex The SIM slot corresponding to the ImsService ImsConfig is active for.
     * @param feature An integer indicating the feature that we wish to get the ImsConfig for.
     * Corresponds to features defined in ImsFeature.
     * @hide
     */
    public @Nullable IImsConfig getImsConfig(int slotIndex, int feature) {
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                return telephony.getImsConfig(slotIndex, feature);
            }
        } catch (RemoteException e) {
            Rlog.e(TAG, "getImsRegistration, RemoteException: " + e.getMessage());
        }
        return null;
    }

    /**
     * Set IMS registration state
     *
+1 −1
Original line number Diff line number Diff line
@@ -14,6 +14,6 @@
 * limitations under the License.
 */

package com.android.ims;
package android.telephony.ims;

parcelable ImsCallForwardInfo;
Loading