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

Commit 35a6054b authored by Hyunho's avatar Hyunho
Browse files

Set mPendingPublicCapabilities to the currently registered service description

If getDeviceCapabilities() is called when mechanism is PRESENCE, set mPendingPublicCapabilities to the currently registered service description.
Test: atest DeviceCapabilityInfoTest
Bug: b/220236505

Change-Id: Icaf0b7430879f295e9981821180d311c2e14a535
Merged-In: Icaf0b7430879f295e9981821180d311c2e14a535
parent 1035afff
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -520,7 +520,12 @@ public class DeviceCapabilityInfo {
            @CapabilityMechanism int mechanism, Context context) {
        switch (mechanism) {
            case RcsContactUceCapability.CAPABILITY_MECHANISM_PRESENCE:
                return getPresenceCapabilities(context);
                RcsContactUceCapability rcsContactUceCapability = getPresenceCapabilities(context);
                if (rcsContactUceCapability != null) {
                    mPendingPublishCapabilities =
                            mServiceCapRegTracker.copyRegistrationCapabilities();
                }
                return rcsContactUceCapability;
            case RcsContactUceCapability.CAPABILITY_MECHANISM_OPTIONS:
                return getOptionsCapabilities(context);
            default: