Updating error print in AGPS state machine
Minor update to print error message in AGPS
state machine only when valid.
CRs-Fixed: 2083361
Change-Id: Id8436d21a61b58ee8b5e83814225cbd34d0ea0d4
diff --git a/gnss/Agps.cpp b/gnss/Agps.cpp
index dcb9ad2..22582d4 100644
--- a/gnss/Agps.cpp
+++ b/gnss/Agps.cpp
@@ -209,7 +209,10 @@
switch (mState){
case AGPS_STATE_RELEASED:
- LOC_LOGE("Unexpected event RELEASED in state %d", mState);
+ /* Subscriber list should be empty if we are in released state */
+ if (!mSubscriberList.empty()) {
+ LOC_LOGE("Unexpected event RELEASED in RELEASED state");
+ }
break;
case AGPS_STATE_ACQUIRED: