1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package android.telephony.ims.stub;
18
19import android.os.RemoteException;
20
21import com.android.ims.ImsConfig;
22import com.android.ims.ImsConfigListener;
23import com.android.ims.internal.IImsConfig;
24
25/**
26 * Base implementation of ImsConfig, which implements stub versions of the methods
27 * in the IImsConfig AIDL. Override the methods that your implementation of ImsConfig supports.
28 *
29 * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
30 * will break other implementations of ImsConfig maintained by other ImsServices.
31 *
32 * Provides APIs to get/set the IMS service feature/capability/parameters.
33 * The config items include:
34 * 1) Items provisioned by the operator.
35 * 2) Items configured by user. Mainly service feature class.
36 *
37 * @hide
38 */
39
40public class ImsConfigImplBase extends IImsConfig.Stub {
41
42    /**
43     * Gets the value for ims service/capabilities parameters from the provisioned
44     * value storage. Synchronous blocking call.
45     *
46     * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
47     * @return value in Integer format.
48     */
49    @Override
50    public int getProvisionedValue(int item) throws RemoteException {
51        return -1;
52    }
53
54    /**
55     * Gets the value for ims service/capabilities parameters from the provisioned
56     * value storage. Synchronous blocking call.
57     *
58     * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
59     * @return value in String format.
60     */
61    @Override
62    public String getProvisionedStringValue(int item) throws RemoteException {
63        return null;
64    }
65
66    /**
67     * Sets the value for IMS service/capabilities parameters by the operator device
68     * management entity. It sets the config item value in the provisioned storage
69     * from which the master value is derived. Synchronous blocking call.
70     *
71     * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
72     * @param value in Integer format.
73     * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
74     */
75    @Override
76    public int setProvisionedValue(int item, int value) throws RemoteException {
77        return ImsConfig.OperationStatusConstants.FAILED;
78    }
79
80    /**
81     * Sets the value for IMS service/capabilities parameters by the operator device
82     * management entity. It sets the config item value in the provisioned storage
83     * from which the master value is derived.  Synchronous blocking call.
84     *
85     * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
86     * @param value in String format.
87     * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
88     */
89    @Override
90    public int setProvisionedStringValue(int item, String value) throws RemoteException {
91        return ImsConfig.OperationStatusConstants.FAILED;
92    }
93
94    /**
95     * Gets the value of the specified IMS feature item for specified network type.
96     * This operation gets the feature config value from the master storage (i.e. final
97     * value). Asynchronous non-blocking call.
98     *
99     * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
100     * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
101     * @param listener feature value returned asynchronously through listener.
102     */
103    @Override
104    public void getFeatureValue(int feature, int network, ImsConfigListener listener)
105            throws RemoteException {
106    }
107
108    /**
109     * Sets the value for IMS feature item for specified network type.
110     * This operation stores the user setting in setting db from which master db
111     * is derived.
112     *
113     * @param feature as defined in com.android.ims.ImsConfig#FeatureConstants.
114     * @param network as defined in android.telephony.TelephonyManager#NETWORK_TYPE_XXX.
115     * @param value as defined in com.android.ims.ImsConfig#FeatureValueConstants.
116     * @param listener, provided if caller needs to be notified for set result.
117     */
118    @Override
119    public void setFeatureValue(int feature, int network, int value, ImsConfigListener listener)
120            throws RemoteException {
121    }
122
123    /**
124     * Gets the value for IMS VoLTE provisioned.
125     * This should be the same as the operator provisioned value if applies.
126     */
127    @Override
128    public boolean getVolteProvisioned() throws RemoteException {
129        return false;
130    }
131
132    /**
133     * Gets the value for IMS feature item video quality.
134     *
135     * @param listener Video quality value returned asynchronously through listener.
136     */
137    @Override
138    public void getVideoQuality(ImsConfigListener listener) throws RemoteException {
139    }
140
141    /**
142     * Sets the value for IMS feature item video quality.
143     *
144     * @param quality, defines the value of video quality.
145     * @param listener, provided if caller needs to be notified for set result.
146     */
147    @Override
148    public void setVideoQuality(int quality, ImsConfigListener listener) throws RemoteException {
149    }
150}
151