ImsConfigpublic class ImsConfig extends Object Provides APIs to get/set the IMS service feature/capability/parameters.
The config items include:
1) Items provisioned by the operator.
2) Items configured by user. Mainly service feature class. |
Fields Summary |
---|
private static final String | TAG | private boolean | DBG | private final com.android.ims.internal.IImsConfig | miConfig | private android.content.Context | mContext | private static final String | MODIFY_PHONE_STATE |
Methods Summary |
---|
public void | getFeatureValue(int feature, int network, com.android.ims.ImsConfigListener listener)Gets the value for IMS feature item for specified network type.
if (DBG) {
Rlog.d(TAG, "getFeatureValue: feature = " + feature + ", network =" + network +
", listener =" + listener);
}
try {
miConfig.getFeatureValue(feature, network, listener);
} catch (RemoteException e) {
throw new ImsException("getFeatureValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
| public java.lang.String | getProvisionedStringValue(int item)Gets the provisioned value for IMS service/capabilities parameters used by IMS stack.
This function should not be called from the mainthread as it could block the
mainthread.
String ret = "Unknown";
try {
ret = miConfig.getProvisionedStringValue(item);
} catch (RemoteException e) {
throw new ImsException("getProvisionedStringValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
if (DBG) Rlog.d(TAG, "getProvisionedStringValue(): item = " + item + ", ret =" + ret);
return ret;
| public int | getProvisionedValue(int item)Gets the provisioned value for IMS service/capabilities parameters used by IMS stack.
This function should not be called from the mainthread as it could block the
mainthread.
int ret = 0;
try {
ret = miConfig.getProvisionedValue(item);
} catch (RemoteException e) {
throw new ImsException("getValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
if (DBG) Rlog.d(TAG, "getProvisionedValue(): item = " + item + ", ret =" + ret);
return ret;
| public boolean | getVolteProvisioned()Gets the value for IMS Volte provisioned.
It should be the same as operator provisioned value if applies.
try {
return miConfig.getVolteProvisioned();
} catch (RemoteException e) {
throw new ImsException("getVolteProvisioned()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
| public void | setFeatureValue(int feature, int network, int value, com.android.ims.ImsConfigListener listener)Sets the value for IMS feature item for specified network type.
mContext.enforceCallingOrSelfPermission(MODIFY_PHONE_STATE, null);
if (DBG) {
Rlog.d(TAG, "setFeatureValue: feature = " + feature + ", network =" + network +
", value =" + value + ", listener =" + listener);
}
try {
miConfig.setFeatureValue(feature, network, value, listener);
} catch (RemoteException e) {
throw new ImsException("setFeatureValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
| public int | setProvisionedStringValue(int item, java.lang.String value)Sets the value for IMS service/capabilities parameters by
the operator device management entity.
This function should not be called from main thread as it could block
mainthread.
mContext.enforceCallingOrSelfPermission(MODIFY_PHONE_STATE, null);
int ret = ImsConfig.OperationStatusConstants.UNKNOWN;
try {
ret = miConfig.setProvisionedStringValue(item, value);
} catch (RemoteException e) {
throw new ImsException("setProvisionedStringValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
if (DBG) {
Rlog.d(TAG, "setProvisionedStringValue(): item = " + item +
", value =" + value);
}
return ret;
| public int | setProvisionedValue(int item, int value)Sets the value for IMS service/capabilities parameters by
the operator device management entity.
This function should not be called from main thread as it could block
mainthread.
mContext.enforceCallingOrSelfPermission(MODIFY_PHONE_STATE, null);
int ret = ImsConfig.OperationStatusConstants.UNKNOWN;
if (DBG) {
Rlog.d(TAG, "setProvisionedValue(): item = " + item +
"value = " + value);
}
try {
ret = miConfig.setProvisionedValue(item, value);
} catch (RemoteException e) {
throw new ImsException("setProvisionedValue()", e,
ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
}
if (DBG) {
Rlog.d(TAG, "setProvisionedValue(): item = " + item +
" value = " + value + " ret = " + ret);
}
return ret;
|
|