--- a/locationmanager/locationtrail/src/clocationrecord.cpp Tue Apr 27 17:05:23 2010 +0300
+++ b/locationmanager/locationtrail/src/clocationrecord.cpp Tue May 11 16:36:55 2010 +0300
@@ -27,6 +27,7 @@
#include "locationtrailpskeys.h"
#include "mdeconstants.h"
#include <centralrepository.h>
+#include <hwrmpowerstatesdkpskeys.h>
using namespace MdeConstants;
@@ -1118,4 +1119,23 @@
return iRemapper->ItemsInQueue();
}
+EXPORT_C TBool CLocationRecord::IsLowBattery()
+ {
+ LOG("CLocationRecord::IsLowBattery()");
+ RProperty batteryProperty;
+ TInt batteryStatus;
+
+ TInt error = batteryProperty.Get(KPSUidHWRMPowerState, KHWRMBatteryStatus, batteryStatus);
+ LOG1("CLocationRecord::IsLowBattery() - battery status %d", batteryStatus );
+ if( error != KErrNone || batteryStatus == EBatteryStatusOk )
+ {
+ return EFalse;
+ }
+ else
+ {
+ return ETrue;
+ }
+
+ }
+
// End of file