• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /**
32  * PresencePublishTask
33  */
34 public class PresencePublishTask extends PresenceTask{
35 
36     private long mCreateTimestamp = 0;
37 
38     private int mRetryCount = 0;
39 
PresencePublishTask(int taskId, int cmdId, ContactCapabilityResponse listener, String[] contacts)40     public PresencePublishTask(int taskId, int cmdId, ContactCapabilityResponse listener,
41             String[] contacts){
42         super(taskId, cmdId, listener, contacts);
43 
44         mCreateTimestamp = System.currentTimeMillis();
45     }
46 
getCreateTimestamp()47     public long getCreateTimestamp() {
48         return mCreateTimestamp;
49     }
50 
getRetryCount()51     public int getRetryCount() {
52         return mRetryCount;
53     }
54 
setRetryCount(int retryCount)55     public void setRetryCount(int retryCount) {
56         mRetryCount = retryCount;
57     }
58 
toString()59     public String toString(){
60         return super.toString() +
61                 " mCreateTimestamp=" + mCreateTimestamp +
62                 " mRetryCount=" + mRetryCount;
63     }
64 }
65