Loading Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -471,8 +471,6 @@ java_library { "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/IImsRegistration.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsRegistrationCallback.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl", Loading @@ -492,6 +490,8 @@ 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", Loading telephony/java/android/telephony/TelephonyManager.java +20 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ 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; Loading Loading @@ -4931,6 +4932,25 @@ public class TelephonyManager { return null; } /** * @return the {@IImsRegistration} interface that corresponds with the slot index and feature. * @param slotIndex The SIM slot corresponding to the ImsService ImsRegistration is active for. * @param feature An integer indicating the feature that we wish to get the ImsRegistration for. * Corresponds to features defined in ImsFeature. * @hide */ public @Nullable IImsRegistration getImsRegistration(int slotIndex, int feature) { try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.getImsRegistration(slotIndex, feature); } } catch (RemoteException e) { Rlog.e(TAG, "getImsRegistration, RemoteException: " + e.getMessage()); } return null; } /** * Set IMS registration state * Loading telephony/java/android/telephony/ims/ImsService.java +19 −0 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ import android.telephony.CarrierConfigManager; import android.telephony.ims.feature.ImsFeature; import android.telephony.ims.feature.MMTelFeature; import android.telephony.ims.feature.RcsFeature; import android.telephony.ims.stub.ImsRegistrationImplBase; import android.util.Log; import android.util.SparseArray; import com.android.ims.internal.IImsFeatureStatusCallback; import com.android.ims.internal.IImsMMTelFeature; import com.android.ims.internal.IImsRcsFeature; import com.android.ims.internal.IImsRegistration; import com.android.ims.internal.IImsServiceController; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -113,6 +115,12 @@ public class ImsService extends Service { throws RemoteException { ImsService.this.removeImsFeature(slotId, featureType, c); } @Override public IImsRegistration getRegistration(int slotId) throws RemoteException { ImsRegistrationImplBase r = ImsService.this.getRegistration(slotId); return r != null ? r.getBinder() : null; } }; /** Loading Loading @@ -174,6 +182,8 @@ public class ImsService extends Service { f.setSlotId(slotId); f.addImsFeatureStatusCallback(c); addImsFeature(slotId, featureType, f); // TODO: Remove once new onFeatureReady AIDL is merged in. f.onFeatureReady(); } private void addImsFeature(int slotId, int featureType, ImsFeature f) { Loading Loading @@ -236,4 +246,13 @@ public class ImsService extends Service { public @Nullable RcsFeature onCreateRcsFeature(int slotId) { return null; } /** * @param slotId The slot that is associated with the IMS Registration. * @return the ImsRegistration implementation associated with the slot. * @hide */ public ImsRegistrationImplBase getRegistration(int slotId) { return new ImsRegistrationImplBase(); } } telephony/java/android/telephony/ims/feature/ImsFeature.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public abstract class ImsFeature { new WeakHashMap<IImsFeatureStatusCallback, Boolean>()); private @ImsState int mState = STATE_NOT_AVAILABLE; private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX; private Context mContext; protected Context mContext; public void setContext(Context context) { mContext = context; Loading telephony/java/android/telephony/ims/internal/ImsService.java +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.telephony.CarrierConfigManager; import android.telephony.ims.internal.aidl.IImsConfig; import android.telephony.ims.internal.aidl.IImsMmTelFeature; import android.telephony.ims.internal.aidl.IImsRcsFeature; import android.telephony.ims.internal.aidl.IImsRegistration; import android.telephony.ims.internal.aidl.IImsServiceController; import android.telephony.ims.internal.aidl.IImsServiceControllerListener; import android.telephony.ims.internal.feature.ImsFeature; Loading @@ -32,11 +31,12 @@ import android.telephony.ims.internal.feature.MmTelFeature; import android.telephony.ims.internal.feature.RcsFeature; import android.telephony.ims.internal.stub.ImsConfigImplBase; import android.telephony.ims.internal.stub.ImsFeatureConfiguration; import android.telephony.ims.internal.stub.ImsRegistrationImplBase; import android.telephony.ims.stub.ImsRegistrationImplBase; import android.util.Log; import android.util.SparseArray; import com.android.ims.internal.IImsFeatureStatusCallback; import com.android.ims.internal.IImsRegistration; import com.android.internal.annotations.VisibleForTesting; /** Loading Loading
Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -471,8 +471,6 @@ java_library { "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/IImsRegistration.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsRegistrationCallback.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl", "telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl", Loading @@ -492,6 +490,8 @@ 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", Loading
telephony/java/android/telephony/TelephonyManager.java +20 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ 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; Loading Loading @@ -4931,6 +4932,25 @@ public class TelephonyManager { return null; } /** * @return the {@IImsRegistration} interface that corresponds with the slot index and feature. * @param slotIndex The SIM slot corresponding to the ImsService ImsRegistration is active for. * @param feature An integer indicating the feature that we wish to get the ImsRegistration for. * Corresponds to features defined in ImsFeature. * @hide */ public @Nullable IImsRegistration getImsRegistration(int slotIndex, int feature) { try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.getImsRegistration(slotIndex, feature); } } catch (RemoteException e) { Rlog.e(TAG, "getImsRegistration, RemoteException: " + e.getMessage()); } return null; } /** * Set IMS registration state * Loading
telephony/java/android/telephony/ims/ImsService.java +19 −0 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ import android.telephony.CarrierConfigManager; import android.telephony.ims.feature.ImsFeature; import android.telephony.ims.feature.MMTelFeature; import android.telephony.ims.feature.RcsFeature; import android.telephony.ims.stub.ImsRegistrationImplBase; import android.util.Log; import android.util.SparseArray; import com.android.ims.internal.IImsFeatureStatusCallback; import com.android.ims.internal.IImsMMTelFeature; import com.android.ims.internal.IImsRcsFeature; import com.android.ims.internal.IImsRegistration; import com.android.ims.internal.IImsServiceController; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -113,6 +115,12 @@ public class ImsService extends Service { throws RemoteException { ImsService.this.removeImsFeature(slotId, featureType, c); } @Override public IImsRegistration getRegistration(int slotId) throws RemoteException { ImsRegistrationImplBase r = ImsService.this.getRegistration(slotId); return r != null ? r.getBinder() : null; } }; /** Loading Loading @@ -174,6 +182,8 @@ public class ImsService extends Service { f.setSlotId(slotId); f.addImsFeatureStatusCallback(c); addImsFeature(slotId, featureType, f); // TODO: Remove once new onFeatureReady AIDL is merged in. f.onFeatureReady(); } private void addImsFeature(int slotId, int featureType, ImsFeature f) { Loading Loading @@ -236,4 +246,13 @@ public class ImsService extends Service { public @Nullable RcsFeature onCreateRcsFeature(int slotId) { return null; } /** * @param slotId The slot that is associated with the IMS Registration. * @return the ImsRegistration implementation associated with the slot. * @hide */ public ImsRegistrationImplBase getRegistration(int slotId) { return new ImsRegistrationImplBase(); } }
telephony/java/android/telephony/ims/feature/ImsFeature.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public abstract class ImsFeature { new WeakHashMap<IImsFeatureStatusCallback, Boolean>()); private @ImsState int mState = STATE_NOT_AVAILABLE; private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX; private Context mContext; protected Context mContext; public void setContext(Context context) { mContext = context; Loading
telephony/java/android/telephony/ims/internal/ImsService.java +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.telephony.CarrierConfigManager; import android.telephony.ims.internal.aidl.IImsConfig; import android.telephony.ims.internal.aidl.IImsMmTelFeature; import android.telephony.ims.internal.aidl.IImsRcsFeature; import android.telephony.ims.internal.aidl.IImsRegistration; import android.telephony.ims.internal.aidl.IImsServiceController; import android.telephony.ims.internal.aidl.IImsServiceControllerListener; import android.telephony.ims.internal.feature.ImsFeature; Loading @@ -32,11 +31,12 @@ import android.telephony.ims.internal.feature.MmTelFeature; import android.telephony.ims.internal.feature.RcsFeature; import android.telephony.ims.internal.stub.ImsConfigImplBase; import android.telephony.ims.internal.stub.ImsFeatureConfiguration; import android.telephony.ims.internal.stub.ImsRegistrationImplBase; import android.telephony.ims.stub.ImsRegistrationImplBase; import android.util.Log; import android.util.SparseArray; import com.android.ims.internal.IImsFeatureStatusCallback; import com.android.ims.internal.IImsRegistration; import com.android.internal.annotations.VisibleForTesting; /** Loading