1 /* 2 * Copyright (c) 2015, Motorola Mobility LLC 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * - Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * - Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * - Neither the name of Motorola Mobility nor the 13 * names of its contributors may be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MOTOROLA MOBILITY LLC BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 26 * DAMAGE. 27 */ 28 29 package com.android.service.ims.presence; 30 31 public class PresenceContact { 32 public static final int VIDEO_CALLING_NOT_AVAILABLE = 0; 33 public static final int VIDEO_CALLING_AVAILABLE = 1; 34 35 String mDisplayName = null; 36 String mPhoneNumber = null; 37 String mFormattedNumber = null; 38 String mRawContactId = null; 39 String mContactId = null; 40 String mDataId = null; 41 boolean mIsVolteCapable = false; 42 boolean mIsVtCapable = false; 43 int mVtStatus = VIDEO_CALLING_NOT_AVAILABLE; 44 45 String mVtUri = null; 46 PresenceContact(String name, String number, String formattedNumber, String rawContactId, String contactId, String dataId)47 public PresenceContact(String name, String number, String formattedNumber, String rawContactId, 48 String contactId, String dataId) { 49 mDisplayName = name; 50 mPhoneNumber = number; 51 mFormattedNumber = formattedNumber; 52 mRawContactId = rawContactId; 53 mContactId = contactId; 54 mDataId = dataId; 55 } 56 getDisplayName()57 public String getDisplayName() { 58 return mDisplayName; 59 } 60 getPhoneNumber()61 public String getPhoneNumber() { 62 return mPhoneNumber; 63 } 64 getFormattedNumber()65 public String getFormattedNumber() { 66 return mFormattedNumber; 67 } 68 getRawContactId()69 public String getRawContactId() { 70 return mRawContactId; 71 } 72 getContactId()73 public String getContactId() { 74 return mContactId; 75 } 76 getDataId()77 public String getDataId() { 78 return mDataId; 79 } 80 isVolteCapable()81 public boolean isVolteCapable() { 82 return mIsVolteCapable; 83 } 84 setIsVolteCapable(boolean isVolteCapable)85 public void setIsVolteCapable(boolean isVolteCapable) { 86 mIsVolteCapable = isVolteCapable; 87 } 88 isVtCapable()89 public boolean isVtCapable() { 90 return mIsVtCapable; 91 } 92 setIsVtCapable(boolean isVtCapable)93 public void setIsVtCapable(boolean isVtCapable) { 94 mIsVtCapable = isVtCapable; 95 } 96 getVtStatus()97 public int getVtStatus() { 98 return mVtStatus; 99 } 100 setVtStatus(int vtAvailable)101 public void setVtStatus(int vtAvailable) { 102 mVtStatus = vtAvailable; 103 } 104 getVtUri()105 public String getVtUri() { 106 return mVtUri; 107 } 108 setVtUri(String vtUri)109 public void setVtUri(String vtUri) { 110 mVtUri = vtUri; 111 } 112 } 113