From: rahul varna Date: Tue, 23 Apr 2013 05:02:13 +0000 (+0900) Subject: Review comments addressed in audiorecorder X-Git-Tag: 2.1b_release~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e40d8092e5a1001c91c7013100bd54cf61bcef17;p=samples%2Fnative%2FMediaApp.git Review comments addressed in audiorecorder Signed-off-by: rahul varna --- diff --git a/project/src/Recorder/AudioRecorderForm.cpp b/project/src/Recorder/AudioRecorderForm.cpp index ae89631..821f9a9 100644 --- a/project/src/Recorder/AudioRecorderForm.cpp +++ b/project/src/Recorder/AudioRecorderForm.cpp @@ -787,6 +787,23 @@ AudioRecorderForm::Activate(void* pActivateParam) 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); diff --git a/project/src/Recorder/VideoRecorderForm.cpp b/project/src/Recorder/VideoRecorderForm.cpp index a4f245a..cc367cf 100644 --- a/project/src/Recorder/VideoRecorderForm.cpp +++ b/project/src/Recorder/VideoRecorderForm.cpp @@ -1226,9 +1226,9 @@ VideoRecorderForm::Activate(void* pActivateParam) 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);