|
@@ -667,14 +667,20 @@ public class BridgeService extends IntentService {
|
|
for (OCFDevice.Resource resource : vod.getResources()) {
|
|
for (OCFDevice.Resource resource : vod.getResources()) {
|
|
try {
|
|
try {
|
|
// doGetProperties with Light Control Service
|
|
// doGetProperties with Light Control Service
|
|
|
|
+ String prev_props = bridgeServer.getVirtualOCFDeviceProperties(device_sn, resource.getResourceUri());
|
|
String properies = lightBinder.doGetResourceProperties(device_sn, resource.getResourceUri());
|
|
String properies = lightBinder.doGetResourceProperties(device_sn, resource.getResourceUri());
|
|
bridgeServer.addOrUpdateVirtualOCFDeviceProperties(device_sn, resource.getResourceUri(), properies);
|
|
bridgeServer.addOrUpdateVirtualOCFDeviceProperties(device_sn, resource.getResourceUri(), properies);
|
|
|
|
|
|
|
|
+ /*Log.d(TAG,"(1) prev_props : " +prev_props + ", cur_props : " +properies );
|
|
// TODO : need to check // notify to Observers for changed properties's value
|
|
// TODO : need to check // notify to Observers for changed properties's value
|
|
- OCResource ocResource = vod.getOCResource(resource.getResourceUri());
|
|
|
|
- if(ocResource != null) {
|
|
|
|
- OCMain.notifyObservers(ocResource);
|
|
|
|
- }
|
|
|
|
|
|
+ if(!bridgeServer.compareVirtualOCFDeviceProperties(device_sn, resource.getResourceUri(), properies)) {
|
|
|
|
+ Log.d(TAG,"(2) prev_props : " +prev_props + ", cur_props : " +properies );
|
|
|
|
+ //bridgeServer.addOrUpdateVirtualOCFDeviceProperties(device_sn, resource.getResourceUri(), properies);
|
|
|
|
+ OCResource ocResource = vod.getOCResource(resource.getResourceUri());
|
|
|
|
+ if (ocResource != null) {
|
|
|
|
+ OCMain.notifyObservers(ocResource);
|
|
|
|
+ }
|
|
|
|
+ }*/
|
|
|
|
|
|
} catch (RemoteException e) {
|
|
} catch (RemoteException e) {
|
|
Log.e(TAG, "Light Control Service Remote Error : ", e);
|
|
Log.e(TAG, "Light Control Service Remote Error : ", e);
|