• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 
17 package android.telephony.ims;
18 
19 import android.annotation.SystemApi;
20 import android.os.Bundle;
21 import android.os.RemoteException;
22 import android.util.Log;
23 
24 import com.android.ims.internal.IImsUtListener;
25 
26 /**
27  * Base implementation of the IMS UT listener interface, which implements stubs.
28  * Override these methods to implement functionality.
29  * @hide
30  */
31 // DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
32 // will break other implementations of ImsUt maintained by other ImsServices.
33 @SystemApi
34 public class ImsUtListener {
35     private IImsUtListener mServiceInterface;
36     private static final String LOG_TAG = "ImsUtListener";
37 
onUtConfigurationUpdated(int id)38     public void onUtConfigurationUpdated(int id) {
39         try {
40             mServiceInterface.utConfigurationUpdated(null, id);
41         } catch (RemoteException e) {
42             Log.w(LOG_TAG, "utConfigurationUpdated: remote exception");
43         }
44     }
45 
onUtConfigurationUpdateFailed(int id, ImsReasonInfo error)46     public void onUtConfigurationUpdateFailed(int id, ImsReasonInfo error) {
47         try {
48             mServiceInterface.utConfigurationUpdateFailed(null, id, error);
49         } catch (RemoteException e) {
50             Log.w(LOG_TAG, "utConfigurationUpdateFailed: remote exception");
51         }
52     }
53 
onUtConfigurationQueried(int id, Bundle ssInfo)54     public void onUtConfigurationQueried(int id, Bundle ssInfo) {
55         try {
56             mServiceInterface.utConfigurationQueried(null, id, ssInfo);
57         } catch (RemoteException e) {
58             Log.w(LOG_TAG, "utConfigurationQueried: remote exception");
59         }
60     }
61 
onUtConfigurationQueryFailed(int id, ImsReasonInfo error)62     public void onUtConfigurationQueryFailed(int id, ImsReasonInfo error) {
63         try {
64             mServiceInterface.utConfigurationQueryFailed(null, id, error);
65         } catch (RemoteException e) {
66             Log.w(LOG_TAG, "utConfigurationQueryFailed: remote exception");
67         }
68     }
69 
onUtConfigurationCallBarringQueried(int id, ImsSsInfo[] cbInfo)70     public void onUtConfigurationCallBarringQueried(int id, ImsSsInfo[] cbInfo) {
71         try {
72             mServiceInterface.utConfigurationCallBarringQueried(null, id, cbInfo);
73         } catch (RemoteException e) {
74             Log.w(LOG_TAG, "utConfigurationCallBarringQueried: remote exception");
75         }
76     }
77 
onUtConfigurationCallForwardQueried(int id, ImsCallForwardInfo[] cfInfo)78     public void onUtConfigurationCallForwardQueried(int id, ImsCallForwardInfo[] cfInfo) {
79         try {
80             mServiceInterface.utConfigurationCallForwardQueried(null, id, cfInfo);
81         } catch (RemoteException e) {
82             Log.w(LOG_TAG, "utConfigurationCallForwardQueried: remote exception");
83         }
84     }
85 
onUtConfigurationCallWaitingQueried(int id, ImsSsInfo[] cwInfo)86     public void onUtConfigurationCallWaitingQueried(int id, ImsSsInfo[] cwInfo) {
87         try {
88             mServiceInterface.utConfigurationCallWaitingQueried(null, id, cwInfo);
89         } catch (RemoteException e) {
90             Log.w(LOG_TAG, "utConfigurationCallWaitingQueried: remote exception");
91         }
92     }
93 
onSupplementaryServiceIndication(ImsSsData ssData)94     public void onSupplementaryServiceIndication(ImsSsData ssData) {
95         try {
96             mServiceInterface.onSupplementaryServiceIndication(ssData);
97         } catch (RemoteException e) {
98             Log.w(LOG_TAG, "onSupplementaryServiceIndication: remote exception");
99         }
100     }
101 
102     /**
103      * @hide
104      */
ImsUtListener(IImsUtListener serviceInterface)105     public ImsUtListener(IImsUtListener serviceInterface) {
106         mServiceInterface = serviceInterface;
107     }
108 }
109