Loading telephony/java/android/telephony/ImsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class ImsManager { throw new IllegalArgumentException("Invalid subscription ID: " + subscriptionId); } return new ImsMmTelManager(subscriptionId, sTelephonyCache); return new ImsMmTelManager(mContext, subscriptionId, sTelephonyCache); } /** Loading telephony/java/android/telephony/ims/ImsMmTelManager.java +22 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.RequiresPermission; import android.annotation.SuppressAutoDoc; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.content.Context; import android.os.Binder; import android.os.RemoteException; import android.os.ServiceSpecificException; Loading Loading @@ -215,6 +216,7 @@ public class ImsMmTelManager implements RegistrationManager { } } private final Context mContext; private final int mSubId; private final BinderCacheManager<ITelephony> mBinderCache; Loading Loading @@ -256,6 +258,16 @@ public class ImsMmTelManager implements RegistrationManager { */ @VisibleForTesting public ImsMmTelManager(int subId, BinderCacheManager<ITelephony> binderCache) { this(null, subId, binderCache); } /** * Only visible for testing, use {@link ImsManager#getImsMmTelManager(int)} instead. * @hide */ @VisibleForTesting public ImsMmTelManager(Context context, int subId, BinderCacheManager<ITelephony> binderCache) { mContext = context; mSubId = subId; mBinderCache = binderCache; } Loading Loading @@ -1516,7 +1528,8 @@ public class ImsMmTelManager implements RegistrationManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_MMTEL, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_MMTEL, callback.getCallbackBinder(), getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading @@ -1542,6 +1555,14 @@ public class ImsMmTelManager implements RegistrationManager { } } private String getOpPackageName() { if (mContext != null) { return mContext.getOpPackageName(); } else { return null; } } private ITelephony getITelephony() { return mBinderCache.getBinder(); } Loading telephony/java/android/telephony/ims/ImsRcsManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,8 @@ public class ImsRcsManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder(), mContext.getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading telephony/java/android/telephony/ims/SipDelegateManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -484,7 +484,8 @@ public class SipDelegateManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder(), mContext.getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -2497,7 +2497,8 @@ interface ITelephony { /** * Register an IMS connection state callback */ void registerImsStateCallback(int subId, int feature, in IImsStateCallback cb); void registerImsStateCallback(int subId, int feature, in IImsStateCallback cb, in String callingPackage); /** * Unregister an IMS connection state callback Loading Loading
telephony/java/android/telephony/ImsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class ImsManager { throw new IllegalArgumentException("Invalid subscription ID: " + subscriptionId); } return new ImsMmTelManager(subscriptionId, sTelephonyCache); return new ImsMmTelManager(mContext, subscriptionId, sTelephonyCache); } /** Loading
telephony/java/android/telephony/ims/ImsMmTelManager.java +22 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.RequiresPermission; import android.annotation.SuppressAutoDoc; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.content.Context; import android.os.Binder; import android.os.RemoteException; import android.os.ServiceSpecificException; Loading Loading @@ -215,6 +216,7 @@ public class ImsMmTelManager implements RegistrationManager { } } private final Context mContext; private final int mSubId; private final BinderCacheManager<ITelephony> mBinderCache; Loading Loading @@ -256,6 +258,16 @@ public class ImsMmTelManager implements RegistrationManager { */ @VisibleForTesting public ImsMmTelManager(int subId, BinderCacheManager<ITelephony> binderCache) { this(null, subId, binderCache); } /** * Only visible for testing, use {@link ImsManager#getImsMmTelManager(int)} instead. * @hide */ @VisibleForTesting public ImsMmTelManager(Context context, int subId, BinderCacheManager<ITelephony> binderCache) { mContext = context; mSubId = subId; mBinderCache = binderCache; } Loading Loading @@ -1516,7 +1528,8 @@ public class ImsMmTelManager implements RegistrationManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_MMTEL, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_MMTEL, callback.getCallbackBinder(), getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading @@ -1542,6 +1555,14 @@ public class ImsMmTelManager implements RegistrationManager { } } private String getOpPackageName() { if (mContext != null) { return mContext.getOpPackageName(); } else { return null; } } private ITelephony getITelephony() { return mBinderCache.getBinder(); } Loading
telephony/java/android/telephony/ims/ImsRcsManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,8 @@ public class ImsRcsManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder(), mContext.getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading
telephony/java/android/telephony/ims/SipDelegateManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -484,7 +484,8 @@ public class SipDelegateManager { try { telephony.registerImsStateCallback( mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder()); mSubId, ImsFeature.FEATURE_RCS, callback.getCallbackBinder(), mContext.getOpPackageName()); } catch (ServiceSpecificException e) { throw new ImsException(e.getMessage(), e.errorCode); } catch (RemoteException | IllegalStateException e) { Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -2497,7 +2497,8 @@ interface ITelephony { /** * Register an IMS connection state callback */ void registerImsStateCallback(int subId, int feature, in IImsStateCallback cb); void registerImsStateCallback(int subId, int feature, in IImsStateCallback cb, in String callingPackage); /** * Unregister an IMS connection state callback Loading