Updating AgpsSubscriber constructor
Updating AgpsSubscriber constructor to ensure clone operation copies the entire state Change-Id: Id016994efd8cb1140af8d5ee05eace95922f246b CRs-Fixed: 2039863
This commit is contained in:
parent
25008877c3
commit
876db40641
2 changed files with 11 additions and 6 deletions
|
@ -654,7 +654,9 @@ void DSStateMachine::notifyEventToSubscriber(
|
|||
AgpsEvent event, AgpsSubscriber* subscriberToNotify,
|
||||
bool deleteSubscriberPostNotify) {
|
||||
|
||||
LOC_LOGD("DSStateMachine::notifyEventToSubscriber");
|
||||
LOC_LOGD("DSStateMachine::notifyEventToSubscriber(): "
|
||||
"SM %p, Event %d Subscriber %p Delete %d",
|
||||
this, event, subscriberToNotify, deleteSubscriberPostNotify);
|
||||
|
||||
switch (event){
|
||||
|
||||
|
@ -781,7 +783,7 @@ void AgpsManager::requestATL(int connHandle, AGpsExtType agpsType){
|
|||
}
|
||||
|
||||
/* Invoke AGPS SM processing */
|
||||
AgpsSubscriber subscriber(connHandle);
|
||||
AgpsSubscriber subscriber(connHandle, false, false);
|
||||
sm->setCurrentSubscriber(&subscriber);
|
||||
|
||||
/* If DS State Machine, wait for close complete */
|
||||
|
|
11
gnss/Agps.h
11
gnss/Agps.h
|
@ -173,16 +173,19 @@ public:
|
|||
bool mWaitForCloseComplete;
|
||||
bool mIsInactive;
|
||||
|
||||
inline AgpsSubscriber(int connHandle) :
|
||||
mConnHandle(connHandle), mWaitForCloseComplete(false),
|
||||
mIsInactive(false) {}
|
||||
inline AgpsSubscriber(
|
||||
int connHandle, bool waitForCloseComplete, bool isInactive) :
|
||||
mConnHandle(connHandle),
|
||||
mWaitForCloseComplete(waitForCloseComplete),
|
||||
mIsInactive(isInactive) {}
|
||||
inline virtual ~AgpsSubscriber() {}
|
||||
|
||||
inline virtual bool equals(const AgpsSubscriber *s) const
|
||||
{ return (mConnHandle == s->mConnHandle); }
|
||||
|
||||
inline virtual AgpsSubscriber* clone()
|
||||
{ return new AgpsSubscriber(mConnHandle); }
|
||||
{ return new AgpsSubscriber(
|
||||
mConnHandle, mWaitForCloseComplete, mIsInactive); }
|
||||
};
|
||||
|
||||
/* AGPS STATE MACHINE */
|
||||
|
|
Loading…
Reference in a new issue