Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 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 | |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 19 | import android.net.Uri; |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 20 | import android.text.TextUtils; |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 21 | |
| 22 | /** |
Tyler Gunn | a1abb58 | 2018-09-14 16:12:01 -0700 | [diff] [blame] | 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. |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 25 | */ |
| 26 | public class CallGatewayManager { |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 27 | public static final RawGatewayInfo EMPTY_INFO = new RawGatewayInfo(null, null, null); |
| 28 | |
Jay Shrauner | 21a7534 | 2013-11-25 16:14:43 -0800 | [diff] [blame] | 29 | private CallGatewayManager() { |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 30 | } |
| 31 | |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 32 | public static class RawGatewayInfo { |
| 33 | public String packageName; |
| 34 | public Uri gatewayUri; |
| 35 | public String trueNumber; |
| 36 | |
| 37 | public RawGatewayInfo(String packageName, Uri gatewayUri, |
| 38 | String trueNumber) { |
| 39 | this.packageName = packageName; |
| 40 | this.gatewayUri = gatewayUri; |
| 41 | this.trueNumber = trueNumber; |
| 42 | } |
| 43 | |
Santos Cordon | 69a6919 | 2013-08-22 14:25:42 -0700 | [diff] [blame] | 44 | public boolean isEmpty() { |
| 45 | return TextUtils.isEmpty(packageName) || gatewayUri == null; |
| 46 | } |
| 47 | } |
| 48 | } |