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

Commit 76557cc0 authored by Gnaneshwar Gatla's avatar Gnaneshwar Gatla Committed by android-build-merger
Browse files

Merge "uce: Updating UCE API to accept ICC-ID." am: d20bdb91

am: f0b1c481

Change-Id: Iebacfbd592a36da5736b4979c6a6c0e47fa0effc
parents b8b007cb f0b1c481
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@ public class StatusCode implements Parcelable {
    public static final int UCE_NO_CHANGE_IN_CAP = 13;
    /**  Service is unknown. */
    public static final int UCE_SERVICE_UNKNOWN = 14;
     /** Service cannot support Invalid Feature Tag   */
    public static final int UCE_INVALID_FEATURE_TAG = 15;
    /** Service is Available   */
    public static final int UCE_SERVICE_AVAILABLE = 16;


    private int mStatusCode = UCE_SUCCESS;
+74 −0
Original line number Diff line number Diff line
@@ -66,10 +66,30 @@ interface IUceService
     * service the client created.
     *
     * @return  optionsServiceHandle
     *
     * @hide
     *
     * @deprecated This is replaced with new API createOptionsServiceForSubscription()
     */
    int createOptionsService(IOptionsListener optionsListener,
                             inout UceLong optionsServiceListenerHdl);
    /**
     * Creates a options service for Capability Discovery.
     * @param optionsListener IOptionsListener object.
     * @param optionsServiceListenerHdl wrapper for client's listener handle to be stored.
     * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested
     *
     * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and
     * used to validate callbacks received in IPresenceListener are indeed from the
     * service the client created.
     *
     * @return  optionsServiceHandle
     *
     * @hide
     */
    int createOptionsServiceForSubscription(IOptionsListener optionsListener,
                             inout UceLong optionsServiceListenerHdl,
                             in String iccId);

    /**
     * Destroys a Options service.
@@ -89,14 +109,36 @@ interface IUceService
     * service the client created.
     *
     * @return  presenceServiceHdl
     *
     * @hide
     *
     * @deprecated This is replaced with new API createPresenceServiceForSubscription()
     */
    int createPresenceService(IPresenceListener presenceServiceListener,
                              inout UceLong presenceServiceListenerHdl);
    /**
     * Creates a presence service.
     * @param presenceServiceListener IPresenceListener object
     * @param presenceServiceListenerHdl wrapper for client's listener handle to be stored.
     * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested
     *
     * The service will fill UceLong.mUceLong with presenceListenerHandle allocated and
     * used to validate callbacks received in IPresenceListener are indeed from the
     * service the client created.
     *
     * @return  presenceServiceHdl
     *
     * @hide
     */
    int createPresenceServiceForSubscription(IPresenceListener presenceServiceListener,
                              inout UceLong presenceServiceListenerHdl,
                              in String iccId);

    /**
     * Destroys a presence service.
     *
     * @param presenceServiceHdl handle returned during createPresenceService()
     *
     * @hide
     */
    void destroyPresenceService(int presenceServiceHdl);
@@ -105,23 +147,55 @@ interface IUceService

    /**
     * Query the UCE Service for information to know whether the is registered.
     *
     * @return boolean, true if Registered to for network events else false.
     *
     * @hide
     */
    boolean getServiceStatus();

    /**
     * Query the UCE Service for presence Service.
     *
     * @return IPresenceService object.
     *
     * @hide
     *
     * @deprecated use API getPresenceServiceForSubscription()
     */
    IPresenceService getPresenceService();

    /**
     * Query the UCE Service for presence Service.
     *
     * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested
     *
     * @return IPresenceService object.
     *
     * @hide
     */
    IPresenceService getPresenceServiceForSubscription(in String iccId);

    /**
     * Query the UCE Service for options service object.
     *
     * @return IOptionsService object.
     *
     * @deprecated use API getOptionsServiceForSubscription()
     *
     * @hide
     */
    IOptionsService getOptionsService();

    /**
     * Query the UCE Service for options service object.
     *
     * @param iccId the ICC-ID derived from SubscriptionInfo for the Service requested
     *
     * @return IOptionsService object.
     *
     * @hide
     */
    IOptionsService getOptionsServiceForSubscription(in String iccId);

}
+50 −0
Original line number Diff line number Diff line
@@ -56,6 +56,14 @@ public abstract class UceServiceBase {
            return onCreateOptionsService(optionsListener, optionsServiceListenerHdl);
        }

        @Override
        public int createOptionsServiceForSubscription(IOptionsListener optionsListener,
                                      UceLong optionsServiceListenerHdl,
                                      String iccId) {
            return onCreateOptionsService(optionsListener, optionsServiceListenerHdl,
                                          iccId);
        }


        @Override
        public void destroyOptionsService(int optionsServiceHandle) {
@@ -69,6 +77,14 @@ public abstract class UceServiceBase {
            return onCreatePresService(presServiceListener, presServiceListenerHdl);
        }

        @Override
        public int createPresenceServiceForSubscription(IPresenceListener presServiceListener,
                                         UceLong presServiceListenerHdl,
                                         String iccId) {
            return onCreatePresService(presServiceListener, presServiceListenerHdl,
                                       iccId);
        }

        @Override
        public void destroyPresenceService(int presServiceHdl) {
            onDestroyPresService(presServiceHdl);
@@ -84,10 +100,20 @@ public abstract class UceServiceBase {
            return onGetPresenceService();
        }

        @Override
        public IPresenceService getPresenceServiceForSubscription(String iccId) {
            return onGetPresenceService(iccId);
        }

        @Override
        public IOptionsService getOptionsService() {
            return onGetOptionsService();
        }

        @Override
        public IOptionsService getOptionsServiceForSubscription(String iccId) {
            return onGetOptionsService(iccId);
        }
    }

    private UceServiceBinder mBinder;
@@ -120,6 +146,13 @@ public abstract class UceServiceBase {
        return 0;
    }

    protected int onCreateOptionsService(IOptionsListener optionsListener,
                                         UceLong optionsServiceListenerHdl,
                                         String iccId) {
        //no-op
        return 0;
    }

    protected void onDestroyOptionsService(int cdServiceHandle) {
        //no-op
        return;
@@ -131,6 +164,13 @@ public abstract class UceServiceBase {
        return 0;
    }

    protected int onCreatePresService(IPresenceListener presServiceListener,
                                      UceLong presServiceListenerHdl,
                                      String iccId) {
        //no-op
        return 0;
    }

    protected void onDestroyPresService(int presServiceHdl) {
        //no-op
        return;
@@ -146,8 +186,18 @@ public abstract class UceServiceBase {
        return null;
    }

    protected IPresenceService onGetPresenceService(String iccId) {
        //no-op
        return null;
    }

    protected IOptionsService onGetOptionsService () {
        //no-op
        return null;
    }

    protected IOptionsService onGetOptionsService (String iccId) {
        //no-op
        return null;
    }
}