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