diff options
Diffstat (limited to 'telephony/java/com/android/ims')
7 files changed, 82 insertions, 209 deletions
diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java index cd0c4b115c0e..e670341ffe7f 100644 --- a/telephony/java/com/android/ims/ImsConfig.java +++ b/telephony/java/com/android/ims/ImsConfig.java @@ -19,8 +19,8 @@ package com.android.ims; import android.content.Context; import android.os.RemoteException; import android.telephony.Rlog; - -import com.android.ims.internal.IImsConfig; +import android.telephony.ims.aidl.IImsConfig; +import android.telephony.ims.stub.ImsConfigImplBase; /** * Provides APIs to get/set the IMS service feature/capability/parameters. @@ -46,7 +46,7 @@ public class ImsConfig { /** * Broadcast action: the configuration was changed - * + * @deprecated Use {@link ImsConfig#addConfigCallback(ImsConfigImplBase.Callback)} instead. * @hide */ public static final String ACTION_IMS_CONFIG_CHANGED = @@ -70,6 +70,8 @@ public class ImsConfig { /** * Defines IMS service/capability feature constants. + * @deprecated Use + * {@link android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability} instead. */ public static class FeatureConstants { public static final int FEATURE_TYPE_UNKNOWN = -1; @@ -539,164 +541,166 @@ public class ImsConfig { } public ImsConfig(IImsConfig iconfig, Context context) { - if (DBG) Rlog.d(TAG, "ImsConfig creates"); + if (DBG) Rlog.d(TAG, "ImsConfig created"); miConfig = iconfig; mContext = context; } /** - * 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. + * @deprecated see {@link #getInt(int)} instead. + */ + public int getProvisionedValue(int item) throws ImsException { + return getConfigInt(item); + } + + /** + * Gets the configuration value for IMS service/capabilities parameters used by IMS stack. * * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. * @return the value in Integer format. - * - * @throws ImsException if calling the IMS service results in an error. + * @throws ImsException if the ImsService is unavailable. */ - public int getProvisionedValue(int item) throws ImsException { + public int getConfigInt(int item) throws ImsException { int ret = 0; try { - ret = miConfig.getProvisionedValue(item); + ret = miConfig.getConfigInt(item); } catch (RemoteException e) { - throw new ImsException("getValue()", e, + throw new ImsException("getInt()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } - if (DBG) Rlog.d(TAG, "getProvisionedValue(): item = " + item + ", ret =" + ret); + if (DBG) Rlog.d(TAG, "getInt(): item = " + item + ", ret =" + ret); return ret; } /** - * 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. + * @deprecated see {@link #getConfigString(int)} instead + */ + public String getProvisionedStringValue(int item) throws ImsException { + return getConfigString(item); + } + + /** + * Gets the configuration value for IMS service/capabilities parameters used by IMS stack. * * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. * @return value in String format. * - * @throws ImsException if calling the IMS service results in an error. + * @throws ImsException if the ImsService is unavailable. */ - public String getProvisionedStringValue(int item) throws ImsException { + public String getConfigString(int item) throws ImsException { String ret = "Unknown"; try { - ret = miConfig.getProvisionedStringValue(item); + ret = miConfig.getConfigString(item); } catch (RemoteException e) { - throw new ImsException("getProvisionedStringValue()", e, + throw new ImsException("getConfigString()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } - if (DBG) Rlog.d(TAG, "getProvisionedStringValue(): item = " + item + ", ret =" + ret); + if (DBG) Rlog.d(TAG, "getConfigString(): item = " + item + ", ret =" + ret); return ret; } /** - * 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. + * @deprecated see {@link #setConfig(int, int)} instead. + */ + public int setProvisionedValue(int item, int value) throws ImsException { + return setConfig(item, value); + } + + /** + * @deprecated see {@link #setConfig(int, String)} instead. + */ + public int setProvisionedStringValue(int item, String value) throws ImsException { + return setConfig(item, value); + } + + /** + * Sets the value for ImsService configuration item. * * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. * @param value in Integer format. * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants * - * @throws ImsException if calling the IMS service results in an error. + * @throws ImsException if the ImsService is unavailable. */ - public int setProvisionedValue(int item, int value) - throws ImsException { + public int setConfig(int item, int value) throws ImsException { int ret = OperationStatusConstants.UNKNOWN; if (DBG) { - Rlog.d(TAG, "setProvisionedValue(): item = " + item + + Rlog.d(TAG, "setConfig(): item = " + item + "value = " + value); } try { - ret = miConfig.setProvisionedValue(item, value); + ret = miConfig.setConfigInt(item, value); } catch (RemoteException e) { - throw new ImsException("setProvisionedValue()", e, + throw new ImsException("setConfig()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) { - Rlog.d(TAG, "setProvisionedValue(): item = " + item + + Rlog.d(TAG, "setConfig(): item = " + item + " value = " + value + " ret = " + ret); } return ret; + } /** - * 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. + * Sets the value for ImsService configuration item. * * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. - * @param value in String format. + * @param value in Integer format. * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants * - * @throws ImsException if calling the IMS service results in an error. + * @throws ImsException if the ImsService is unavailable. */ - public int setProvisionedStringValue(int item, String value) - throws ImsException { + public int setConfig(int item, String value) throws ImsException { int ret = OperationStatusConstants.UNKNOWN; + if (DBG) { + Rlog.d(TAG, "setConfig(): item = " + item + + "value = " + value); + } try { - ret = miConfig.setProvisionedStringValue(item, value); + ret = miConfig.setConfigString(item, value); } catch (RemoteException e) { - throw new ImsException("setProvisionedStringValue()", e, + throw new ImsException("setConfig()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) { - Rlog.d(TAG, "setProvisionedStringValue(): item = " + item + - ", value =" + value); + Rlog.d(TAG, "setConfig(): item = " + item + + " value = " + value + " ret = " + ret); } return ret; } /** - * Gets the value for IMS feature item for specified network type. + * Adds a {@link ImsConfigImplBase.Callback} to the ImsService to notify when a Configuration + * item has changed. * - * @param feature, defined as in FeatureConstants. - * @param network, defined as in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. - * @param listener, provided to be notified for the feature on/off status. - * @return void - * - * @throws ImsException if calling the IMS service results in an error. + * Make sure to call {@link #removeConfigCallback(ImsConfigImplBase.Callback)} when finished + * using this callback. */ - public void getFeatureValue(int feature, int network, - ImsConfigListener listener) throws ImsException { - if (DBG) { - Rlog.d(TAG, "getFeatureValue: feature = " + feature + ", network =" + network + - ", listener =" + listener); - } + public void addConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException { + if (DBG) Rlog.d(TAG, "addConfigCallback: " + callback); try { - miConfig.getFeatureValue(feature, network, listener); - } catch (RemoteException e) { - throw new ImsException("getFeatureValue()", e, + miConfig.addImsConfigCallback(callback); + } catch (RemoteException e) { + throw new ImsException("addConfigCallback()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } } /** - * Sets the value for IMS feature item for specified network type. - * - * @param feature, as defined in FeatureConstants. - * @param network, as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. - * @param value, as defined in FeatureValueConstants. - * @param listener, provided if caller needs to be notified for set result. - * @return void - * - * @throws ImsException if calling the IMS service results in an error. + * Removes a {@link ImsConfigImplBase.Callback} from the ImsService that was previously added + * by {@link #addConfigCallback(ImsConfigImplBase.Callback)}. */ - public void setFeatureValue(int feature, int network, int value, - ImsConfigListener listener) throws ImsException { - if (DBG) { - Rlog.d(TAG, "setFeatureValue: feature = " + feature + ", network =" + network + - ", value =" + value + ", listener =" + listener); - } + public void removeConfigCallback(ImsConfigImplBase.Callback callback) throws ImsException { + if (DBG) Rlog.d(TAG, "removeConfigCallback: " + callback); try { - miConfig.setFeatureValue(feature, network, value, listener); - } catch (RemoteException e) { - throw new ImsException("setFeatureValue()", e, + miConfig.removeImsConfigCallback(callback); + } catch (RemoteException e) { + throw new ImsException("removeConfigCallback()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } } diff --git a/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl deleted file mode 100644 index 41b1042e9a86..000000000000 --- a/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.ims.internal; - -/** -* Interface from ImsFeature in the ImsService to ImsServiceController. - * {@hide} - */ -oneway interface IImsFeatureStatusCallback { - void notifyImsFeatureStatus(int featureStatus); -}
\ No newline at end of file diff --git a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl index 290a68240251..d43077bf10bc 100644 --- a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl +++ b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl @@ -24,7 +24,6 @@ import com.android.ims.internal.IImsConfig; import com.android.ims.internal.IImsEcbm; import com.android.ims.internal.IImsMultiEndpoint; import com.android.ims.internal.IImsRegistrationListener; -import com.android.ims.internal.IImsSmsListener; import com.android.ims.internal.IImsUt; import android.os.Message; @@ -52,12 +51,4 @@ interface IImsMMTelFeature { IImsEcbm getEcbmInterface(); void setUiTTYMode(int uiTtyMode, in Message onComplete); IImsMultiEndpoint getMultiEndpointInterface(); - // SMS APIs - void setSmsListener(IImsSmsListener l); - oneway void sendSms(in int token, int messageRef, String format, String smsc, boolean retry, - in byte[] pdu); - oneway void acknowledgeSms(int token, int messageRef, int result); - oneway void acknowledgeSmsReport(int token, int messageRef, int result); - String getSmsFormat(); - oneway void onSmsReady(); } diff --git a/telephony/java/com/android/ims/internal/IImsRegistration.aidl b/telephony/java/com/android/ims/internal/IImsRegistration.aidl deleted file mode 100644 index 6de264ec90fb..000000000000 --- a/telephony/java/com/android/ims/internal/IImsRegistration.aidl +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.android.ims.internal; - -import com.android.ims.internal.IImsRegistrationCallback; - -/** - * See ImsRegistration for more information. - * - * {@hide} - */ -interface IImsRegistration { - int getRegistrationTechnology(); - oneway void addRegistrationCallback(IImsRegistrationCallback c); - oneway void removeRegistrationCallback(IImsRegistrationCallback c); -}
\ No newline at end of file diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl b/telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl deleted file mode 100644 index 5f21167422dc..000000000000 --- a/telephony/java/com/android/ims/internal/IImsRegistrationCallback.aidl +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.android.ims.internal; - -import android.net.Uri; -import android.telephony.ims.internal.stub.ImsFeatureConfiguration; - -import com.android.ims.ImsReasonInfo; - -/** - * See ImsRegistrationImplBase.Callback for more information. - * - * {@hide} - */ -oneway interface IImsRegistrationCallback { - void onRegistered(int imsRadioTech); - void onRegistering(int imsRadioTech); - void onDeregistered(in ImsReasonInfo info); - void onTechnologyChangeFailed(int imsRadioTech, in ImsReasonInfo info); - void onSubscriberAssociatedUriChanged(in Uri[] uris); -}
\ No newline at end of file diff --git a/telephony/java/com/android/ims/internal/IImsServiceController.aidl b/telephony/java/com/android/ims/internal/IImsServiceController.aidl index 7ac25ac13fbe..857089fac33a 100644 --- a/telephony/java/com/android/ims/internal/IImsServiceController.aidl +++ b/telephony/java/com/android/ims/internal/IImsServiceController.aidl @@ -18,7 +18,6 @@ package com.android.ims.internal; import com.android.ims.internal.IImsFeatureStatusCallback; import com.android.ims.internal.IImsMMTelFeature; -import com.android.ims.internal.IImsRegistration; import com.android.ims.internal.IImsRcsFeature; /** @@ -30,5 +29,4 @@ interface IImsServiceController { IImsMMTelFeature createMMTelFeature(int slotId, in IImsFeatureStatusCallback c); IImsRcsFeature createRcsFeature(int slotId, in IImsFeatureStatusCallback c); void removeImsFeature(int slotId, int featureType, in IImsFeatureStatusCallback c); - IImsRegistration getRegistration(int slotId); } diff --git a/telephony/java/com/android/ims/internal/IImsSmsListener.aidl b/telephony/java/com/android/ims/internal/IImsSmsListener.aidl deleted file mode 100644 index 5a4b7e489025..000000000000 --- a/telephony/java/com/android/ims/internal/IImsSmsListener.aidl +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.ims.internal; - -/** - * See SmsImplBase for more information. - * {@hide} - */ -interface IImsSmsListener { - void onSendSmsResult(int token, int messageRef, int status, int reason); - void onSmsStatusReportReceived(int token, int messageRef, in String format, - in byte[] pdu); - void onSmsReceived(int token, in String format, in byte[] pdu); -}
\ No newline at end of file |