Signed-off-by: rahul varna <rahul.varna@samsung.com>
FreeResources();
+ Tizen::System::BatteryLevel batteryLevel;
+ Tizen::System::Battery::GetCurrentLevel(batteryLevel);
+
+ if (batteryLevel == BATTERY_CRITICAL || batteryLevel == BATTERY_EMPTY || batteryLevel == BATTERY_LOW)
+ {
+ bool isCharging = false;
+ Tizen::System::RuntimeInfo::GetValue(String(L"IsCharging"), isCharging);
+ if (isCharging == false)
+ {
+ //Free the resource and go back to previous form
+ FreeResources();
+ Deactivate();
+
+ return E_SUCCESS;
+ }
+ }
+
if (__pProgress != null)
{
__pProgress->SetValue(0);
if (isCharging == false)
{
MessageBox msgBox;
- int reslut_a;
+ int outResult;
msgBox.Construct("Info", "Please Charge the Battery to use the recorder", MSGBOX_STYLE_OK, MESSAGE_BOX_TIMEOUT);
- msgBox.ShowAndWait(reslut_a);
+ msgBox.ShowAndWait(outResult);
__pProgress->SetValue(0);
__pProgress->Draw();
__pElapsedTimeLable->SetText(__startTime);