X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Feasy-setup%2Fmediator%2Frichsdk%2Fandroid%2FEasySetupCore%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fservice%2Feasysetup%2Fmediator%2FEasySetup.java;h=cece024afda7e37aa5a8e9f2e29b859238bb1bc9;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=56a7d804a74a0ec9472f83c38f2f5188243fcfdc;hpb=4ed8d73b591a245d828e97f79a47a2e572475bd3;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java b/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java index 56a7d80..cece024 100755 --- a/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java +++ b/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EasySetup.java @@ -40,7 +40,6 @@ import java.util.List; public class EasySetup { private static final String TAG = EasySetup.class.getName(); - public static final String PROV_RESOURCE_TYPE = "ocf.wk.prov"; private static EasySetup sInstance; private static Context mContext; @@ -88,21 +87,19 @@ public class EasySetup { * discovered in a network. The OcResource object can be obtained by calling * OcPlatform.findResource() API. What resource you have to discover with * the OcPlatform.findResource() API is a "provisioning" resource with a certain - * resource type, i.e. ocf.wk.prov + * resource type, i.e. oic.r.easysetup * * @return Pointer to RemoteEnrollee instance */ public synchronized RemoteEnrollee createRemoteEnrollee(OcResource enrolleeResource) { - // native call - if(!enrolleeResource.getResourceTypes().contains(PROV_RESOURCE_TYPE) - || !enrolleeResource.getResourceInterfaces().contains(OcPlatform.BATCH_INTERFACE)) + mRemoteEnrollee = nativeCreateRemoteEnrollee(enrolleeResource); + + if(mRemoteEnrollee != null) { - Log.e(TAG, "Validation check for OcResource is failed."); - return null; + mRemoteEnrolleeList.add(mRemoteEnrollee); + return mRemoteEnrollee; } - mRemoteEnrollee = nativeCreateRemoteEnrollee(enrolleeResource); - mRemoteEnrolleeList.add(mRemoteEnrollee); - return mRemoteEnrollee; + return null; } }