virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
virtual void OnChargingStateChanged(bool charging);
virtual void OnLowMemory (void);
+ bool GetAppControlSwitch(void);
private:
void OnRequestAppControlTest(void);
const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData)
{
AppLogDebug("ENTER");
+ result r = E_SUCCESS;
__operationId = operationId;
AppLogDebug("operationId : %ls", operationId.GetPointer());
if (pExtraData != null)
{
- result r = E_SUCCESS;
HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter);
r = pArguments->Construct();
}
else
{
+ AppLogDebug("No switch parameter specified");
if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CREATECONTENT) == 0)
{
+ HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter);
+
+ pArguments->Construct();
+ pArguments->Add(new (std::nothrow) String(ALLOW_SWITCH), new (std::nothrow) String(ALLOW_SWITCH_TRUE));
+ __pArguments = pArguments;
+
+ AppLogDebug("HashMap::Construct() result[%s]", GetErrorMessage(r));
+
OnRequestAppControlTest();
}
else
CameraApp::OnRequestAppControl(void)
{
AppLogDebug("ENTER");
- const String* pKeyValue = static_cast<const String*>(GetAppControlArguments()->GetValue(String(ALLOW_SWITCH)));
result r = E_SUCCESS;
- if (pKeyValue == null)
- {
- AppLogDebug("To launch AppControl, the pKeyValue should be input.");
- return E_FAILURE;
- }
- else
+ if (GetMimeType() == MIME_TYPE_IMAGE_JPG || GetMimeType() == MIME_TYPE_IMAGE_3GP)
{
- AppLogDebug("allow_switch:%ls", pKeyValue->GetPointer());
- if (GetMimeType() == MIME_TYPE_IMAGE_JPG || GetMimeType() == MIME_TYPE_IMAGE_3GP)
- {
- __appLaunchType = APP_LAUNCH_TYPE_REQUESET;
+ __appLaunchType = APP_LAUNCH_TYPE_REQUESET;
r = CameraPresentationModel::GetInstance()->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
AppLogDebug("SetValue Reg Fail[%s]", GetErrorMessage(r));
return E_SUCCESS;
}
}
-}
+
void
CameraApp::OnLowMemory (void)
{
AppLogDebug("Exit");
}
+bool
+CameraApp::GetAppControlSwitch(void)
+{
+ AppLogDebug("Enter");
+ const String* pKeyValue;
+ bool switchEnabled = false;
+
+ pKeyValue = static_cast<const String*>(GetAppControlArguments()->GetValue(String(ALLOW_SWITCH)));
+
+ if (pKeyValue != null)
+ {
+ if (pKeyValue->CompareTo(ALLOW_SWITCH_TRUE) == 0)
+ {
+ switchEnabled = true;
+ }
+ }
+
+ return switchEnabled;
+ AppLogDebug("Exit");
+}
result r = E_SUCCESS;
int overlayHelpEnable = 0;
String ovelayHelpStr = L"";
+ bool checkAppControlSwitch = false;
//AppResource* pAppResource = null;
TryCatch(__pHelpGoToGallery != null, r = E_FAILURE, "__pHelpGoToGallery is null");
__pHelpQuickSettingText->SetTextConfig(FONT_SIZE_SCREEN_OVERLAY_HELP, LABEL_TEXT_STYLE_NORMAL);
__pHelpQuickSettingText->SetShowState(true);
- __pHelpRecordVideo->SetShowState(true);
- //pAppResource->GetString(L"IDS_HELP_CAPTURE_IMAGE", ovelayHelpStr);
- ovelayHelpStr = L"Capture image";
- __pHelpRecordVideoText->SetText(ovelayHelpStr);
- __pHelpRecordVideoText->SetTextColor(COLOR_SCREEN_OVERLAY_HELP_TEXT);
- __pHelpRecordVideoText->SetTextConfig(FONT_SIZE_SCREEN_OVERLAY_HELP, LABEL_TEXT_STYLE_NORMAL);
- __pHelpRecordVideoText->SetShowState(true);
+
+ if (GetAppLaunchType() == APP_LAUNCH_TYPE_REQUESET)
+ {
+ checkAppControlSwitch = (static_cast<CameraApp*>(UiApp::GetInstance()))->GetAppControlSwitch();
+ }
+ else
+ {
+ checkAppControlSwitch = true;
+ }
+
+ if (checkAppControlSwitch)
+ {
+ __pHelpRecordVideo->SetShowState(true);
+ //pAppResource->GetString(L"IDS_HELP_CAPTURE_IMAGE", ovelayHelpStr);
+ ovelayHelpStr = L"Capture image";
+ __pHelpRecordVideoText->SetText(ovelayHelpStr);
+ __pHelpRecordVideoText->SetTextColor(COLOR_SCREEN_OVERLAY_HELP_TEXT);
+ __pHelpRecordVideoText->SetTextConfig(FONT_SIZE_SCREEN_OVERLAY_HELP, LABEL_TEXT_STYLE_NORMAL);
+ __pHelpRecordVideoText->SetShowState(true);
+ }
__pHelpShutter->SetShowState(true);
//pAppResource->GetString(L"IDS_HELP_SHUTTER", ovelayHelpStr);
CameraPresentationModel::GetValue(const Tizen::Base::String& entryName, int& value) const
{
AppLogDebug("ENTER");
+ AppLogDebug("entry name is %ls",entryName.GetPointer());
+ AppLogDebug("entry value is %d",value);
result r = E_SUCCESS;
int mode = 0;
String strSectionName = SECTION_CAMERA;