1 /*
2  * Copyright (C) 2013 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 com.android.phone;
18 
19 import android.net.Uri;
20 import android.text.TextUtils;
21 
22 /**
23  * TODO: Not much of this class is even used any more.  Need to unwind the RawGatewayInfo class as
24  * it is used in part of the placeCall method used in OTASP.
25  */
26 public class CallGatewayManager {
27     public static final RawGatewayInfo EMPTY_INFO = new RawGatewayInfo(null, null, null);
28 
CallGatewayManager()29     private CallGatewayManager() {
30     }
31 
32     public static class RawGatewayInfo {
33         public String packageName;
34         public Uri gatewayUri;
35         public String trueNumber;
36 
RawGatewayInfo(String packageName, Uri gatewayUri, String trueNumber)37         public RawGatewayInfo(String packageName, Uri gatewayUri,
38                 String trueNumber) {
39             this.packageName = packageName;
40             this.gatewayUri = gatewayUri;
41             this.trueNumber = trueNumber;
42         }
43 
isEmpty()44         public boolean isEmpty() {
45             return TextUtils.isEmpty(packageName) || gatewayUri == null;
46         }
47     }
48 }
49