Fixed a merge of OcConnectivityType and OcConnectivityFlags
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OcResource.java
index 2393549..92e38e6 100644 (file)
@@ -22,6 +22,7 @@
 
 package org.iotivity.base;
 
+import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
 
@@ -460,10 +461,10 @@ public class OcResource {
     /**
      * Method to get the connectivity type of this resource
      *
-     * @return OcConnectivityType connectivity type
+     * @return EnumSet<OcConnectivityType></OcConnectivityType> connectivity type set
      */
-    public OcConnectivityType getConnectivityType() {
-        return OcConnectivityType.get(
+    public EnumSet<OcConnectivityType> getConnectivityTypeSet() {
+        return OcConnectivityType.convertToEnumSet(
                 this.getConnectivityTypeN()
         );
     }
@@ -471,18 +472,6 @@ public class OcResource {
     private native int getConnectivityTypeN();
 
     /**
-     * Method to get the connectivity flags of this resource
-     *
-     * @return OcConnectivityFlags connectivity type
-     */
-    public OcConnectivityFlags getConnectivityFlags() {
-        OcConnectivityType connType = this.getConnectivityType();
-        int connTypeN = this.getConnectivityTypeN();
-        int flag = connTypeN - connType.getValue();
-        return OcConnectivityFlags.get(flag);
-    }
-
-    /**
      * Method to provide ability to check if this resource is observable or not
      *
      * @return true indicates resource is observable; false indicates resource is not observable