summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYingjie Wang <yingjiewang@codeaurora.org>2019-04-11 08:33:46 +0800
committerYingjie Wang <yingjiewang@codeaurora.org>2019-06-05 08:10:23 +0800
commit2e7c04a82d85a3ddec7a7a024e00f65e1ee0b0c3 (patch)
tree281675ab3a2b61d3f3a9e7a3d8d214e66f5afd3c /core
parent052afd6e47e58c88f00ea353f601592d308cbc72 (diff)
downloadgps-2e7c04a82d85a3ddec7a7a024e00f65e1ee0b0c3.tar.gz
Update SystemStatus with battery info in HealthHAL
Change-Id: Ibc2157f1834eb65da48f9375e497628411a185c9 CRs-fixed: 2433570
Diffstat (limited to 'core')
-rw-r--r--core/SystemStatus.cpp13
-rw-r--r--core/SystemStatus.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/core/SystemStatus.cpp b/core/SystemStatus.cpp
index 18cb99c..9ca126f 100644
--- a/core/SystemStatus.cpp
+++ b/core/SystemStatus.cpp
@@ -1723,5 +1723,18 @@ bool SystemStatus::eventConnectionStatus(bool connected, int8_t type,
return true;
}
+/******************************************************************************
+@brief API to update power connect state
+
+@param[In] power connect status
+
+@return true when successfully done
+******************************************************************************/
+bool SystemStatus::updatePowerConnectState(bool charging)
+{
+ SystemStatusPowerConnectState s(charging);
+ mSysStatusObsvr.notify({&s});
+ return true;
+}
} // namespace loc_core
diff --git a/core/SystemStatus.h b/core/SystemStatus.h
index f3467e2..94f7f0b 100644
--- a/core/SystemStatus.h
+++ b/core/SystemStatus.h
@@ -858,6 +858,7 @@ public:
bool setDefaultGnssEngineStates(void);
bool eventConnectionStatus(bool connected, int8_t type,
bool roaming, NetworkHandle networkHandle);
+ bool updatePowerConnectState(bool charging);
};
} // namespace loc_core