Commit fbcd2b69 authored by Larry Sachs's avatar Larry Sachs Committed by Rick Bell

[IOT-2183] Retreive URI from OcRepresentation

The URI is no longer returned as an attribute and is now obtained from the
OcRep.
As a work-around for a previous bug, the uri was kept as an attribute.
The work-around is no longer necessary and was causing a CTT test to fail.

Change-Id: I78b30aad9eabd62ccef4de89820e86722f9ba038
Signed-off-by: Larry Sachs's avatarLarry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19509Reviewed-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarRick Bell <richard.s.bell@intel.com>
parent add6ebbe
......@@ -259,8 +259,8 @@ public class OnOffCycleIntentService extends IntentService implements
try {
// Read attribute values into local representation of resource
if (ocRepresentation.hasAttribute(Device.URI_KEY)) {
final String ocRepUri = ocRepresentation.getValue(Device.URI_KEY);
final String ocRepUri = ocRepresentation.getUri();
if (ocRepUri != null && !ocRepUri.isEmpty()) {
Log.i(TAG, "Resource URI: " + ocRepUri);
Resource resource = mResourceLookup.get(ocRepUri);
......@@ -427,8 +427,8 @@ public class OnOffCycleIntentService extends IntentService implements
try {
// Read attribute values into local representation of resource
if (ocRepresentation.hasAttribute(Device.URI_KEY)) {
final String ocRepUri = ocRepresentation.getValue(Device.URI_KEY);
final String ocRepUri = ocRepresentation.getUri();
if (ocRepUri != null && !ocRepUri.isEmpty()) {
Log.i(TAG, "Resource URI: " + ocRepUri);
Resource resource = mResourceLookup.get(ocRepUri);
......
......@@ -299,8 +299,8 @@ public class UpnpClientActivity extends Activity implements
try {
// Read attribute values into local representation of resource
if (ocRepresentation.hasAttribute(Device.URI_KEY)) {
final String ocRepUri = ocRepresentation.getValue(Device.URI_KEY);
final String ocRepUri = ocRepresentation.getUri();
if (ocRepUri != null && !ocRepUri.isEmpty()) {
Log.i(TAG, "Resource URI: " + ocRepUri);
Resource resource = mResourceLookup.get(ocRepUri);
......@@ -483,8 +483,8 @@ public class UpnpClientActivity extends Activity implements
try {
// Read attribute values into local representation of resource
if (ocRepresentation.hasAttribute(Device.URI_KEY)) {
final String ocRepUri = ocRepresentation.getValue(Device.URI_KEY);
final String ocRepUri = ocRepresentation.getUri();
if (ocRepUri != null && !ocRepUri.isEmpty()) {
Log.i(TAG, "Resource URI: " + ocRepUri);
Resource resource = mResourceLookup.get(ocRepUri);
......@@ -566,8 +566,8 @@ public class UpnpClientActivity extends Activity implements
try {
// Read attribute values into local representation of resource
if (ocRepresentation.hasAttribute(Device.URI_KEY)) {
final String ocRepUri = ocRepresentation.getValue(Device.URI_KEY);
final String ocRepUri = ocRepresentation.getUri();
if (ocRepUri != null && !ocRepUri.isEmpty()) {
Log.i(TAG, "Resource URI: " + ocRepUri);
Resource resource = mResourceLookup.get(ocRepUri);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment