diff options
author | Etan Cohen <etancohen@google.com> | 2014-07-11 11:54:14 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2014-07-11 23:23:34 +0000 |
commit | a4d88d1e6e0af284b5ecccc5d55bfcdaa2f784a8 (patch) | |
tree | f8ee66bf508d63a067f01f3dd75bee199d9ef5cb /telephony/java | |
parent | 1c35b08c9308adfc8dde562f97b29ca6d5d21dcf (diff) | |
download | frameworks_base-a4d88d1e6e0af284b5ecccc5d55bfcdaa2f784a8.zip frameworks_base-a4d88d1e6e0af284b5ecccc5d55bfcdaa2f784a8.tar.gz frameworks_base-a4d88d1e6e0af284b5ecccc5d55bfcdaa2f784a8.tar.bz2 |
IMS: Add Config interface to get/set IMS service/capabilities
Change-Id: I5f422aae105cbf8e85aee711aaa49b5d2e958573
Diffstat (limited to 'telephony/java')
3 files changed, 172 insertions, 0 deletions
diff --git a/telephony/java/com/android/ims/ImsConfigListener.aidl b/telephony/java/com/android/ims/ImsConfigListener.aidl new file mode 100644 index 0000000..e827774 --- /dev/null +++ b/telephony/java/com/android/ims/ImsConfigListener.aidl @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2014 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; + +/** + * Used by IMS config client to monitor the config operation results. + * {@hide} + */ +oneway interface ImsConfigListener { + /** + * Notifies client the value of the get operation result on the feature config item. + * The arguments are the same as passed to com.android.ims.ImsConfig#getFeatureValue. + * + * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants. + * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. + * @param value. as defined in com.android.ims.ImsConfig#FeatureValueConstants. + * @param status. as defined in com.android.ims.ImsConfig#OperationStatusConstants. + * @return void. + */ + void onGetFeatureResponse(int feature, int network, int value, int status); + + /** + * Notifies client the set value operation result for feature config item. + * Used by clients that need to be notified the set operation result. + * The arguments are the same as passed to com.android.ims.ImsConfig#setFeatureValue. + * The arguments are repeated in the callback to enable the listener to understand + * which configuration attempt failed. + * + * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants. + * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. + * @param value. as defined in com.android.ims.ImsConfig#FeatureValueConstants. + * @param status. as defined in com.android.ims.ImsConfig#OperationStatusConstants. + * + * @return void. + */ + void onSetFeatureResponse(int feature, int network, int value, int status); +}
\ No newline at end of file diff --git a/telephony/java/com/android/ims/internal/IImsConfig.aidl b/telephony/java/com/android/ims/internal/IImsConfig.aidl new file mode 100644 index 0000000..e8d921e --- /dev/null +++ b/telephony/java/com/android/ims/internal/IImsConfig.aidl @@ -0,0 +1,115 @@ +/* + * 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.ImsConfigListener; + +/** + * Provides APIs to get/set the IMS service capability/parameters. + * The parameters can be configured by operator and/or user. + * We define 4 storage locations for the IMS config items: + * 1) Default config:For factory out device or device after factory data reset, + * the default config is used to build the initial state of the master config value. + * 2) Provisioned value: as the parameters provisioned by operator need to be preserved + * across FDR(factory data reset)/BOTA(over the air software upgrade), the operator + * provisioned items should be stored in memory location preserved across FDR/BOTA. + * 3) Master value: as the provisioned value can override the user setting, + * and the master config are used by IMS stack. They should be stored in the + * storage based on IMS vendor implementations. + * 4) User setting: For items can be changed by both user/operator, the user + * setting should take effect in some cases. So the user setting should be stored in + * database like setting.db. + * + * Priority consideration if both operator/user can config the same item: + * 1) For feature config items, the master value is obtained from the provisioned value + * masks with the user setting. Specifically the provisioned values overrides + * the user setting if feature is provisioned off. Otherwise, user setting takes + * effect. + * 2) For non-feature config item: to be implemented based on cases. + * Special cases considered as below: + * 1) Factory out device, the master configuration is built from default config. + * 2) For Factory data reset/SW upgrade device, the master config is built by + * taking provisioned value overriding default config. + * {@hide} + */ +interface IImsConfig { + /** + * Gets the value for ims service/capabilities parameters from the master + * value storage. Synchronous blocking call. + * + * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. + * @return value in Integer format. + */ + int getMasterValue(int item); + + /** + * Gets the value for ims service/capabilities parameters from the master + * value storage. Synchronous blocking call. + * + * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. + * @return value in String format. + */ + String getMasterStringValue(int item); + + /** + * Sets the value for IMS service/capabilities parameters by the operator device + * management entity. It sets the config item value in the provisioned storage + * from which the master value is derived. Synchronous blocking call. + * + * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. + * @param value in Integer format. + * @return void. + */ + void setProvisionedValue(int item, int value); + + /** + * Sets the value for IMS service/capabilities parameters by the operator device + * management entity. It sets the config item value in the provisioned storage + * from which the master value is derived. Synchronous blocking call. + * + * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. + * @param value in String format. + * @return void. + */ + void setProvisionedStringValue(int item, String value); + + /** + * Gets the value of the specified IMS feature item for specified network type. + * This operation gets the feature config value from the master storage (i.e. final + * value). Asynchronous non-blocking call. + * + * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants. + * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. + * @param listener. feature value returned asynchronously through listener. + * @return void + */ + oneway void getFeatureValue(int feature, int network, ImsConfigListener listener); + + /** + * Sets the value for IMS feature item for specified network type. + * This operation stores the user setting in setting db from which master db + * is dervied. + * + * @param feature. as defined in com.android.ims.ImsConfig#FeatureConstants. + * @param network. as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX. + * @param value. as defined in com.android.ims.ImsConfig#FeatureValueConstants. + * @param listener, provided if caller needs to be notified for set result. + * @return void + */ + oneway void setFeatureValue(int feature, int network, int value, ImsConfigListener listener); +} diff --git a/telephony/java/com/android/ims/internal/IImsService.aidl b/telephony/java/com/android/ims/internal/IImsService.aidl index bac5651..d992124 100644 --- a/telephony/java/com/android/ims/internal/IImsService.aidl +++ b/telephony/java/com/android/ims/internal/IImsService.aidl @@ -23,6 +23,7 @@ import com.android.ims.internal.IImsRegistrationListener; import com.android.ims.internal.IImsCallSession; import com.android.ims.internal.IImsCallSessionListener; import com.android.ims.internal.IImsUt; +import com.android.ims.internal.IImsConfig; /** * {@hide} @@ -45,4 +46,9 @@ interface IImsService { * Ut interface for the supplementary service configuration. */ IImsUt getUtInterface(int serviceId); + + /** + * Config interface to get/set IMS service/capability parameters. + */ + IImsConfig getConfigInterface(); } |