|
|
|
|
@@ -20,6 +20,10 @@ import android.compat.annotation.UnsupportedAppUsage;
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
import android.os.Parcel;
|
|
|
|
|
import android.os.Parcelable;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
|
|
/** Class for capability discovery information.
|
|
|
|
|
* @hide */
|
|
|
|
|
@@ -88,6 +92,95 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
/** Time used to compute when to query again. */
|
|
|
|
|
private long mCapTimestamp = 0;
|
|
|
|
|
|
|
|
|
|
private Map<String, String> mCapInfoMap = new HashMap<String, String>();
|
|
|
|
|
|
|
|
|
|
/** IM session feature tag key. */
|
|
|
|
|
public static final String INSTANT_MSG =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.im\"";
|
|
|
|
|
/** File transfer feature tag key. */
|
|
|
|
|
public static final String FILE_TRANSFER =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.ft\"";
|
|
|
|
|
/** File transfer Thumbnail feature tag key. */
|
|
|
|
|
public static final String FILE_TRANSFER_THUMBNAIL =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.ftthumb\"";
|
|
|
|
|
/** File transfer Store and forward feature tag key. */
|
|
|
|
|
public static final String FILE_TRANSFER_SNF =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.ftstandfw\"";
|
|
|
|
|
/** File transfer HTTP feature tag key. */
|
|
|
|
|
public static final String FILE_TRANSFER_HTTP =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.fthttp\"";
|
|
|
|
|
/** Image sharing feature tag key. */
|
|
|
|
|
public static final String IMAGE_SHARE =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-is\"";
|
|
|
|
|
/** Video sharing during a CS call feature tag key-- IR-74. */
|
|
|
|
|
public static final String VIDEO_SHARE_DURING_CS = "+g.3gpp.cs-voice";
|
|
|
|
|
/** Video sharing outside of voice call feature tag key-- IR-84. */
|
|
|
|
|
public static final String VIDEO_SHARE =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-vs\"";
|
|
|
|
|
/** Social presence feature tag key. */
|
|
|
|
|
public static final String SOCIAL_PRESENCE =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.sp\"";
|
|
|
|
|
/** Presence discovery feature tag key. */
|
|
|
|
|
public static final String CAPDISC_VIA_PRESENCE =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.dp\"";
|
|
|
|
|
/** IP voice call feature tag key (IR-92/IR-58). */
|
|
|
|
|
public static final String IP_VOICE =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel\"";
|
|
|
|
|
/** IP video call feature tag key (IR-92/IR-58). */
|
|
|
|
|
public static final String IP_VIDEO =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel\";video";
|
|
|
|
|
/** IP Geo location Pull using File Transfer feature tag key. */
|
|
|
|
|
public static final String GEOPULL_FT =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopullft\"";
|
|
|
|
|
/** IP Geo location Pull feature tag key. */
|
|
|
|
|
public static final String GEOPULL =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopull\"";
|
|
|
|
|
/** IP Geo location Push feature tag key. */
|
|
|
|
|
public static final String GEOPUSH =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.geopush\"";
|
|
|
|
|
/** Standalone messaging feature tag key. */
|
|
|
|
|
public static final String STANDALONE_MSG =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg;" +
|
|
|
|
|
"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.largemsg\"";
|
|
|
|
|
/** Full Store and Forward Group Chat information feature tag key. */
|
|
|
|
|
public static final String FULL_SNF_GROUPCHAT =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.fullsfgroupchat\"";
|
|
|
|
|
/** RCS IP Voice call feature tag key. */
|
|
|
|
|
public static final String RCS_IP_VOICE_CALL =
|
|
|
|
|
"+g.gsma.rcs.ipcall";
|
|
|
|
|
/** RCS IP Video call feature tag key. */
|
|
|
|
|
public static final String RCS_IP_VIDEO_CALL =
|
|
|
|
|
"+g.gsma.rcs.ipvideocall";
|
|
|
|
|
/** RCS IP Video only call feature tag key. */
|
|
|
|
|
public static final String RCS_IP_VIDEO_ONLY_CALL =
|
|
|
|
|
"+g.gsma.rcs.ipvideoonlycall";
|
|
|
|
|
/** IP Geo location Push using SMS feature tag key. */
|
|
|
|
|
public static final String GEOSMS =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gppapplication.ims.iari.rcs.geosms\"";
|
|
|
|
|
/** RCS call composer feature tag key. */
|
|
|
|
|
public static final String CALLCOMPOSER =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gppservice.ims.icsi.gsma.callcomposer\"";
|
|
|
|
|
/** RCS post-call feature tag key. */
|
|
|
|
|
public static final String POSTCALL =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gppservice.ims.icsi.gsma.callunanswered\"";
|
|
|
|
|
/** Shared map feature tag key. */
|
|
|
|
|
public static final String SHAREDMAP =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gppservice.ims.icsi.gsma.sharedmap\"";
|
|
|
|
|
/** Shared Sketch feature tag key. */
|
|
|
|
|
public static final String SHAREDSKETCH =
|
|
|
|
|
"+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gppservice.ims.icsi.gsma.sharedsketch\"";
|
|
|
|
|
/** Chatbot communication feature tag key. */
|
|
|
|
|
public static final String CHATBOT =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gppapplication.ims.iari.rcs.chatbot\"";
|
|
|
|
|
/** Chatbot role feature tag key. */
|
|
|
|
|
public static final String CHATBOTROLE = "+g.gsma.rcs.isbot";
|
|
|
|
|
/** Standalone Chatbot communication feature tag key. */
|
|
|
|
|
public static final String STANDALONE_CHATBOT =
|
|
|
|
|
"+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.chatbot.sa\"";
|
|
|
|
|
/** MMtel based call composer feature tag key. */
|
|
|
|
|
public static final String MMTEL_CALLCOMPOSER = "+g.gsma.callcomposer";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructor for the CapInfo class.
|
|
|
|
|
@@ -99,6 +192,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether IM is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isImSupported() {
|
|
|
|
|
@@ -107,6 +201,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets IM as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setImSupported(boolean imSupported) {
|
|
|
|
|
@@ -115,6 +210,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether FT Thumbnail is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isFtThumbSupported() {
|
|
|
|
|
@@ -123,16 +219,16 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets FT thumbnail as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setFtThumbSupported(boolean ftThumbSupported) {
|
|
|
|
|
this.mFtThumbSupported = ftThumbSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether FT Store and Forward is supported
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isFtSnFSupported() {
|
|
|
|
|
@@ -141,6 +237,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets FT Store and Forward as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setFtSnFSupported(boolean ftSnFSupported) {
|
|
|
|
|
@@ -149,6 +246,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether File transfer HTTP is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isFtHttpSupported() {
|
|
|
|
|
@@ -157,6 +255,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets File transfer HTTP as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setFtHttpSupported(boolean ftHttpSupported) {
|
|
|
|
|
@@ -165,6 +264,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether FT is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isFtSupported() {
|
|
|
|
|
@@ -173,6 +273,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets FT as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setFtSupported(boolean ftSupported) {
|
|
|
|
|
@@ -181,6 +282,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether IS is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isIsSupported() {
|
|
|
|
|
@@ -189,6 +291,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets IS as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setIsSupported(boolean isSupported) {
|
|
|
|
|
@@ -197,6 +300,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether video sharing is supported during a CS call.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isVsDuringCSSupported() {
|
|
|
|
|
@@ -204,8 +308,9 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets video sharing as supported or not supported during a CS
|
|
|
|
|
* call.
|
|
|
|
|
* Sets video sharing as supported or not supported during a CS
|
|
|
|
|
* call.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setVsDuringCSSupported(boolean vsDuringCSSupported) {
|
|
|
|
|
@@ -213,8 +318,9 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether video sharing outside a voice call is
|
|
|
|
|
* supported.
|
|
|
|
|
* Checks whether video sharing outside a voice call is
|
|
|
|
|
* supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isVsSupported() {
|
|
|
|
|
@@ -223,6 +329,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets video sharing as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setVsSupported(boolean vsSupported) {
|
|
|
|
|
@@ -231,6 +338,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether social presence is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isSpSupported() {
|
|
|
|
|
@@ -239,6 +347,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets social presence as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setSpSupported(boolean spSupported) {
|
|
|
|
|
@@ -248,6 +357,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether capability discovery via presence is
|
|
|
|
|
* supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isCdViaPresenceSupported() {
|
|
|
|
|
@@ -257,6 +367,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
/**
|
|
|
|
|
* Sets capability discovery via presence as supported or not
|
|
|
|
|
* supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setCdViaPresenceSupported(boolean cdViaPresenceSupported) {
|
|
|
|
|
@@ -265,6 +376,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether IP voice call is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isIpVoiceSupported() {
|
|
|
|
|
@@ -273,6 +385,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets IP voice call as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setIpVoiceSupported(boolean ipVoiceSupported) {
|
|
|
|
|
@@ -281,6 +394,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether IP video call is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isIpVideoSupported() {
|
|
|
|
|
@@ -289,6 +403,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets IP video call as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setIpVideoSupported(boolean ipVideoSupported) {
|
|
|
|
|
@@ -298,6 +413,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether Geo location Pull using File Transfer is
|
|
|
|
|
* supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isGeoPullFtSupported() {
|
|
|
|
|
@@ -307,6 +423,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
/**
|
|
|
|
|
* Sets Geo location Pull using File Transfer as supported or
|
|
|
|
|
* not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setGeoPullFtSupported(boolean geoPullFtSupported) {
|
|
|
|
|
@@ -315,6 +432,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether Geo Pull is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isGeoPullSupported() {
|
|
|
|
|
@@ -323,6 +441,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets Geo Pull as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setGeoPullSupported(boolean geoPullSupported) {
|
|
|
|
|
@@ -331,6 +450,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether Geo Push is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isGeoPushSupported() {
|
|
|
|
|
@@ -339,6 +459,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets Geo Push as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setGeoPushSupported(boolean geoPushSupported) {
|
|
|
|
|
@@ -347,6 +468,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether short messaging is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isSmSupported() {
|
|
|
|
|
@@ -355,6 +477,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets short messaging as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setSmSupported(boolean smSupported) {
|
|
|
|
|
@@ -363,22 +486,32 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether store/forward and group chat are supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isFullSnFGroupChatSupported() {
|
|
|
|
|
return mFullSnFGroupChatSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isRcsIpVoiceCallSupported() {
|
|
|
|
|
return mRcsIpVoiceCallSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isRcsIpVideoCallSupported() {
|
|
|
|
|
return mRcsIpVideoCallSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public boolean isRcsIpVideoOnlyCallSupported() {
|
|
|
|
|
return mRcsIpVideoOnlyCallSupported;
|
|
|
|
|
@@ -386,20 +519,32 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets store/forward and group chat supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setFullSnFGroupChatSupported(boolean fullSnFGroupChatSupported) {
|
|
|
|
|
this.mFullSnFGroupChatSupported = fullSnFGroupChatSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setRcsIpVoiceCallSupported(boolean rcsIpVoiceCallSupported) {
|
|
|
|
|
this.mRcsIpVoiceCallSupported = rcsIpVoiceCallSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setRcsIpVideoCallSupported(boolean rcsIpVideoCallSupported) {
|
|
|
|
|
this.mRcsIpVideoCallSupported = rcsIpVideoCallSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
|
|
|
|
public void setRcsIpVideoOnlyCallSupported(boolean rcsIpVideoOnlyCallSupported) {
|
|
|
|
|
this.mRcsIpVideoOnlyCallSupported = rcsIpVideoOnlyCallSupported;
|
|
|
|
|
@@ -407,6 +552,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether Geo Push via SMS is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isGeoSmsSupported() {
|
|
|
|
|
return mGeoSmsSupported;
|
|
|
|
|
@@ -414,6 +560,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets Geolocation Push via SMS as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setGeoSmsSupported(boolean geoSmsSupported) {
|
|
|
|
|
this.mGeoSmsSupported = geoSmsSupported;
|
|
|
|
|
@@ -421,6 +568,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether RCS call composer is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isCallComposerSupported() {
|
|
|
|
|
return mCallComposerSupported;
|
|
|
|
|
@@ -428,6 +576,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets call composer as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setCallComposerSupported(boolean callComposerSupported) {
|
|
|
|
|
this.mCallComposerSupported = callComposerSupported;
|
|
|
|
|
@@ -435,6 +584,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether post call is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isPostCallSupported(){
|
|
|
|
|
return mPostCallSupported;
|
|
|
|
|
@@ -442,13 +592,15 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets post call as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setPostCallSupported(boolean postCallSupported) {
|
|
|
|
|
this.mPostCallSupported = postCallSupported;
|
|
|
|
|
}
|
|
|
|
|
public void setPostCallSupported(boolean postCallSupported) {
|
|
|
|
|
this.mPostCallSupported = postCallSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether shared map is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isSharedMapSupported() {
|
|
|
|
|
return mSharedMapSupported;
|
|
|
|
|
@@ -456,6 +608,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets shared map as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setSharedMapSupported(boolean sharedMapSupported) {
|
|
|
|
|
this.mSharedMapSupported = sharedMapSupported;
|
|
|
|
|
@@ -463,6 +616,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether shared sketch is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isSharedSketchSupported() {
|
|
|
|
|
return mSharedSketchSupported;
|
|
|
|
|
@@ -470,6 +624,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets shared sketch as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setSharedSketchSupported(boolean sharedSketchSupported) {
|
|
|
|
|
this.mSharedSketchSupported = sharedSketchSupported;
|
|
|
|
|
@@ -477,6 +632,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether chatbot communication is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isChatbotSupported() {
|
|
|
|
|
return mChatbotSupported;
|
|
|
|
|
@@ -484,6 +640,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets chatbot communication as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setChatbotSupported(boolean chatbotSupported) {
|
|
|
|
|
this.mChatbotSupported = chatbotSupported;
|
|
|
|
|
@@ -491,6 +648,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether chatbot role is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isChatbotRoleSupported() {
|
|
|
|
|
return mChatbotRoleSupported;
|
|
|
|
|
@@ -498,6 +656,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets chatbot role as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setChatbotRoleSupported(boolean chatbotRoleSupported) {
|
|
|
|
|
this.mChatbotRoleSupported = chatbotRoleSupported;
|
|
|
|
|
@@ -505,6 +664,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether standalone chatbot communication is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isSmChatbotSupported() {
|
|
|
|
|
return mSmChatbotSupported;
|
|
|
|
|
@@ -512,6 +672,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets standalone chatbot communication as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setSmChatbotSupported(boolean smChatbotSupported) {
|
|
|
|
|
this.mSmChatbotSupported = smChatbotSupported;
|
|
|
|
|
@@ -519,6 +680,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks whether Mmtel based call composer is supported.
|
|
|
|
|
* @deprecated Use {@link #isCapabilitySupported(String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isMmtelCallComposerSupported() {
|
|
|
|
|
return mMmtelCallComposerSupported;
|
|
|
|
|
@@ -526,6 +688,7 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets Mmtel based call composer as supported or not supported.
|
|
|
|
|
* @deprecated Use {@link #addCapability(String, String)} instead.
|
|
|
|
|
*/
|
|
|
|
|
public void setMmtelCallComposerSupported(boolean mmtelCallComposerSupported) {
|
|
|
|
|
this.mMmtelCallComposerSupported = mmtelCallComposerSupported;
|
|
|
|
|
@@ -555,6 +718,84 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
this.mCapTimestamp = capTimestamp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds the feature tag string with supported versions to
|
|
|
|
|
* the mCapInfoMap.
|
|
|
|
|
* Map<String featureType, String versions>
|
|
|
|
|
* Versions format:
|
|
|
|
|
* "+g.gsma.rcs.botversion=\"#=1" -> Version 1 supported
|
|
|
|
|
* "+g.gsma.rcs.botversion=\"#=1,#=2\"" -> Versions 1 and 2 are supported
|
|
|
|
|
*
|
|
|
|
|
* Example #1: Add standard feature tag with one version support
|
|
|
|
|
* addCapability(CapInfo.STANDALONE_CHATBOT, "+g.gsma.rcs.botversion=\"#=1");
|
|
|
|
|
* The above example indicates standalone chatbot feature tag is supported
|
|
|
|
|
* in version 1.
|
|
|
|
|
*
|
|
|
|
|
* Example #2: Add standard feature tag with multiple version support
|
|
|
|
|
* addCapability(CapInfo.CHATBOT, "+g.gsma.rcs.botversion=\"#=1,#=2\"");
|
|
|
|
|
* The above example indicates session based chatbot feature tag is supported
|
|
|
|
|
* in versions 1 and 2.
|
|
|
|
|
*
|
|
|
|
|
* Example #3: Add standard feature tag with no version support
|
|
|
|
|
* addCapability(CapInfo.INSTANT_MSG, "");
|
|
|
|
|
* The above example indicates im feature tag does not have version support.
|
|
|
|
|
*
|
|
|
|
|
* Example #4: Add custom/extension feature tag with no version support
|
|
|
|
|
* addCapability("+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.custom_im\"",
|
|
|
|
|
* "");
|
|
|
|
|
* Call setNewFeatureTag(int presenceServiceHdl, String featureTag,
|
|
|
|
|
* in PresServiceInfo serviceInfo, int userData) API
|
|
|
|
|
* in IPresenceService.aidl before calling addCapability() API
|
|
|
|
|
*/
|
|
|
|
|
public void addCapability(String featureTagName, String versions) {
|
|
|
|
|
this.mCapInfoMap.put(featureTagName, versions);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns String of versions of the feature tag passed.
|
|
|
|
|
* Returns "" if versioning support is not present for the feature tag passed.
|
|
|
|
|
* Returns null if feature tag is not present.
|
|
|
|
|
*
|
|
|
|
|
* Example # 1:
|
|
|
|
|
* getCapabilityVersions(CapInfo.STANDALONE_CHATBOT);
|
|
|
|
|
* The above returns String in this format "+g.gsma.rcs.botversion=\"#=1,#=2\"",
|
|
|
|
|
* indicating more than one versions are supported for standalone chatbot feature tag
|
|
|
|
|
*
|
|
|
|
|
* Example # 2:
|
|
|
|
|
* getCapabilityVersions(CapInfo.INSTANT_MSG);
|
|
|
|
|
* The above returns empty String in this format "",
|
|
|
|
|
* indicating versions support is not present for im feature tag
|
|
|
|
|
*
|
|
|
|
|
* Example #3:
|
|
|
|
|
* getCapabilityVersions(
|
|
|
|
|
* "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.custom_im\");
|
|
|
|
|
* The above returns String "",
|
|
|
|
|
* indicating version supported is not present for the custom feature tag passed.
|
|
|
|
|
*/
|
|
|
|
|
public String getCapabilityVersions(String featureTagName) {
|
|
|
|
|
return mCapInfoMap.get(featureTagName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Removes the entry of the feature tag passed, from the Map. */
|
|
|
|
|
public void removeCapability(String featureTagName) {
|
|
|
|
|
this.mCapInfoMap.remove(featureTagName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Sets Map of feature tag string and string of supported versions. */
|
|
|
|
|
public void setCapInfoMap(Map<String, String> capInfoMap) {
|
|
|
|
|
this.mCapInfoMap = capInfoMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Gets Map of feature tag string and string of supported versions. */
|
|
|
|
|
public Map<String, String> getCapInfoMap() {
|
|
|
|
|
return mCapInfoMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Checks whether the featureTag is supported or not. */
|
|
|
|
|
public boolean isCapabilitySupported(String featureTag) {
|
|
|
|
|
return mCapInfoMap.containsKey(featureTag);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int describeContents() {
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
return 0;
|
|
|
|
|
@@ -594,6 +835,12 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
dest.writeInt(mRcsIpVideoOnlyCallSupported ? 1 : 0);
|
|
|
|
|
dest.writeStringArray(mExts);
|
|
|
|
|
dest.writeLong(mCapTimestamp);
|
|
|
|
|
|
|
|
|
|
Bundle capInfoBundle = new Bundle();
|
|
|
|
|
for (Map.Entry<String, String> entry : mCapInfoMap.entrySet()) {
|
|
|
|
|
capInfoBundle.putString(entry.getKey(), entry.getValue());
|
|
|
|
|
}
|
|
|
|
|
dest.writeBundle(capInfoBundle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final Parcelable.Creator<CapInfo> CREATOR = new Parcelable.Creator<CapInfo>() {
|
|
|
|
|
@@ -646,5 +893,10 @@ public class CapInfo implements Parcelable {
|
|
|
|
|
|
|
|
|
|
mExts = source.createStringArray();
|
|
|
|
|
mCapTimestamp = source.readLong();
|
|
|
|
|
|
|
|
|
|
Bundle capInfoBundle = source.readBundle();
|
|
|
|
|
for (String key: capInfoBundle.keySet()) {
|
|
|
|
|
mCapInfoMap.put(key, capInfoBundle.getString(key));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|