Merge "Request for a data item value is not handle by SSO"
This commit is contained in:
commit
148b0dd3b2
1 changed files with 8 additions and 9 deletions
|
@ -97,6 +97,7 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
|||
list<DataItemId>& l, IDataItemObserver* client, bool requestData) :
|
||||
mParent(parent), mClient(client),
|
||||
mDataItemSet(containerTransfer<list<DataItemId>, unordered_set<DataItemId>>(l)),
|
||||
diItemlist(l),
|
||||
mToRequestData(requestData) {}
|
||||
|
||||
void proc() const {
|
||||
|
@ -107,16 +108,13 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
|||
mParent->sendCachedDataItems(mDataItemSet, mClient);
|
||||
|
||||
// Send subscription set to framework
|
||||
if (nullptr != mParent->mContext.mSubscriptionObj && !dataItemsToSubscribe.empty()) {
|
||||
LOC_LOGD("Subscribe Request sent to framework for the following");
|
||||
mParent->logMe(dataItemsToSubscribe);
|
||||
|
||||
if (nullptr != mParent->mContext.mSubscriptionObj) {
|
||||
if (mToRequestData) {
|
||||
mParent->mContext.mSubscriptionObj->requestData(
|
||||
containerTransfer<unordered_set<DataItemId>, list<DataItemId>>(
|
||||
std::move(dataItemsToSubscribe)),
|
||||
mParent);
|
||||
} else {
|
||||
LOC_LOGD("Request Data sent to framework for the following");
|
||||
mParent->mContext.mSubscriptionObj->requestData(diItemlist, mParent);
|
||||
} else if (!dataItemsToSubscribe.empty()) {
|
||||
LOC_LOGD("Subscribe Request sent to framework for the following");
|
||||
mParent->logMe(dataItemsToSubscribe);
|
||||
mParent->mContext.mSubscriptionObj->subscribe(
|
||||
containerTransfer<unordered_set<DataItemId>, list<DataItemId>>(
|
||||
std::move(dataItemsToSubscribe)),
|
||||
|
@ -127,6 +125,7 @@ void SystemStatusOsObserver::subscribe(const list<DataItemId>& l, IDataItemObser
|
|||
mutable SystemStatusOsObserver* mParent;
|
||||
IDataItemObserver* mClient;
|
||||
const unordered_set<DataItemId> mDataItemSet;
|
||||
const list<DataItemId> diItemlist;
|
||||
bool mToRequestData;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue