59 lines
1.4 KiB
Java
59 lines
1.4 KiB
Java
package com.safemobile.lib.radio;
|
|
|
|
import com.safemobile.lib.AppParams;
|
|
import com.safemobile.lib.Mic;
|
|
|
|
public class IncCall {
|
|
public int gwID;
|
|
public int rgwID;
|
|
public long Imei;
|
|
public int callStatus;
|
|
public int callType;
|
|
public int groupId;
|
|
public int userID;
|
|
public int opCode;
|
|
public Mic mic = null;
|
|
|
|
public long callerID = 0;
|
|
public long callDestID = 0;
|
|
|
|
public IncCall(){
|
|
|
|
}
|
|
public String toString()
|
|
{
|
|
return " Imei: " + Imei + " | opCode: " + opCode
|
|
+ " | callStatus: " + callStatus+ " | callType: " + callType
|
|
+ " | groupId: " + groupId + " | userID: " + userID;
|
|
}
|
|
|
|
public static String getCallTypeAsString(int type) {
|
|
switch (type) {
|
|
case AppParams.MotoAllCall: return "All Call";
|
|
case AppParams.MotoGroup: return "Group Call";
|
|
case AppParams.MotoPrivate: return "Private Call";
|
|
default: return "";
|
|
}
|
|
}
|
|
|
|
public static String getCallStatusAsString(int status) {
|
|
switch (status) {
|
|
case AppParams.InProgress: return "In Progress";
|
|
case AppParams.Initiated: return "Initiated";
|
|
case AppParams.Decoded: return "Decoded";
|
|
case AppParams.Hangtime: return "Hangtime";
|
|
case AppParams.Ended: return "Ended";
|
|
default: return "unknown";
|
|
}
|
|
}
|
|
|
|
public static String getCallInitiatorAsString(final long myID, int userID) {
|
|
if(userID == myID)
|
|
return "my Android";
|
|
else if (userID == 0)
|
|
return "Portable";
|
|
else
|
|
return "other Android";
|
|
}
|
|
}
|