Merge "Catch SSE when no subId is loaded" am: cc3f4cc083 am: 317c552a80 am: 0295cca6a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1501011 Change-Id: Idfe41d583559fffba298635e93a992e2651d8f01
This commit is contained in:
@@ -26,6 +26,7 @@ import android.content.Intent;
|
|||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceSpecificException;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.telephony.AccessNetworkConstants;
|
import android.telephony.AccessNetworkConstants;
|
||||||
import android.telephony.BinderCacheManager;
|
import android.telephony.BinderCacheManager;
|
||||||
@@ -198,6 +199,8 @@ public class ImsRcsManager {
|
|||||||
c.setExecutor(executor);
|
c.setExecutor(executor);
|
||||||
try {
|
try {
|
||||||
imsRcsController.registerImsRegistrationCallback(mSubId, c.getBinder());
|
imsRcsController.registerImsRegistrationCallback(mSubId, c.getBinder());
|
||||||
|
} catch (ServiceSpecificException e) {
|
||||||
|
throw new ImsException(e.toString(), e.errorCode);
|
||||||
} catch (RemoteException | IllegalStateException e) {
|
} catch (RemoteException | IllegalStateException e) {
|
||||||
throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
|
throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
|
||||||
}
|
}
|
||||||
@@ -333,6 +336,9 @@ public class ImsRcsManager {
|
|||||||
c.setExecutor(executor);
|
c.setExecutor(executor);
|
||||||
try {
|
try {
|
||||||
imsRcsController.registerRcsAvailabilityCallback(mSubId, c.getBinder());
|
imsRcsController.registerRcsAvailabilityCallback(mSubId, c.getBinder());
|
||||||
|
|
||||||
|
} catch (ServiceSpecificException e) {
|
||||||
|
throw new ImsException(e.toString(), e.errorCode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling IImsRcsController#registerRcsAvailabilityCallback", e);
|
Log.e(TAG, "Error calling IImsRcsController#registerRcsAvailabilityCallback", e);
|
||||||
throw new ImsException("Remote IMS Service is not available",
|
throw new ImsException("Remote IMS Service is not available",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import android.net.Uri;
|
|||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceSpecificException;
|
||||||
import android.telephony.TelephonyFrameworkInitializer;
|
import android.telephony.TelephonyFrameworkInitializer;
|
||||||
import android.telephony.ims.aidl.IImsRcsController;
|
import android.telephony.ims.aidl.IImsRcsController;
|
||||||
import android.telephony.ims.aidl.IRcsUceControllerCallback;
|
import android.telephony.ims.aidl.IRcsUceControllerCallback;
|
||||||
@@ -463,6 +464,8 @@ public class RcsUceAdapter {
|
|||||||
try {
|
try {
|
||||||
imsRcsController.requestCapabilities(mSubId, mContext.getOpPackageName(),
|
imsRcsController.requestCapabilities(mSubId, mContext.getOpPackageName(),
|
||||||
mContext.getAttributionTag(), contactNumbers, internalCallback);
|
mContext.getAttributionTag(), contactNumbers, internalCallback);
|
||||||
|
} catch (ServiceSpecificException e) {
|
||||||
|
throw new ImsException(e.toString(), e.errorCode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling IImsRcsController#requestCapabilities", e);
|
Log.e(TAG, "Error calling IImsRcsController#requestCapabilities", e);
|
||||||
throw new ImsException("Remote IMS Service is not available",
|
throw new ImsException("Remote IMS Service is not available",
|
||||||
@@ -545,6 +548,8 @@ public class RcsUceAdapter {
|
|||||||
try {
|
try {
|
||||||
imsRcsController.requestNetworkAvailability(mSubId, mContext.getOpPackageName(),
|
imsRcsController.requestNetworkAvailability(mSubId, mContext.getOpPackageName(),
|
||||||
mContext.getAttributionTag(), contactNumber, internalCallback);
|
mContext.getAttributionTag(), contactNumber, internalCallback);
|
||||||
|
} catch (ServiceSpecificException e) {
|
||||||
|
throw new ImsException(e.toString(), e.errorCode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling IImsRcsController#requestNetworkAvailability", e);
|
Log.e(TAG, "Error calling IImsRcsController#requestNetworkAvailability", e);
|
||||||
throw new ImsException("Remote IMS Service is not available",
|
throw new ImsException("Remote IMS Service is not available",
|
||||||
@@ -574,7 +579,7 @@ public class RcsUceAdapter {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return imsRcsController.getUcePublishState(mSubId);
|
return imsRcsController.getUcePublishState(mSubId);
|
||||||
} catch (android.os.ServiceSpecificException e) {
|
} catch (ServiceSpecificException e) {
|
||||||
throw new ImsException(e.getMessage(), e.errorCode);
|
throw new ImsException(e.getMessage(), e.errorCode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling IImsRcsController#getUcePublishState", e);
|
Log.e(TAG, "Error calling IImsRcsController#getUcePublishState", e);
|
||||||
@@ -621,7 +626,7 @@ public class RcsUceAdapter {
|
|||||||
c.setExecutor(executor);
|
c.setExecutor(executor);
|
||||||
try {
|
try {
|
||||||
imsRcsController.registerUcePublishStateCallback(mSubId, c.getBinder());
|
imsRcsController.registerUcePublishStateCallback(mSubId, c.getBinder());
|
||||||
} catch (android.os.ServiceSpecificException e) {
|
} catch (ServiceSpecificException e) {
|
||||||
throw new ImsException(e.getMessage(), e.errorCode);
|
throw new ImsException(e.getMessage(), e.errorCode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error calling IImsRcsController#registerUcePublishStateCallback", e);
|
Log.e(TAG, "Error calling IImsRcsController#registerUcePublishStateCallback", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user