1.Dtmf change 2.Removed Unlock
authorAmith Kumar Mahale <amith.m@samsung.com>
Mon, 8 Apr 2013 06:26:40 +0000 (11:56 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Mon, 8 Apr 2013 06:26:40 +0000 (11:56 +0530)
Change-Id: I2813373a88f65c720b2a1c988cfd7edfc15a8a1c
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallIncomingCallForm.h
manifest.xml
src/CallActiveCallForm.cpp
src/CallApp.cpp
src/CallIncomingCallForm.cpp

index 3d1d0c2..752a5be 100644 (file)
@@ -132,6 +132,10 @@ private:
        void HideRejectMessageFooter(void);
        //Method used to show thumbnail image
        void ShowThumbnailImage(const Tizen::Graphics::Bitmap* pPhotoId);
+       //Hides the rejetec message panel
+       void HideRejectMessagePanel(void);
+       //Shows reject message panel
+       void ShowRejectMessagePanel(void);
 
 private:
        //contact number for incoming call
index b4b2951..73f6752 100644 (file)
             <Privilege>http://tizen.org/privilege/application.launch</Privilege>
             <Privilege>http://tizen.org/privilege/power</Privilege>
             <Privilege>http://tizen.org/privilege/setting</Privilege>
-            <Privilege>http://tizen.org/privilege/telephony</Privilege>
             <Privilege>http://tizen.org/privilege/messaging.sms</Privilege>
+            <Privilege>http://tizen.org/privilege/telephony</Privilege>
             <Privilege>http://tizen.org/privilege/vibrator</Privilege>
             <Privilege>http://tizen.org/privilege/contact.read</Privilege>
         </Privileges>
-        <UiApp LaunchingHistoryVisible="True" Main="True" MenuIconVisible="False" Name="Call">
+        <UiApp LaunchingHistoryVisible="False" Main="True" MenuIconVisible="False" Name="Call">
             <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
             <UiTheme SystemTheme="White"/>
             <DisplayNames>
index 3c8952c..41f9a46 100644 (file)
@@ -194,11 +194,7 @@ ActiveCallForm::OnInitializing(void)
 void
 ActiveCallForm::ShowDTMFKeypad(void)
 {
-       if(__pDTMFKeypad != null)
-       {
-               RemoveControl(*__pDTMFKeypad);
-               __pDTMFKeypad = null;
-       }
+
 
        if(__pDTMFKeypad == null)
        {
@@ -229,7 +225,6 @@ ActiveCallForm::ShowDTMFKeypad(void)
                }
        }
        EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
-       pTextBox->SetText(L"");
        __pDTMFKeypad->SetShowState(true);
        __pDTMFKeypad->Draw(true);
        __pDTMFKeypad->Show();
@@ -289,8 +284,9 @@ ActiveCallForm::HideDTMFKeypad(void)
 {
        if(__pDTMFKeypad != null)
        {
-               RemoveControl(*__pDTMFKeypad);
-               __pDTMFKeypad = null;
+               __pDTMFKeypad->SetShowState(false);
+               __pDTMFKeypad->Draw(true);
+               __pDTMFKeypad->Show();
        }
 }
 
@@ -567,7 +563,6 @@ ActiveCallForm::OnActionPerformed(const Control& source, int actionId)
                SetShowStateOnKeypad(false);
                }
                ShowDTMFKeypad();
-               SetTextToDTMFTextField(L"");
                __pCallButtonsPanel->SetKeypadButtonState(IDA_CLOSE_NUMKEYPAD);
        }
        break;
index 093c423..3545d3d 100644 (file)
@@ -532,6 +532,7 @@ CallApp::SetTopMostWindow(bool bTopMost)
        //Unlock the phone if its locked
 /*     if(LockManager::GetInstance()->IsLocked())
        {
+               AppLogDebug("Phone Locked");
                LockManager::GetInstance()->Unlock();
        }*/
 
index 85b0e36..4f88752 100644 (file)
@@ -83,6 +83,7 @@ const int H_LIST_TEXT_ITEM = 111;
 const int X_SEND_TEXT_ITEM = 484;
 const int Y_SEND_TEXT_ITEM = 20;
 const int W_SEND_TEXT_ITEM = 220;
+const int W_SEND_BUTTON_MARGIN = 14;
 const int H_SEND_TEXT_ITEM = 72;
 const int X_PHOTO_LBL = 166;
 const int Y_PHOTO_LBL = 232;
