From: Tim Kourt Date: Fri, 28 Aug 2015 18:54:12 +0000 (-0700) Subject: Android: Mimics stack behavior and allows "null" entityHandler to be passed into... X-Git-Tag: 1.2.0+RC1~1145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d45c02eb6a12fc41fba5dc74ba1e4de8c29ec8f;p=platform%2Fupstream%2Fiotivity.git Android: Mimics stack behavior and allows "null" entityHandler to be passed into the registerResource API Change-Id: Ic7d11043e2b5a18e832e06ef1c71865d6a912530 Signed-off-by: Tim Kourt Reviewed-on: https://gerrit.iotivity.org/gerrit/2313 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- diff --git a/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java b/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java index fc562be..63b482a 100644 --- a/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java +++ b/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java @@ -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,