Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 1 | /* |
Alexandre Lision | c1024c0 | 2014-01-06 11:12:53 -0500 | [diff] [blame] | 2 | * Copyright (C) 2004-2014 Savoir-Faire Linux Inc. |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 3 | * |
Alexandre Lision | 6885547 | 2013-10-10 16:20:46 -0400 | [diff] [blame] | 4 | * Author: Alexandre Lision <alexandre.lision@savoirfairelinux> |
| 5 | * Alexandre Savard <alexandre.savard@gmail.com> |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | * |
| 21 | * Additional permission under GNU GPL version 3 section 7: |
| 22 | * |
| 23 | * If you modify this program, or any covered work, by linking or |
| 24 | * combining it with the OpenSSL project's OpenSSL library (or a |
| 25 | * modified version of that library), containing parts covered by the |
| 26 | * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. |
| 27 | * grants you additional permission to convey the resulting work. |
| 28 | * Corresponding Source for a non-source form of such a combination |
| 29 | * shall include the source code for the parts of OpenSSL used as well |
| 30 | * as that of the covered work. |
| 31 | */ |
Alexandre Lision | 064e1e0 | 2013-10-01 16:18:42 -0400 | [diff] [blame] | 32 | package org.sflphone.model; |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 33 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 34 | import android.os.Bundle; |
Alexandre Savard | 557a574 | 2012-10-24 13:54:53 -0400 | [diff] [blame] | 35 | import android.os.Parcel; |
alision | a432515 | 2013-04-19 11:10:03 -0400 | [diff] [blame] | 36 | import android.os.Parcelable; |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 37 | import android.util.Log; |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 38 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 39 | public class SipCall implements Parcelable { |
alision | 371b77e | 2013-04-23 14:51:26 -0400 | [diff] [blame] | 40 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 41 | public static String ID = "id"; |
| 42 | public static String ACCOUNT = "account"; |
| 43 | public static String CONTACT = "contcat"; |
| 44 | public static String TYPE = "type"; |
| 45 | public static String STATE = "state"; |
| 46 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 47 | private static final String TAG = SipCall.class.getSimpleName(); |
Alexandre Savard | 2f1ae54 | 2012-10-26 17:05:00 -0400 | [diff] [blame] | 48 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 49 | private String mCallID = ""; |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 50 | private Account mAccount = null; |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 51 | private CallContact mContact = null; |
alision | df1dac9 | 2013-06-27 17:35:53 -0400 | [diff] [blame] | 52 | private boolean isRecording = false; |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 53 | private long timestampStart_ = 0; |
| 54 | private long timestampEnd_ = 0; |
| 55 | |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 56 | private int mCallType; |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 57 | private int mCallState = state.CALL_STATE_NONE; |
Alexandre Savard | 2b01c82 | 2012-09-20 15:00:37 -0400 | [diff] [blame] | 58 | |
Alexandre Lision | 5f144b8 | 2014-02-11 09:59:36 -0500 | [diff] [blame] | 59 | |
| 60 | public boolean isSecured() { |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 61 | return false; |
Alexandre Lision | 5f144b8 | 2014-02-11 09:59:36 -0500 | [diff] [blame] | 62 | } |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 63 | /** |
| 64 | * ********************* |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 65 | * Construtors |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 66 | * ********************* |
| 67 | */ |
Alexandre Savard | 557a574 | 2012-10-24 13:54:53 -0400 | [diff] [blame] | 68 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 69 | protected SipCall(Parcel in) { |
Alexandre Savard | 557a574 | 2012-10-24 13:54:53 -0400 | [diff] [blame] | 70 | |
Alexandre Lision | d568603 | 2013-10-29 11:09:21 -0400 | [diff] [blame] | 71 | mCallID = in.readString(); |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 72 | mAccount = in.readParcelable(Account.class.getClassLoader()); |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 73 | mContact = in.readParcelable(CallContact.class.getClassLoader()); |
alision | df1dac9 | 2013-06-27 17:35:53 -0400 | [diff] [blame] | 74 | isRecording = in.readByte() == 1; |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 75 | mCallType = in.readInt(); |
| 76 | mCallState = in.readInt(); |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 77 | timestampStart_ = in.readLong(); |
| 78 | timestampEnd_ = in.readLong(); |
| 79 | } |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 80 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 81 | public SipCall(Bundle args) { |
| 82 | mCallID = args.getString(ID); |
| 83 | mAccount = args.getParcelable(ACCOUNT); |
| 84 | mCallType = args.getInt(TYPE); |
| 85 | mCallState = args.getInt(STATE); |
| 86 | mContact = args.getParcelable(CONTACT); |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 87 | } |
| 88 | |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 89 | public long getTimestampEnd_() { |
| 90 | return timestampEnd_; |
| 91 | } |
| 92 | |
| 93 | public String getRecordPath() { |
| 94 | return ""; |
| 95 | } |
| 96 | |
Alexandre Lision | 183bf45 | 2014-01-17 11:21:59 -0500 | [diff] [blame] | 97 | public int getCallType() { |
| 98 | return mCallType; |
| 99 | } |
| 100 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 101 | public Bundle getBundle() { |
| 102 | Bundle args = new Bundle(); |
| 103 | args.putString(SipCall.ID, mCallID); |
| 104 | args.putParcelable(SipCall.ACCOUNT, mAccount); |
| 105 | args.putInt(SipCall.STATE, mCallState); |
| 106 | args.putInt(SipCall.TYPE, mCallType); |
| 107 | args.putParcelable(SipCall.CONTACT, mContact); |
| 108 | return args; |
Alexandre Lision | 5f144b8 | 2014-02-11 09:59:36 -0500 | [diff] [blame] | 109 | } |
| 110 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 111 | |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 112 | public interface direction { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 113 | public static final int CALL_TYPE_INCOMING = 1; |
| 114 | public static final int CALL_TYPE_OUTGOING = 2; |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 115 | } |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 116 | |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 117 | public interface state { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 118 | public static final int CALL_STATE_NONE = 0; |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 119 | public static final int CALL_STATE_RINGING = 2; |
| 120 | public static final int CALL_STATE_CURRENT = 3; |
| 121 | public static final int CALL_STATE_HUNGUP = 4; |
| 122 | public static final int CALL_STATE_BUSY = 5; |
| 123 | public static final int CALL_STATE_FAILURE = 6; |
| 124 | public static final int CALL_STATE_HOLD = 7; |
| 125 | public static final int CALL_STATE_UNHOLD = 8; |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 126 | } |
| 127 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 128 | @Override |
| 129 | public int describeContents() { |
| 130 | return 0; |
| 131 | } |
| 132 | |
| 133 | @Override |
| 134 | public void writeToParcel(Parcel out, int flags) { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 135 | |
Alexandre Lision | d568603 | 2013-10-29 11:09:21 -0400 | [diff] [blame] | 136 | out.writeString(mCallID); |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 137 | out.writeParcelable(mAccount, 0); |
| 138 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 139 | out.writeParcelable(mContact, 0); |
alision | df1dac9 | 2013-06-27 17:35:53 -0400 | [diff] [blame] | 140 | out.writeByte((byte) (isRecording ? 1 : 0)); |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 141 | out.writeInt(mCallType); |
| 142 | out.writeInt(mCallState); |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 143 | out.writeLong(timestampStart_); |
| 144 | out.writeLong(timestampEnd_); |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | public static final Parcelable.Creator<SipCall> CREATOR = new Parcelable.Creator<SipCall>() { |
| 148 | public SipCall createFromParcel(Parcel in) { |
| 149 | return new SipCall(in); |
| 150 | } |
| 151 | |
| 152 | public SipCall[] newArray(int size) { |
| 153 | return new SipCall[size]; |
| 154 | } |
| 155 | }; |
| 156 | |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 157 | public void setCallID(String callID) { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 158 | mCallID = callID; |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | public String getCallId() { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 162 | return mCallID; |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 163 | } |
| 164 | |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 165 | public long getTimestampStart_() { |
| 166 | return timestampStart_; |
Alexandre Lision | 3c6b710 | 2013-09-16 16:56:46 -0400 | [diff] [blame] | 167 | } |
| 168 | |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 169 | public void setTimestampStart_(long timestampStart_) { |
| 170 | this.timestampStart_ = timestampStart_; |
| 171 | } |
| 172 | |
| 173 | public void setTimestampEnd_(long timestampEnd_) { |
| 174 | this.timestampEnd_ = timestampEnd_; |
Alexandre Lision | 3c6b710 | 2013-09-16 16:56:46 -0400 | [diff] [blame] | 175 | } |
| 176 | |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 177 | public void setAccount(Account account) { |
| 178 | mAccount = account; |
Alexandre Savard | 73bc56f | 2012-10-25 13:35:54 -0400 | [diff] [blame] | 179 | } |
| 180 | |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 181 | public Account getAccount() { |
| 182 | return mAccount; |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 183 | } |
| 184 | |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 185 | public String getCallTypeString() { |
| 186 | switch (mCallType) { |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 187 | case direction.CALL_TYPE_INCOMING: |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 188 | return "CALL_TYPE_INCOMING"; |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 189 | case direction.CALL_TYPE_OUTGOING: |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 190 | return "CALL_TYPE_OUTGOING"; |
| 191 | default: |
| 192 | return "CALL_TYPE_UNDETERMINED"; |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 196 | public void setCallState(int callState) { |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 197 | mCallState = callState; |
Alexandre Savard | c58c0fd | 2012-10-25 10:44:08 -0400 | [diff] [blame] | 198 | } |
| 199 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 200 | public CallContact getmContact() { |
| 201 | return mContact; |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 202 | } |
| 203 | |
Alexandre Lision | a7ab2e3 | 2014-02-14 15:33:33 -0500 | [diff] [blame^] | 204 | public void setmContact(CallContact contacts) { |
| 205 | mContact = contacts; |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 206 | } |
| 207 | |
Alexandre Savard | df54426 | 2012-10-25 14:24:08 -0400 | [diff] [blame] | 208 | public String getCallStateString() { |
Alexandre Savard | df54426 | 2012-10-25 14:24:08 -0400 | [diff] [blame] | 209 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 210 | String text_state; |
| 211 | |
| 212 | switch (mCallState) { |
Alexandre Lision | 945e461 | 2014-01-15 17:40:31 -0500 | [diff] [blame] | 213 | case state.CALL_STATE_RINGING: |
| 214 | text_state = "RINGING"; |
| 215 | break; |
| 216 | case state.CALL_STATE_CURRENT: |
| 217 | text_state = "CURRENT"; |
| 218 | break; |
| 219 | case state.CALL_STATE_HUNGUP: |
| 220 | text_state = "HUNGUP"; |
| 221 | break; |
| 222 | case state.CALL_STATE_BUSY: |
| 223 | text_state = "BUSY"; |
| 224 | break; |
| 225 | case state.CALL_STATE_FAILURE: |
| 226 | text_state = "FAILURE"; |
| 227 | break; |
| 228 | case state.CALL_STATE_HOLD: |
| 229 | text_state = "HOLD"; |
| 230 | break; |
| 231 | case state.CALL_STATE_UNHOLD: |
| 232 | text_state = "UNHOLD"; |
| 233 | break; |
| 234 | default: |
| 235 | text_state = "NULL"; |
Alexandre Savard | df54426 | 2012-10-25 14:24:08 -0400 | [diff] [blame] | 236 | } |
| 237 | |
alision | fde875f | 2013-05-28 17:01:54 -0400 | [diff] [blame] | 238 | return text_state; |
Alexandre Savard | df54426 | 2012-10-25 14:24:08 -0400 | [diff] [blame] | 239 | } |
| 240 | |
alision | df1dac9 | 2013-06-27 17:35:53 -0400 | [diff] [blame] | 241 | public boolean isRecording() { |
| 242 | return isRecording; |
| 243 | } |
| 244 | |
| 245 | public void setRecording(boolean isRecording) { |
| 246 | this.isRecording = isRecording; |
| 247 | } |
| 248 | |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 249 | public void printCallInfo() { |
| 250 | Log.i(TAG, "CallInfo: CallID: " + mCallID); |
Alexandre Lision | 3ee516e | 2013-10-07 17:32:15 -0400 | [diff] [blame] | 251 | Log.i(TAG, " AccountID: " + mAccount.getAccountID()); |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 252 | Log.i(TAG, " CallState: " + mCallState); |
| 253 | Log.i(TAG, " CallType: " + mCallType); |
| 254 | } |
Alexandre Savard | 73bc56f | 2012-10-25 13:35:54 -0400 | [diff] [blame] | 255 | |
alision | 5f89963 | 2013-04-22 17:26:56 -0400 | [diff] [blame] | 256 | /** |
| 257 | * Compare sip calls based on call ID |
| 258 | */ |
| 259 | @Override |
alision | 11e8e16 | 2013-05-28 10:33:14 -0400 | [diff] [blame] | 260 | public boolean equals(Object c) { |
alision | 465ceba | 2013-07-04 09:24:30 -0400 | [diff] [blame] | 261 | if (c instanceof SipCall && ((SipCall) c).mCallID.contentEquals((mCallID))) { |
alision | 5f89963 | 2013-04-22 17:26:56 -0400 | [diff] [blame] | 262 | return true; |
| 263 | } |
| 264 | return false; |
alision | 11e8e16 | 2013-05-28 10:33:14 -0400 | [diff] [blame] | 265 | |
alision | 5f89963 | 2013-04-22 17:26:56 -0400 | [diff] [blame] | 266 | } |
alision | 7f18fc8 | 2013-05-01 09:37:33 -0400 | [diff] [blame] | 267 | |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 268 | public boolean isOutGoing() { |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 269 | if (mCallType == direction.CALL_TYPE_OUTGOING) |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 270 | return true; |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 271 | return false; |
| 272 | } |
| 273 | |
| 274 | public boolean isRinging() { |
| 275 | if (mCallState == state.CALL_STATE_RINGING || mCallState == state.CALL_STATE_NONE) |
| 276 | return true; |
| 277 | |
| 278 | return false; |
| 279 | } |
| 280 | |
| 281 | public boolean isIncoming() { |
Alexandre Lision | 67c70b4 | 2014-01-16 13:57:15 -0500 | [diff] [blame] | 282 | if (mCallType == direction.CALL_TYPE_INCOMING) |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 283 | return true; |
| 284 | |
| 285 | return false; |
| 286 | } |
| 287 | |
| 288 | public void setCallState(String newState) { |
Alexandre Lision | 707f908 | 2014-01-16 15:09:07 -0500 | [diff] [blame] | 289 | if (newState.equals("RINGING")) { |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 290 | setCallState(SipCall.state.CALL_STATE_RINGING); |
| 291 | } else if (newState.equals("CURRENT")) { |
| 292 | setCallState(SipCall.state.CALL_STATE_CURRENT); |
| 293 | } else if (newState.equals("HUNGUP")) { |
| 294 | setCallState(SipCall.state.CALL_STATE_HUNGUP); |
| 295 | } else if (newState.equals("BUSY")) { |
| 296 | setCallState(SipCall.state.CALL_STATE_BUSY); |
| 297 | } else if (newState.equals("FAILURE")) { |
| 298 | setCallState(SipCall.state.CALL_STATE_FAILURE); |
| 299 | } else if (newState.equals("HOLD")) { |
| 300 | setCallState(SipCall.state.CALL_STATE_HOLD); |
| 301 | } else if (newState.equals("UNHOLD")) { |
| 302 | setCallState(SipCall.state.CALL_STATE_CURRENT); |
| 303 | } else { |
| 304 | setCallState(SipCall.state.CALL_STATE_NONE); |
| 305 | } |
alision | 907bde7 | 2013-06-20 14:40:37 -0400 | [diff] [blame] | 306 | |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | public boolean isOngoing() { |
alision | 907bde7 | 2013-06-20 14:40:37 -0400 | [diff] [blame] | 310 | if (mCallState == state.CALL_STATE_RINGING || mCallState == state.CALL_STATE_NONE || mCallState == state.CALL_STATE_FAILURE |
| 311 | || mCallState == state.CALL_STATE_BUSY || mCallState == state.CALL_STATE_HUNGUP) |
alision | 8570418 | 2013-05-29 15:23:03 -0400 | [diff] [blame] | 312 | return false; |
| 313 | |
| 314 | return true; |
| 315 | } |
alision | 04a0018 | 2013-05-10 17:05:29 -0400 | [diff] [blame] | 316 | |
alision | df1dac9 | 2013-06-27 17:35:53 -0400 | [diff] [blame] | 317 | public boolean isOnHold() { |
| 318 | return mCallState == state.CALL_STATE_HOLD; |
| 319 | } |
| 320 | |
Alexandre Lision | 6ae652d | 2013-09-26 16:39:20 -0400 | [diff] [blame] | 321 | public boolean isCurrent() { |
| 322 | return mCallState == state.CALL_STATE_CURRENT; |
| 323 | } |
Alexandre Lision | 5f144b8 | 2014-02-11 09:59:36 -0500 | [diff] [blame] | 324 | |
Alexandre Lision | 5f144b8 | 2014-02-11 09:59:36 -0500 | [diff] [blame] | 325 | |
Alexandre Savard | 4a19d75 | 2012-09-19 13:19:24 -0400 | [diff] [blame] | 326 | } |