Android: Mimics stack behavior and allows "null" entityHandler to be passed into...
authorTim Kourt <tim.a.kourt@intel.com>
Fri, 28 Aug 2015 18:54:12 +0000 (11:54 -0700)
committerJon A. Cruz <jonc@osg.samsung.com>
Fri, 28 Aug 2015 23:15:07 +0000 (23:15 +0000)
Change-Id: Ic7d11043e2b5a18e832e06ef1c71865d6a912530
Signed-off-by: Tim Kourt <tim.a.kourt@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2313
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java

index fc562be..63b482a 100644 (file)
@@ -491,6 +491,15 @@ public final class OcPlatform {
                 resProperty |= prop.getValue();
         }
 
+        if(null == entityHandler){
+            entityHandler = new EntityHandler() {
+                @Override
+                public EntityHandlerResult handleEntity(OcResourceRequest ocResourceRequest) {
+                    return EntityHandlerResult.OK;
+                }
+            };
+        }
+
         return OcPlatform.registerResource1(resourceUri,
                 resourceTypeName,
                 resourceInterface,