use of com.android.ims.ImsException in project android_frameworks_opt_telephony by LineageOS.
the class ImsPhone method getCommandException.
private CommandException getCommandException(Throwable e) {
CommandException ex = null;
if (e instanceof ImsException) {
ex = getCommandException(((ImsException) e).getCode(), e.getMessage());
} else {
Rlog.d(LOG_TAG, "getCommandException generic failure");
ex = new CommandException(CommandException.Error.GENERIC_FAILURE);
}
return ex;
}
use of com.android.ims.ImsException in project android_frameworks_opt_telephony by LineageOS.
the class ImsPhone method setCallWaiting.
public void setCallWaiting(boolean enable, int serviceClass, Message onComplete) {
if (DBG)
Rlog.d(LOG_TAG, "setCallWaiting enable=" + enable);
Message resp;
resp = obtainMessage(EVENT_SET_CALL_WAITING_DONE, onComplete);
try {
ImsUtInterface ut = mCT.getUtInterface();
ut.updateCallWaiting(enable, serviceClass, resp);
} catch (ImsException e) {
sendErrorResponse(onComplete, e);
}
}
use of com.android.ims.ImsException in project android_frameworks_opt_telephony by LineageOS.
the class ImsPhone method getOutgoingCallerIdDisplay.
@Override
public void getOutgoingCallerIdDisplay(Message onComplete) {
if (DBG)
Rlog.d(LOG_TAG, "getCLIR");
Message resp;
resp = obtainMessage(EVENT_GET_CLIR_DONE, onComplete);
try {
ImsUtInterface ut = mCT.getUtInterface();
ut.queryCLIR(resp);
} catch (ImsException e) {
sendErrorResponse(onComplete, e);
}
}
use of com.android.ims.ImsException in project android_frameworks_opt_telephony by LineageOS.
the class ImsPhone method setCallForwardingOption.
public void setCallForwardingOption(int commandInterfaceCFAction, int commandInterfaceCFReason, String dialingNumber, int serviceClass, int timerSeconds, Message onComplete) {
if (DBG)
Rlog.d(LOG_TAG, "setCallForwardingOption action=" + commandInterfaceCFAction + ", reason=" + commandInterfaceCFReason + " serviceClass=" + serviceClass);
if ((isValidCommandInterfaceCFAction(commandInterfaceCFAction)) && (isValidCommandInterfaceCFReason(commandInterfaceCFReason))) {
Message resp;
Cf cf = new Cf(dialingNumber, (commandInterfaceCFReason == CF_REASON_UNCONDITIONAL ? true : false), onComplete);
resp = obtainMessage(EVENT_SET_CALL_FORWARD_DONE, isCfEnable(commandInterfaceCFAction) ? 1 : 0, 0, cf);
try {
ImsUtInterface ut = mCT.getUtInterface();
ut.updateCallForward(getActionFromCFAction(commandInterfaceCFAction), getConditionFromCFReason(commandInterfaceCFReason), dialingNumber, serviceClass, timerSeconds, resp);
} catch (ImsException e) {
sendErrorResponse(onComplete, e);
}
} else if (onComplete != null) {
sendErrorResponse(onComplete);
}
}
use of com.android.ims.ImsException in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class WifiCallingSettingsForSub method onResume.
@Override
public void onResume() {
super.onResume();
final Context context = getActivity();
updateBody();
if (mImsManager.isWfcEnabledByPlatform()) {
mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
mSwitchBar.addOnSwitchChangeListener(this);
mValidListener = true;
}
context.registerReceiver(mIntentReceiver, mIntentFilter);
Intent intent = getActivity().getIntent();
if (intent.getBooleanExtra(Phone.EXTRA_KEY_ALERT_SHOW, false)) {
showAlert(intent);
}
// Register callback for provisioning changes.
try {
mImsManager.getConfigInterface().addConfigCallback(mProvisioningCallback);
} catch (ImsException e) {
Log.w(TAG, "onResume: Unable to register callback for provisioning changes.");
}
}
Aggregations