@@ -582,11 +583,7 @@ IncomingCallForm::OnTerminating(void)
 }
 
 void
-IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
-{
-       switch (actionId)
-       {
-       case IDA_SHOW_REJECT_CALL_MESSAGE_PANEL: // applicable in all form states
+IncomingCallForm::ShowRejectMessagePanel(void)
        {
                Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
                if (pKeysPanel)
@@ -619,17 +616,6 @@ IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
 
                        ShowRejectMessageFooter();
 
-               /*      pButtonReject = static_cast<Button*>(pKeysPanel->GetControl(IDC_BACK_BUTTON));
-                       pButtonReject->SetActionId(IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL);
-                       pButtonReject->AddActionEventListener(*this);
-                       pButtonReject->SetEnabled(true);
-                       pButtonReject->SetFocus();
-
-                       Button* pButtonCreate = static_cast<Button*>(pKeysPanel->GetControl(IDC_CREATE_BUTTON));
-                       pButtonCreate->SetActionId(IDA_CREATE_REJECT_CALL_MESSAGE);
-                       pButtonCreate->AddActionEventListener(*this);
-                       pButtonCreate->SetEnabled(true);
-                       pButtonCreate->SetFocus();*/
 
                        pKeysPanel->SetFocus();
                        pKeysPanel->Draw();
@@ -642,6 +628,33 @@ IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
                        pButtonRejectMessage->Draw();
                }
        }
+void
+IncomingCallForm::HideRejectMessagePanel(void)
+{
+       HideRejectPanel();
+       Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+       if (pButtonRejectMessage)
+       {
+               pButtonRejectMessage->SetShowState(true);
+               RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+               if (pRelativeLayout != null)
+               {
+                       pRelativeLayout->SetRelation(*pButtonRejectMessage,*this,RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+                       pRelativeLayout->Update();
+                       delete pRelativeLayout;
+               }
+       }
+}
+
+void
+IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
+{
+       switch (actionId)
+       {
+       case IDA_SHOW_REJECT_CALL_MESSAGE_PANEL: // applicable in all form states
+       {
+               ShowRejectMessagePanel();
+       }
        break;
 
        case IDA_CREATE_REJECT_CALL_MESSAGE:
@@ -658,20 +671,7 @@ IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL:
        {
-               HideRejectPanel();
-               SetFocus();
-               Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
-               if (pButtonRejectMessage)
-               {
-                       pButtonRejectMessage->SetShowState(true);
-                       RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
-                       if (pRelativeLayout != null)
-                       {
-                               pRelativeLayout->SetRelation(*pButtonRejectMessage,*this,RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
-                               pRelativeLayout->Update();
-                               delete pRelativeLayout;
-                       }
-               }
+               HideRejectMessagePanel();
 
        }
        break;
@@ -980,7 +980,7 @@ IncomingCallForm::CreateItem(int itemIndex, int itemWidth)
        {
                String sendText = AppUtility::GetResourceString(IDS_LIST_SEND_BUTTON);
                Button* pSendButton = new (std::nothrow) Button();
-               pSendButton->Construct(Rectangle(X_SEND_TEXT_ITEM, Y_SEND_TEXT_ITEM, W_SEND_TEXT_ITEM, H_SEND_TEXT_ITEM), sendText);
+               pSendButton->Construct(Rectangle(GetClientAreaBounds().width - W_SEND_BUTTON_MARGIN -W_SEND_TEXT_ITEM, Y_SEND_TEXT_ITEM, W_SEND_TEXT_ITEM, H_SEND_TEXT_ITEM), sendText);
                //set action id and listener
                int actionId = IDA_SEND_REJECT_MSG1;
                switch(itemIndex)
@@ -1576,15 +1576,32 @@ IncomingCallForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 void
 IncomingCallForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
 {
+       Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+       if(pKeysPanel->GetShowState() == true)
+       {
+               HideRejectMessagePanel();
+               ShowRejectMessagePanel();
+       }
+
        Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
-       if (pButtonRejectMessage)
+       if (pButtonRejectMessage != null)
        {
                SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
                                                                           IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, false);
                SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
                                                                           IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, true);
+               pButtonRejectMessage->Invalidate(true);
        }
 
+       Button* pButtonReject = static_cast<Button*>(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON));
+       if (pButtonReject != null)
+       {
+               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+                                                                          IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, false);
+               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+                                                                          IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, true);
+               pButtonReject->Invalidate(true);
+       }
 }
 
 void