1/* 2 * Copyright (C) 2015 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 */ 16package com.android.car.dialer.telecom; 17 18import android.net.Uri; 19 20/** 21 * Represents a single call on UI. It is an abstraction of {@code android.telecom.Call}. 22 */ 23public class UiCall { 24 private final int mId; 25 26 private int mState; 27 private boolean mHasParent; 28 private String mNumber; 29 private CharSequence mDisconnectCause; 30 private boolean mHasChildren; 31 private Uri mGatewayInfoOriginalAddress; 32 private long connectTimeMillis; 33 34 public UiCall(int id) { 35 mId = id; 36 } 37 38 public int getId() { 39 return mId; 40 } 41 42 public int getState() { 43 return mState; 44 } 45 46 public void setState(int state) { 47 mState = state; 48 } 49 50 public boolean hasParent() { 51 return mHasParent; 52 } 53 54 public void setHasParent(boolean hasParent) { 55 mHasParent = hasParent; 56 } 57 58 public void setHasChildren(boolean hasChildren) { 59 mHasChildren = hasChildren; 60 } 61 62 public boolean hasChildren() { 63 return mHasChildren; 64 } 65 66 public String getNumber() { 67 return mNumber; 68 } 69 70 public void setNumber(String number) { 71 mNumber = number; 72 } 73 74 public CharSequence getDisconnectCause() { 75 return mDisconnectCause; 76 } 77 78 public void setDisconnectCause(CharSequence disconnectCause) { 79 mDisconnectCause = disconnectCause; 80 } 81 82 public Uri getGatewayInfoOriginalAddress() { 83 return mGatewayInfoOriginalAddress; 84 } 85 86 public void setGatewayInfoOriginalAddress(Uri gatewayInfoOriginalAddress) { 87 mGatewayInfoOriginalAddress = gatewayInfoOriginalAddress; 88 } 89 90 public long getConnectTimeMillis() { 91 return connectTimeMillis; 92 } 93 94 public void setConnectTimeMillis(long connectTimeMillis) { 95 this.connectTimeMillis = connectTimeMillis; 96 } 97} 98