Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ca11dd4 authored by Hyunho's avatar Hyunho
Browse files

Add the feature tags for the pager mode, larege message mode, deffered...

Add the feature tags for the pager mode, larege message mode, deffered messaging and large-pager mode.

And the presence tuple of the standalone is added.

Bug: b/262614903
Test: atest PublishServiceDescTrackerTest
Test: In the live network, if there is the feature tag related to the standalone in the registered feature tags, the service id of standalone is included in the PIDF
Change-Id: Ie35577303aab0f67bc261686d8e5e5ee3c624707
Merged-In: Ie35577303aab0f67bc261686d8e5e5ee3c624707
parent 69eb9297
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public class PublishServiceDescTracker {
     */
    private static final Map<ServiceDescription, Set<String>> DEFAULT_SERVICE_DESCRIPTION_MAP;
    static {
        ArrayMap<ServiceDescription, Set<String>> map = new ArrayMap<>(21);
        ArrayMap<ServiceDescription, Set<String>> map = new ArrayMap<>(23);
        map.put(ServiceDescription.SERVICE_DESCRIPTION_CHAT_IM,
                Collections.singleton(FeatureTags.FEATURE_TAG_CHAT_IM));
        map.put(ServiceDescription.SERVICE_DESCRIPTION_CHAT_SESSION,
@@ -111,6 +111,14 @@ public class PublishServiceDescTracker {
                        FeatureTags.FEATURE_TAG_CHATBOT_VERSION_V2_SUPPORTED)));
        map.put(ServiceDescription.SERVICE_DESCRIPTION_CHATBOT_ROLE,
                Collections.singleton(FeatureTags.FEATURE_TAG_CHATBOT_ROLE));
        map.put(ServiceDescription.SERVICE_DESCRIPTION_SLM, new ArraySet<>(
                Arrays.asList(FeatureTags.FEATURE_TAG_PAGER_MODE,
                        FeatureTags.FEATURE_TAG_LARGE_MODE,
                        FeatureTags.FEATURE_TAG_DEFERRED_MESSAGING,
                        FeatureTags.FEATURE_TAG_LARGE_PAGER_MODE)));
        map.put(ServiceDescription.SERVICE_DESCRIPTION_SLM_PAGER_LARGE, new ArraySet<>(
                Arrays.asList(FeatureTags.FEATURE_TAG_PAGER_MODE,
                        FeatureTags.FEATURE_TAG_LARGE_MODE)));
        DEFAULT_SERVICE_DESCRIPTION_MAP = Collections.unmodifiableMap(map);
    }

+14 −0
Original line number Diff line number Diff line
@@ -169,6 +169,20 @@ public class ServiceDescription {
                    null /*description*/
            );

    public static final ServiceDescription SERVICE_DESCRIPTION_SLM =
            new ServiceDescription(
                    RcsContactPresenceTuple.SERVICE_ID_SLM,
                    "2.0" /*version*/,
                    null /*description*/
            );

    public static final ServiceDescription SERVICE_DESCRIPTION_SLM_PAGER_LARGE =
            new ServiceDescription(
                    RcsContactPresenceTuple.SERVICE_ID_SLM,
                    "2.0" /*version*/,
                    "Standalone Messaging" /*description*/
            );

    /** Mandatory "service-id" element */
    public final @NonNull String serviceId;
    /** Mandatory "version" element */
+12 −0
Original line number Diff line number Diff line
@@ -35,6 +35,18 @@ public class FeatureTags {
                    + "service.ims.icsi.oma.cpm.largemsg,urn%3Aurn-7%3A3gpp-"
                    + "service.ims.icsi.oma.cpm.deferred\";+g.gsma.rcs.cpm.pager-large";

    public static final String FEATURE_TAG_PAGER_MODE =
            "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg\"";

    public static final String FEATURE_TAG_LARGE_MODE =
            "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.largemsg\"";

    public static final String FEATURE_TAG_DEFERRED_MESSAGING =
            "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.deferred\"";

    public static final String FEATURE_TAG_LARGE_PAGER_MODE =
            "+g.gsma.rcs.cpm.pager-large";

    public static final String FEATURE_TAG_CHAT_IM =
            "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcse.im\"";

+19 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ public class PublishServiceDescTrackerTest {
        t1.updateImsRegistration(imsReg);
        assertEquals(expectedSet, t1.copyRegistrationCapabilities());


        expectedSet = Collections.singleton(
                ServiceDescription.SERVICE_DESCRIPTION_CHATBOT_SESSION);
        imsReg = createImsRegistration(
@@ -139,6 +138,25 @@ public class PublishServiceDescTrackerTest {
                FeatureTags.FEATURE_TAG_VIDEO);
        t1.updateImsRegistration(imsReg);
        assertEquals(expectedSet, t1.copyRegistrationCapabilities());

        expectedSet = Collections.singleton(
                ServiceDescription.SERVICE_DESCRIPTION_SLM);
        imsReg = createImsRegistration(
                FeatureTags.FEATURE_TAG_PAGER_MODE,
                FeatureTags.FEATURE_TAG_LARGE_MODE,
                FeatureTags.FEATURE_TAG_DEFERRED_MESSAGING,
                FeatureTags.FEATURE_TAG_LARGE_PAGER_MODE);
        t1.updateImsRegistration(imsReg);
        assertEquals(expectedSet, t1.copyRegistrationCapabilities());


        expectedSet = Collections.singleton(
                ServiceDescription.SERVICE_DESCRIPTION_SLM_PAGER_LARGE);
        imsReg = createImsRegistration(
                FeatureTags.FEATURE_TAG_PAGER_MODE,
                FeatureTags.FEATURE_TAG_LARGE_MODE);
        t1.updateImsRegistration(imsReg);
        assertEquals(expectedSet, t1.copyRegistrationCapabilities());
    }

    @SmallTest