--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+# Target name and PKGID
+## TODO : set application name and ID
+SET(this_target Phone)
+SET(PKGID zktdpemtmw)
+
+# include directory
+INCLUDE_DIRECTORIES(
+ /usr/include/glib-2.0
+ /usr/lib/glib-2.0/include
+ /usr/include/osp
+ /usr/include/vconf
+ /usr/include/media
+ /usr/include/telephony-client
+ /usr/include/contacts-svc
+ /usr/include/msg-service
+ inc
+ )
+
+# Source files
+FILE(GLOB ${this_target}_SOURCE_FILES
+ src/*.cpp
+)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
+
+
+# Create executable
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
+ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
+
+# Set link libraries and link options
+## TODO : add more link libraries and options
+TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp osp-appfw osp-uifw osp-social osp-messaging osp-media osp-image osp-image-core osp-telephony msg_mapi)
+TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib capi-media-sound-manager SLP-tapi vconf contacts-service2)
+TARGET_LINK_LIBRARIES(${this_target} -Xlinker --allow-shlib-undefined -pthread -pie)
+
+# Copy info, data, res, and icons directories
+INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKGID}/bin)
+
+# Copy resource
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKGID}/info)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKGID})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKGID})
--- /dev/null
+Flora License
+
+Version 1.1, April, 2013
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works
+ a copy of this License; and
+ 2. You must cause any modified files to carry prominent notices stating
+ that You changed the files; and
+ 3. You must retain, in the Source form of any Derivative Works that
+ You distribute, all copyright, patent, trademark, and attribution
+ notices from the Source form of the Work, excluding those notices
+ that do not pertain to any part of the Derivative Works; and
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
+ then any Derivative Works that You distribute must include a readable
+ copy of the attribution notices contained within such NOTICE file,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works, in at least one of the following places:
+ within a NOTICE text file distributed as part of the Derivative Works;
+ within the Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the Derivative Works,
+ if and wherever such third-party notices normally appear.
+ The contents of the NOTICE file are for informational purposes only
+ and do not modify the License.
+
+You may add Your own attribution notices within Derivative Works
+that You distribute, alongside or as an addendum to the NOTICE text
+from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional or
+different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works
+as a whole, provided Your use, reproduction, and distribution of
+the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Flora License, Version 1.1 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://floralicense.org/license/
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
--- /dev/null
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.1.
+Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions.
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnAppUtility.h
+ * @brief This is the header file for the %AppUtility class.
+ *
+ * This header file contains the declarations for %AppUtility class.
+ */
+#ifndef _PHN_APP_UTILITY_H_
+#define _PHN_APP_UTILITY_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FMedia.h>
+
+enum KeypadTextPosition
+{
+ POSITION_LEFT,
+ POSITION_RIGHT,
+ POSITION_CENTER,
+ POSITION_TOP_LEFT,
+ POSITION_TOP_CENTER,
+ POSITION_BOTTOM_LEFT,
+ POSITION_BOTTOM_CENTER,
+ POSITION_SUGGESTION_NAME,
+ POSITION_SUGGESTION_NUMBER
+};
+
+enum TableViewItemPos
+{
+ TABLEVIEWITEMPOS_SINGLE_ITEM,
+ TABLEVIEWITEMPOS_TOP,
+ TABLEVIEWITEMPOS_CENTER,
+ TABLEVIEWITEMPOS_BOTTOM,
+};
+
+enum TableViewItemType
+{
+ TABLEVIEWITEMTYPE_SINGLE_TXT,
+ TABLEVIEWITEMTYPE_MAIN_TXT,
+ TABLEVIEWITEMTYPE_SUB_TXT,
+};
+
+/**
+ * @class AppUtility
+ * @brief This class provides common functionalities across application through static member functions.
+ * Its instance cannot needed.
+ *
+ */
+class AppUtility
+{
+private:
+ AppUtility(void);
+ AppUtility(const AppUtility& obj);
+ virtual ~AppUtility(void);
+
+public:
+ /**
+ * Fetches the String from resources based on
+ * resource id provided by "stringId".
+ */
+ static Tizen::Base::String GetResourceString(const Tizen::Base::String& stringId);
+
+ /**
+ * Fetches the Bitmap from resources and
+ * scales it to specified width and height, if provided.
+ */
+ static Tizen::Graphics::Bitmap* GetBitmapFromResourcesN(const Tizen::Base::String& imagePath, int imgWidth = 0, int imgHeight = 0);
+
+ //Function used to set backgorund bitmap to table item based on its position in GroupedTableView.
+ static void SetBackgroundBitmapToTableItem(Tizen::Ui::Controls::TableViewItem* pTableItem, TableViewItemPos position);
+ //Function is used to set and change expand icon to expandable item based on its state.
+ static void SetExpandIconToTableItem(Tizen::Ui::Controls::TableViewItem* pTableItem, bool isExpanded);
+ //Function to get Font size for settings view
+ static int GetSettingsItemFontSize(void);
+ //Function to get the Item Size based on the Font size that is set
+ static int GetSettingsItemRectSize(void);
+ //SubText Rect Size
+ static int GetSettingsSubItemSize(void);
+ //MainText Rect Size
+ static int GetSettingsMainItemSize(void);
+ //function to get Global font size
+ static void GetGlobalFontAndItemHeight(float *fontSize, float *itemHeight);
+ //funcstion to convert string to pointer character array
+ static char* ConvertStringToPointerCharArrayN(const Tizen::Base::String& strToConvert);
+};
+
+#endif // _PHN_APP_UTILITY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallInfo.h
+ * @brief This is the header file for the %CallInfo class.
+ *
+ * This header file contains the declarations for %CallInfo class.
+ */
+#ifndef _PHN_CALL_INFO_H_
+#define _PHN_CALL_INFO_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+#include "PhnTypes.h"
+
+/**
+ * @class CallInfo
+ * @brief This class holds information about currently active Single party,
+ * mutli-party or conference calls.
+ *
+ */
+class CallInfo
+ : public Tizen::Base::Object
+{
+public:
+ enum CallType
+ {
+ VOICE_CALL,
+ VIDEO_CALL, // Currently not supported
+ };
+
+public:
+ // Default Constructor.
+ CallInfo(void);
+ virtual ~CallInfo(void);
+
+ //returns if a call is conference call or not
+ bool IsConferenceCall(void);
+ //Sets the conferenceflag for a call
+ void SetConference(bool isConferenceCall);
+ //returns if a call is emergency call or not
+ bool IsEmergency(void);
+ //Sets if a call is emergency call
+ void SetEmergency(bool isEmergency);
+ //get the call Handle
+ Tizen::Base::Long* GetCallHandle(void);
+ //Set the call handle
+ void SetCallHandle(unsigned int handle);
+ //Get for Contact Number for the call
+ Tizen::Base::String& GetContactNumber(void);
+ //Set the contact number for the call
+ void SetContactNumber(Tizen::Base::String& contactNumber);
+ //Sets the contact info for the call
+ void SetContactInfo(const Tizen::Social::Contact& contact);
+ //returns contact info if present in contacts db
+ const Tizen::Social::Contact* GetContactInfo(void);
+ //returns if a call is held call or not
+ bool IsOnHold(void);
+ //Sets the held call for the call
+ void SetOnHold(bool onHold);
+ //get the connected time for the call
+ long long GetCallConnectTime(void);
+ //Sets the connected time when call started
+ void SetCallConnectTime(long long connectTime);
+ //get the notified / dialed time when call started
+ long long GetCallNotificationTime(void);
+ //Sets the notified / dialed time when call started
+ void SetCallNotificationTime(long long callNotificationTime);
+ //gets the end call cause
+ Tizen::Base::String& GetEndCallCause(void);
+ //Sets the end call cause
+ void SetEndCallCause(Tizen::Base::String& pEndCause);
+ //gets the caller list for a conference call
+ Tizen::Base::Collection::IListT<CallInfo>* GetCallerList(void);
+ //Adds a call to conference call list
+ result AddCallToCallerList(CallInfo& callInfo);
+ //removes a call from the conference call list
+ result RemoveCallFromCallerList(int index);
+ //returns the number of calls in conference
+ int GetCallerListCount(void);
+ //sets the type of the call for the logs application
+ void SetCalllogType(CallLogType callLogType);
+ //returns the type of the call log
+ CallLogType GetCalllogType(void);
+ /**
+ * This is the equality operator for this CallInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ bool operator ==(const CallInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this CallInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ bool operator !=(const CallInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ CallInfo& operator =(const CallInfo& rhs);
+
+ // this funtion fetches the contact person's name.
+ Tizen::Base::String* FetchCallerNameN(void);
+ // this funtion fetches the contact person's photo id, if present.
+ Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
+
+private:
+ bool __isConfCall;
+ CallType __callType;
+
+ ///Calllog type information like outgoing, incoming, missed call
+ CallLogType __calllogType;
+
+ //To uniquely identify both Single / Conf. Call.
+ Tizen::Base::Long* __pCallHandle;
+
+ bool __isEmergency;
+
+ //applicable only for Single Call
+ Tizen::Base::String __contactNumber;
+
+ //call is held
+ bool __isOnHold;
+
+ //system time when call connected
+ long long __callConnectTime;
+
+ //system time when the call was notified / dialed
+ long long __callNotificationTime;
+
+ //end call cause
+ Tizen::Base::String* __pEndCallCause;
+
+ //callHandles for individual callers in conf. calls
+ Tizen::Base::Collection::ArrayListT<CallInfo>* __pParticipantCallHandles;
+
+ //used to store previously fetched contact.
+ Tizen::Social::Contact* __pContact;
+};
+
+#endif // _PHN_CALL_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallLogPresentationModel.h
+ * @brief This is the header file for the %CalLogPresentationModel class.
+ *
+ * This header file contains the declarations for %CalLogPresentationModel class.
+ */
+
+#ifndef PHNLOGPRESENTATIONMODEL_H_
+#define PHNLOGPRESENTATIONMODEL_H_
+
+#include <FApp.h>
+#include <FTelephony.h>
+#include "PhnCalllogManager.h"
+#include "PhnICalllogChangeListener.h"
+#include "PhnTypes.h"
+
+class CallLogManager;
+
+class CalLogPresentationModel: public Tizen::App::IAppControlResponseListener
+{
+public:
+ //create a singleton instance
+ static CalLogPresentationModel* GetInstance(void);
+
+ void AddCalllogChangeListener(ICalllogChangeListener& listner);
+ void DeleteCalllogByDbId(int dbId);
+ void DeleteItemAtGroupIndex(int groupIndex, int itemIndex);\r
+ void RemoveCalllogChangeListner(ICalllogChangeListener& listner);
+ void ResetAndNotifyCalllogData(void);
+ int GetAllCallLogCount(void);\r
+ int GetCallLogsViewedCount(void);\r
+ Tizen::Base::Collection::ArrayListT<CallLogDetails>* GetCallogListByNumberFromDatabaseN(char* pNumber);
+ int GetCalllogCountByNumber(void);
+ void GetCalllogContactName(Tizen::Base::String number, Tizen::Base::String& name);
+ Tizen::Base::Collection::IListT<CallLogDetails>* GetCalllogListByNumValues(void);
+ //result GetCallLogItemAtIndex(int index, CallLogDetails* calllogInfo);\r
+ //Used to make an outgoing call
+ ErrorCodes DialCall(const Tizen::Base::String& contactNumber);
+ result LaunchAddContactsAppControl(Tizen::Base::String& contactNumber);
+ //Called when the application control is completed.
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+
+ //Set the seen status
+ void SetMissedCallSeenStatus(CallLogDetails* pDetails);
+ void UpdateCallLogList(void);
+ int GetUnknownLogCount(int dbId);
+ Tizen::Base::Collection::ArrayList* GetCallLogGroups(void);
+
+ //API to check if the database is updated
+ bool IsDataUpdated(void);\r
+\r
+ static void setCallLogViewbyID(CallLogType id);\r
+ static int getCallLogViewbyID();\r
+private:
+ CalLogPresentationModel();
+ virtual ~CalLogPresentationModel();
+
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+ //used to make an outgoing call request using call appcontrol
+ result LaunchCallAppControl(const Tizen::Base::String& contactNumber);
+ // Get the sim info
+ result GetSimInfo(void);
+ bool IsSimAvailable(void);
+
+private:
+ static CalLogPresentationModel* __pInstance;
+ CallLogManager* __pCallMgr;
+ //used to check if call AppControl is already running
+ bool __isCallAppControlRunning;
+
+};
+
+#endif /* PHNLOGPRESENTATIONMODEL_H_ */
--- /dev/null
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/*
+ * PhnCallLogMoreOptionPopup.h
+ *
+ * Created on: Mar 13, 2013
+ * Author: sekhar.b
+ */
+
+#ifndef PHNCALLLOGVIEWBYPOPUP_H_
+#define PHNCALLLOGVIEWBYPOPUP_H_
+
+#include <FApp.h>
+#include <FUi.h>
+#include "PhnICallLogViewByPopupListener.h"
+#include "PhnTabLogsItemProvider.h"
+
+class CallLogViewByPopup
+ : public Tizen::Ui::Controls::Popup
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+{
+public:
+ CallLogViewByPopup(ICallLogViewByPopupListener& listener);
+ virtual ~CallLogViewByPopup();
+
+ // IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){};
+ //IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+ void UpdateViewByPopupList();
+
+ result ConstructViewbyPopup();
+ void AddOptionsToList();
+ result ConstructBlockPopup(Tizen::Base::String& phoneNumber, bool isCallRejected, bool isMsgBeRejected);
+ bool GetCallBlock();
+ bool GetMessageBlock();
+ ///IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; }
+
+enum LogViewTypeID
+{
+ IDA_ALL_LOGS,
+ IDA_MISSED_CALLS,
+ IDA_DIALED_CALLS,
+ IDA_RECEIVED_CALLS,
+ IDA_REJECTED_CALLS,
+ IDA_CANCEL,
+ IDA_BLOCK_CALL,
+ IDA_BLOCK_MESSAGE,
+ IDA_BLOCK_OK,
+ IDA_BLOCK_CANCEL,
+};
+
+private:
+ //CustomDataProvider* __pDataProvider;
+ ICallLogViewByPopupListener& __popupListener;
+ Tizen::Ui::Controls::Label* __pBlockInfo;
+ Tizen::Ui::Controls::CheckButton* __pButtonAllLogs;
+ Tizen::Ui::Controls::CheckButton* __pButtonMissedCalls;
+ Tizen::Ui::Controls::CheckButton* __pButtonDialedCalls;
+ Tizen::Ui::Controls::CheckButton* __pButtonReceivedCalls;
+ Tizen::Ui::Controls::CheckButton* __pButtonRejectedCalls;
+ Tizen::Ui::Controls::CheckButton* __pButtonBlockCall;
+ Tizen::Ui::Controls::CheckButton* __pButtonBlockMessage;
+ Tizen::Ui::Controls::Button* __pButtonCancel;
+ Tizen::Ui::Controls::Button* __pButtonBlockOk;
+ Tizen::Ui::Controls::Button* __pButtonBlockCancel;
+ ListView* __pListView;
+
+ bool __isBlockCallSelected;
+ bool __isBlockMessageSelected;
+ Tizen::Base::Collection::ArrayList* __pOptionsList;
+ float __fontSize;
+ float __itemHeight;
+ static int __selectedViewByIndex;
+};
+
+#endif /* PHNCALLLOGMOREOPTIONPOPUP_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallRejectInfo.h
+ * @brief This is the header file for the %CallRejectInfo class.
+ *
+ * This header file contains the declarations for %CallRejectInfo class.
+ */
+#ifndef _PHN_CALL_REJECT_INFO_H_
+#define _PHN_CALL_REJECT_INFO_H_
+
+#include <FBase.h>
+#include "PhnTypes.h"
+
+/**
+ * @class CallRejectInfo
+ * @brief This class holds information about currently active Single party calls.
+ *
+ */
+class CallRejectInfo
+ : public Tizen::Base::Object
+{
+
+public:
+ // Default Constructor
+ CallRejectInfo(void);
+ virtual ~CallRejectInfo(void);
+ /**
+ * This is the equality operator for this CallRejectInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ bool operator ==(const CallRejectInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this CallRejectInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ bool operator !=(const CallRejectInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ CallRejectInfo& operator =(const CallRejectInfo& rhs);
+
+public:
+ int rowId;
+ Tizen::Base::String phoneNumber;
+ CallRejectMatchCondition rejectCondition;
+ bool isActivated;
+};
+
+#endif // _PHN_CALL_REJECT_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallSettingDataService.h
+ * @brief This is the header file for the %CallSettingDataService class.
+ *
+ * This header file contains the declarations for %CallSettingDataService class.
+ */
+#ifndef _PHN_CALL_SETTING_DATA_SERVICE_H_
+#define _PHN_CALL_SETTING_DATA_SERVICE_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FIo.h>
+#include "PhnCallRejectInfo.h"
+#include "PhnSpeedDialInfo.h"
+
+/**
+ * @class CallSettingDataService
+ * @brief This class providing database service APIS to CallRejectInfo Application forms
+ *
+ */
+class CallSettingDataService
+{
+public:
+ /**
+ * Creates an instance of its own.
+ * creates CallSettingDataService(singleton) if it does not exist else returns the existing form
+ */
+ static CallSettingDataService* CreateInstance(void);
+
+ virtual ~CallSettingDataService(void);
+
+ ///Opens the Database.
+ /**
+ * Only one Database is maintained. Its name is hardcoded.
+ * It is assumed that OpenDB is called once while starting the application and CloseDB is called once while closing application.
+ */
+ result OpenDatabase(void);
+
+ ///Closes the Database
+ result CloseDatabase(void);
+
+ ///Creates a database table to store CallRejectInfo information
+ result CreateCallRejectTableDatabase(void);
+ ///Creates a database table to store SpeedDial information
+ result CreateSpeedDialTableDatabase(void);
+ ///Adds a CallRejectInfo to the database
+ result AddCallRejectInfoToDatabase(CallRejectInfo* pNewItem);
+
+ ///Deletes a CallRejectInfo from Database
+ /**
+ * @param an array of indexs of the CallRejectInfos to be deleted
+ * @param number of CallRejectInfo to be deleted
+ */
+ result DeleteCallRejectInfoListFromDatabase(Tizen::Base::Collection::ArrayList* pIndexArray);
+
+ /// Deletes a CallRejectInfo from Database
+ /**
+ * @param index of the CallRejectInfo to be deleted
+ */
+ result DeleteCallRejectInfoFromDatabase(int index);
+
+ ///Updates the CallRejectInfo details(contents, modification time etc) in Database
+ /**
+ * @param index of the CallRejectInfo to be updated
+ * @param a reference to CallRejectInfoInfo structure having the updated info
+ */
+ result UpdateCallRejectInfoDatabase(int aIndex, CallRejectInfo* pCallRejectInfoItem);
+
+ ///Gets one CallRejectInfo from the database
+ /**
+ * @param index of the CallRejectInfo to be fetched
+ * @param a reference to CallRejectInfoInfo structure into which the CallRejectInfo data is to be stored
+ */
+ result GetCallRejectInfoFromDatabase(int aIndex, CallRejectInfo& dbItem);
+
+ /// Gets all the CallRejectInfo from database into the linked list
+ /**
+ * @param a linked list reference to store the result
+ */
+ result GetAllCallRejectInfoFromDatabaseN(Tizen::Base::Collection::ArrayListT<CallRejectInfo>& callRejectInfoList);
+
+ ///Finds the number of entries in the database
+ /**
+ * @param an int reference to store the result
+ */
+ result GetCallRejectCount(int& count);
+
+ ///Searches for a keyword in the CallRejectInfo Contents from Database
+ /**
+ * @param search keyword
+ * @param Linked list to store the result of the search
+ */
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+
+ ///Adds a SpeedDialInfo to the database
+ result AddSpeedDialInfoToDatabase(SpeedDialInfo* pNewItem);
+
+ /// Deletes a SpeedDialInfo from Database
+ /**
+ * @param index of the SpeedDialInfo to be deleted
+ */
+ result DeleteSpeedDialInfoFromDatabase(int aIndex);
+ ///Updates the SpeedDialInfo details(contents, modification time etc) in Database
+ /**
+ * @param index of the SpeedDialInfo to be updated
+ * @param a reference to SpeedDialInfo structure having the updated info
+ */
+ result UpdateSpeedDialInfoDatabase(int aIndex, SpeedDialInfo* pSpeedDialInfoItem);
+
+ /// Gets all the SpeedDialInfo from database into the linked list
+ /**
+ * @param a linked list reference to store the result
+ */
+ Tizen::Base::Collection::IMapT<int,SpeedDialInfo>* GetAllSpeedDialInfoMapFromDatabaseN(void);
+
+ //Gets the SpeedDialContact mapped against "aIndex", if any. Else returns null.
+ Tizen::Base::String* GetSpeedDialContactN(int aIndex);
+
+private:
+ /**
+ * Constructor
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService(void);
+
+ /**
+ * Copy constructor
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService(const CallSettingDataService& dataService);
+
+ /**
+ * Operator =
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService& operator =(const CallSettingDataService& dataService);
+
+ //checks if the condition is applicable for the passed phoneNumber
+ bool CheckRejectCondition(Tizen::Base::String& phoneNumber, CallRejectInfo& callRejectInfo);
+
+ ///singleton CallSettingDataService object
+ static CallSettingDataService* __pCallSettingDataService;
+
+ void SyncWithCurrentAddressbookStatus(Tizen::Base::Collection::HashMapT<int,SpeedDialInfo>* pSpeedDialInfoList);
+
+ /// Database object
+ /**
+ * Its made static as we need only one instance of it across different CallSettingDataService object calls.
+ * Its created while calling OpenDB and distructed while calling CloseDB.
+ */
+ static Tizen::Io::Database* __pDatabase;
+
+ ///name of the database
+ const Tizen::Base::String __strDbName;
+
+ /// an Enumerator used to iterate through the results of a database query.
+ Tizen::Io::DbEnumerator* __pEnum;
+
+ /// Used to create and execute database statements(queries)
+ Tizen::Io::DbStatement* __pStmt;
+};
+
+#endif /* _PHN_CALL_SETTING_DATA_SERVICE_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCalllogManager.h
+ * @brief This is the header file for the %CallLogManager class.
+ *
+ * This header file contains the declarations for %CallLogManager, %CallLogDetails, %LogListComparer class.
+ */
+
+#ifndef _PHN_CALL_LOG_MANAGER_H_
+#define _PHN_CALL_LOG_MANAGER_H_
+#include "contacts.h"
+#include <FBase.h>
+#include "PhnCallInfo.h"
+#include "PhnTypes.h"
+#include "PhnICalllogChangeListener.h"
+
+class CallLogDetails;
+
+/**
+ * @class LogListComparer
+ * @brief LogListComparer provides comparison functions used to
+ * sort an arraylist of CallLogDetails.
+ *
+ */
+class LogListComparer
+: public Tizen::Base::Collection::IComparer
+ {
+public:
+ LogListComparer() {};
+ virtual ~LogListComparer() {};
+ result Compare (const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const;
+};
+
+class LogGroupListComparer
+: public Tizen::Base::Collection::IComparer
+ {
+public:
+ LogGroupListComparer() {};
+ virtual ~LogGroupListComparer() {};
+ result Compare (const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const;
+};
+
+class LogListByNumberComparer
+: public Tizen::Base::Collection::IComparerT<CallLogDetails>
+{
+public:
+ LogListByNumberComparer() {};
+ virtual ~LogListByNumberComparer() {};
+ result Compare (const CallLogDetails& obj1, const CallLogDetails& obj2, int& cmp) const;
+};
+
+
+/**
+ * @class CallLogDetails
+ * @brief CallLogDetails used to store information call logs.
+ *
+ */
+class CallLogDetails
+: public Tizen::Base::Object
+{
+public:
+ CallLogDetails();
+ virtual ~CallLogDetails();
+ bool operator ==(const CallLogDetails& rhs) const;
+ bool operator !=(const CallLogDetails& rhs) const;
+ CallLogDetails& operator =(const CallLogDetails& rhs);
+
+ void SetCalllogDbId(int id);
+ int GetCalllogDbId(void);
+ void SetCalllogType(contacts_phone_log_type_e type);
+ CallLogType GetCalllogType(void);
+ void SetContactDbId(int id);
+ int GetContactDbId(void);
+ void SetFirstName(char* name);
+ char* GetFirstName(void);
+ void SetLastName(char* name);
+ char* GetLastName(void);
+ void SetDisplayName(char* name);
+ char* GetDisplayName(void);
+ void SetContactImagePath(char* path);
+ char* GetContactImagePath(void);
+ void SetPhoneNumber(char* number);
+ char* GetPhoneNumber(void);
+ void SetShortMessage(char* message);
+ char* GetShortMessage(void);
+ void SetStartTime(time_t time);
+ time_t GetStartTime(void);
+ void SetDuration(int duration);
+ int GetDuration(void);
+ void ConvertTimetoDateTime(void);
+ Tizen::Base::DateTime GetDateTime(void);
+ int GetConsecutiveNoCounter(void);\r
+ void SetConsecutiveNoCounter(int consecutiveNoCounter);\r
+ Tizen::Base::Collection::ArrayList* GetCallLogDbIds();\r
+ void SetCallLogDbIds(Tizen::Base::Collection::ArrayList* dbIds);\r
+\r
+
+private:
+ //TODO: Naming conventions to be followed.
+ //NOTE: Below fields are not owned.
+ int calllog_db_id; /**< Call log entry id */
+ CallLogType calllog_type; /**< Call log entry type */
+ int contact_db_id; /**< Contact's id in database */
+ char* first_name; /**< Contact's first name (also known as given name) */
+ char* last_name; /**< Contact's last name (also known as family name) */
+ char* display_name; /**< Display name (how contact's name should be presented) */
+ char* contact_image_path; /**< Path to image with contact's picture */
+ // contact_number_type_e phone_number_type; /**< Phone number type (i.e.: work, cell) */
+ char* phone_number; /**< Phone number */
+ char* short_message; /**< Short message for this log */
+ time_t startTime; /**< Timestamp of this change */
+ int duration_sec;
+ Tizen::Base::DateTime dateTime;
+ int __consecutiveNoCounter;\r
+ Tizen::Base::Collection::ArrayList* __pDBIds;\r
+
+};
+
+/**
+ * @class CallLogManager
+ * @brief CallLogManager is a singleton class used to save and retrieve call log related data.
+ *
+ */
+\r
+class GroupItemClass;\r
+\r
+class CallLogManager
+{
+public:
+ static CallLogManager* GetInstance(void);
+
+private:
+ CallLogManager(void);
+ virtual ~CallLogManager(void);
+ void DeleteAllCallLogCacheEntries(void);\r
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+public:
+
+ result AddCallogInfoToDatabase(CallInfo* calllogInfo);
+ void ResetAndNotifyCalllogData(void);
+ //Tizen::Base::Collection::HashMapT<int, CallLogDetails>* GetCallogListByNumberFromDatabaseN(char* number);
+ Tizen::Base::Collection::ArrayListT<CallLogDetails>* GetCallogListByNumberFromDatabaseN(char* number);
+ unsigned long GetDuration(long long start_time);
+ bool GetAllCallogDataFromDatabseCB();
+ bool QueryCallogDatabse(contacts_list_h* list);\r
+ void CreateCallLogGroup(CallLogDetails* pCalllogInfo, Tizen::Base::String title);\r
+ GroupItemClass* GetGroupWithTitle(Tizen::Base::String title);\r
+ void DeleteItemAtGroupIndex(int groupIndex, int itemIndex);\r
+ bool GetCallogListByNumberFromDatabaseCB(char *number);
+ void CopyDataToCallLogDetails(CallLogDetails* calllogInfo , contacts_record_h record);
+
+ Tizen::Base::Collection::ArrayList* GetCallLogGroups();\r
+
+ Tizen::Base::Collection::IListT<int>* GetCalllogListKeys(void);
+ Tizen::Base::Collection::IListT<CallLogDetails>* GetCalllogListValues(void);
+ Tizen::Base::Collection::IMapEnumeratorT<int, CallLogDetails>* GetCalllogListEnum(void);
+
+ Tizen::Base::Collection::IListT<int>* GetCalllogListByNumKeys(void);
+ Tizen::Base::Collection::IListT<CallLogDetails>* GetCalllogListByNumValues(void);
+ Tizen::Base::Collection::IMapEnumeratorT<int, CallLogDetails>* GetCalllogListByNumEnum(void);
+ void DeleteCalllogByDbId(int dbId);
+ void DeleteAllCalllog(void);
+ int GetAllCallLogCount(void);\r
+ int GetCallLogsViewedCount(void);\r
+ int GetCalllogCountByNumber(void);
+ //Used to get the latest dialed or incoming number from call log database.
+ Tizen::Base::String* GetLatestCallLogFromDbN(void);
+ //Used to fetch list of call from unknown numbers from logs.
+ Tizen::Base::Collection::HashMapT<int, CallLogDetails>* GetCallogListByUnknownNumberFromDatabaseN(char* number);
+
+ //checks whether the call log is voice/video/msg/email
+ bool IsVoiceCall(CallLogDetails* pLatestCallLog);
+ //Checks if the number is valid
+ bool CheckNumberIsValid(Tizen::Base::String phoneNumber);
+ void SortCalllogList(void);
+ void SortCalllogListByNumber(void);
+
+ void AddCalllogChangeListener(ICalllogChangeListener& listner );
+ void RemoveCalllogChangeListner(ICalllogChangeListener& listner );
+ void GetCalllogContactName(Tizen::Base::String number,Tizen::Base::String& name);
+ //Called when call log db is changed
+ static void ContactsDbchangedcb(const char* view_uri, void* user_data);
+ void UpDateMissedCallSeenStatus(CallLogDetails* pDetails);
+ void UpdateCallLogList(void);
+\r
+ int GetUnknownLogCount(int dbId);\r
+ static void setCallLogViewbyID(CallLogType id);\r
+ static CallLogType getCallLogViewbyID();\r
+\r
+ bool GetCurrentDateTime(Tizen::Base::DateTime& dt);\r
+ contacts_phone_log_type_e GetCallLogType(CallLogType type);
+
+ bool GetDirtyFlag(void);\r
+private:
+
+ static CallLogType __callLogViewbyID;\r
+ int __callLogsViewedCount;\r
+ static CallLogManager* __pCallogManager;
+ Tizen::Base::Collection::ArrayList*/*<GroupItemClass>* */ __pCalllogGroupList;\r
+ Tizen::Base::Collection::HashMapT<int,int>* __pCalllogDBIds;
+ Tizen::Base::Collection::ArrayListT<CallLogDetails>* __pCalllogListByNumber;
+ Tizen::Base::Collection::HashMapT<int, CallLogDetails>* __pCalllogUnkownListByNumber;
+ char* __pNumber;
+ Tizen::Base::Collection::ArrayListT<ICalllogChangeListener*>* __pCalllogChangeListerners;
+ bool __bDbDirty;
+};
+
+
+/**\r
+ * @class GroupItemClass\r
+ * @brief This class helps in storing group item data\r
+ *\r
+ */\r
+class GroupItemClass\r
+ :public Tizen::Base::Object\r
+{\r
+private:\r
+ Tizen::Base::String __titleText;\r
+ Tizen::Base::Collection::ArrayList* __pData;\r
+\r
+public:\r
+ GroupItemClass(void);\r
+ virtual ~GroupItemClass(void);\r
+\r
+ /**\r
+ * This function sets the titleText for the History object\r
+ *\r
+ * @return No return type\r
+ * @param titleText The titleText for the History\r
+ */\r
+ void SetTitleText(Tizen::Base::String titleText);\r
+\r
+ /**\r
+ * This function sets the data for the History object\r
+ *\r
+ * @return No return type\r
+ * @param pData The data for the History\r
+ */\r
+ void SetLogData(Tizen::Base::Collection::ArrayList* pData);\r
+\r
+ /**\r
+ * This function gets the GetTitleText of History\r
+ *\r
+ * @return A String\r
+ * @param No parameter\r
+ */\r
+ Tizen::Base::String GetTitleText(void);\r
+\r
+ /**\r
+ * This function gets the GetHistoryData of History\r
+ *\r
+ * @return A Pointer to ArrayList\r
+ * @param No parameter\r
+ */\r
+ Tizen::Base::Collection::ArrayList* GetLogData(void);\r
+};\r
+#endif // _PHN_CALL_LOG_MANAGER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCommonUtils.h
+ * @brief This is the header file for the %DialUtil class.
+ *
+ * This header file contains the declarations for commonly used functions.
+ */
+#ifndef _PHN_COMMON_UTILS_H_
+#define _PHN_COMMON_UTILS_H_
+
+#include <FUi.h>
+#include <FBase.h>
+
+enum DialerFontStyle
+{
+ FONT_CALLING_TEXT,
+ FONT_KEYPAD_NUMBER,
+ FONT_KEYPAD_TEXT,
+ FONT_KEYPAD_P,
+ FONT_KEYPAD_PLUS,
+ FONT_KEYPAD_CANCEL,
+ FONT_SUGGESTION_NAME,
+ FONT_SUGGESTION_MOBILE,
+ FONT_SUGGESTION_NUMBER,
+ FONT_SUGGESTION_LIST_NUMBER,
+ FONT_HIGHLIGHT_SEARCH_KEYWORD,
+ FONT_EXPAND_BUTTON_TEXT,
+ FONT_SEARCH_TEXT,
+ FONT_SPEEDDIAL_BTN_NUMBER,
+};
+
+//Command Ids used in Dialer tab. Always append new command ids at bottom.
+enum DialCommandIds
+{
+ NUM_KEY1 = 1,
+ NUM_KEY2,
+ NUM_KEY3,
+ NUM_KEY4,
+ NUM_KEY5,
+ NUM_KEY6,
+ NUM_KEY7,
+ NUM_KEY8,
+ NUM_KEY9,
+ PAUSE_KEY,
+ NUM_KEY0,
+ HASH_KEY,
+ CALL_KEY,
+ CLEAR_KEY,
+ CANCEL_KEY,
+ WAIT_KEY,
+ STAR_KEY,
+ PLUS_KEY,
+ DIAL_CMD_TOTAL_COUNT,
+};
+
+enum LogContextActionIds
+{
+ IDA_LIST_ELEMENT_CALL = 105,
+ IDA_LIST_ELEMENT_VIDEO_CALL,
+ IDA_LIST_ELEMENT_MESSAGE,
+ IDA_LIST_ELEMENT_DELETE,
+};
+
+extern const int ID_NAME_STRING;
+extern const int ID_NUMBER_STRING;
+extern const int ID_TIME_STRING;
+extern const int ID_CONTACT_BITMAP;
+extern const int ID_CALLTYPE_BITMAP;
+extern const int ID_NAME_STRING_COUNTER;
+extern const int ID_LOGCALL_BITMAP;
+extern const int ID_NAME_STRING_FONT_SIZE;
+
+
+extern const int X_TEXT_LINE1_ITEM;
+extern const int Y_TEXT_LINE1_ITEM;
+extern const int H_TEXT_LINE1_ITEM;
+extern const int W_TEXT_LINE1_ITEM;
+extern const int W_TEXT_LINE1_ITEM_RIGHT_MARGIN;
+extern const int W_TEXT_LINE1_ITEM_COUNTER;
+
+extern const int X_TEXT_LINE2_ITEM;
+extern const int Y_TEXT_LINE2_ITEM;
+extern const int H_TEXT_LINE2_ITEM;
+extern const int W_TEXT_LINE2_ITEM;
+extern const int W_TEXT_LINE2_ITEM_RIGHT_MARGIN;
+extern const int W_TEXT_LINE2_ITEM_RIGHT_MARGIN_DELETE;
+
+extern const int X_TEXT_TIME_ITEM;
+extern const int Y_TEXT_TIME_ITEM;
+extern const int H_TEXT_TIME_ITEM;
+extern const int W_TEXT_TIME_ITEM;
+extern const int X_TEXT_TIME_ITEM_RIGHT_MARGIN;
+
+extern const int X_CONTACT_BITMAP_ITEM;
+extern const int Y_CONTACT_BITMAP_ITEM;
+extern const int H_CONTACT_BITMAP_ITEM;
+extern const int W_CONTACT_BITMAP_ITEM;
+
+extern const int X_CALLTYPE_BITMAP_ITEM;
+extern const int Y_CALLTYPE_BITMAP_ITEM;
+extern const int H_CALLTYPE_BITMAP_ITEM;
+extern const int W_CALLTYPE_BITMAP_ITEM;
+
+extern const int X_LOGCALL_BITMAP_ITEM;
+extern const int Y_LOGCALL_BITMAP_ITEM;
+extern const int W_LOGCALL_BITMAP_ITEM;
+extern const int H_LOGCALL_BITMAP_ITEM;
+extern const int X_LOGCALL_BITMAP_RIGHT_MARGIN;
+
+extern const int X_DIALER_BTN_TXT;
+extern const int W_DIALER_BTN_NUM_TXT;
+extern const int W_DIALER_BTN_ALPHA_TXT;
+
+/**
+ * @class DialUtil
+ * @brief This class provides static public utility functions to dialer module.
+ *
+ */
+class DialUtil
+{
+private:
+ DialUtil(void){};
+ DialUtil(const DialUtil& obj){};
+ virtual ~DialUtil(void){};
+
+public:
+ //used to get text font for button in dialer tab.
+ static Tizen::Graphics::Font* GetTextFontN(int textFontStyle);
+ //used to get text color for button in dialer tab.
+ static Tizen::Graphics::Color* GetTextColorN(int textColor, int buttonStatus);
+ //Function to check if keyword is numeric. This function assumes that a string starting with digit will be numeric.
+ //If needed, it might be implemented in more generic way to check all characters for digits.
+ static bool IsNumericString(Tizen::Base::String& keyWord);
+ //Call 9 Patch
+ static void DrawClear9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ //Call 9 Patch
+ static void DrawCall9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ //Sets the 'bgImg' image to 'pCanvas' Canvas, if image is a 9-patch image.
+ static void Draw9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ //Sets the background image to canvas without any checks for the bounds
+ static void DrawBitmapToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ //Used to set image to canvas.
+ static void DrawImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos);
+ //Used to set image to Keypad buttons according to the latest GUI.
+ static void DrawKeypadImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos);
+ //Used to convert text to Enriched text and set it to canvas.
+ static void DrawTextToCanvas(const Tizen::Base::String& buttonText, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos, int buttonStatus);
+ //Draw Customized keypad button's subtext according to the latest UI
+ static void DrawKeypadTextToCanvas(const Tizen::Base::String& buttonText, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos, int buttonStatus);
+ //Used to set nnormal, pressed image to button.
+ static void DrawCanvasToButton(Tizen::Graphics::Canvas* pCanvasNormal, Tizen::Graphics::Canvas* pCanvasPressed, Tizen::Ui::Controls::Button* pButton);
+ //Used to convert provided digit to its equivalent String instance.
+ static Tizen::Base::String ConvertDialedNumberToString(int dialNumber);
+ //Function used to fetch a list of possible names mapped to 'nextCharPos'.
+ static Tizen::Base::Collection::IList* FetchPossibleNamesListN(const Tizen::Base::String& prevSearchStr, int nextCharPos);
+ //Function used to convert substring of 'name' to keys typed, eg. Ani -> 264
+ static void ConvertNameToNumericKeys(Tizen::Base::String& subContactName, Tizen::Base::String& possibleKeysTyped);
+ //Function to return return EnrichedText with Text + Highlighted matched keyword, if any.
+ static Tizen::Graphics::EnrichedText* ConstructEnrichedTextN(Tizen::Base::String& text,Tizen::Base::String& matchedKeyword, int textFontStyle, Tizen::Graphics::Dimension txtDimension);
+ //Used to draw Enriched text with highlighted keyword to canvas.
+ static void DrawTextAndHighlightedKeywordToCanvas(Tizen::Base::String& buttonText, Tizen::Base::String& matchedKeyword, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos);
+};
+
+#endif /* _PHN_COMMON_UTILS_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialAppForm.h
+ * @brief The Dial application form
+ *
+ */
+#ifndef _PHN_DIAL_APP_FORM_H_
+#define _PHN_DIAL_APP_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class DialAppForm
+ * @brief This class presents a main form for Phone application.
+ *
+ */
+class DialAppForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IFormMenuEventListener
+{
+public:
+ DialAppForm(void);
+ virtual ~DialAppForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //IFormMenuEventListener
+ virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form& source);
+
+protected:
+ static const int ID_HEADER_DIALER;
+ static const int ID_HEADER_LOGS;
+};
+
+#endif //_PHN_DIAL_APP_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialContactInfo.h
+ * @brief This is the header file for the %DialContactInfo class.
+ *
+ * This header file contains the declarations for %DialContactInfo class.
+ */
+#ifndef _PHN_DIAL_CONTACT_INFO_H_
+#define _PHN_DIAL_CONTACT_INFO_H_
+
+#include <FSocial.h>
+
+/**
+ * @class DialContactInfo
+ * @brief This is a light-weight class used to provides display name,
+ * phone number and Thumbnail using simple methods.
+ *
+ */
+class DialContactInfo: public Tizen::Base::Object
+{
+public:
+ DialContactInfo(void);
+ virtual ~DialContactInfo(void);
+ /*
+ //Used to create new 'DialContactInfo' object which is clone of 'this' object.
+ DialContactInfo* CloneN(void);
+ */
+ //display name
+ void SetDisplayName(Tizen::Base::String& pDisplayName);
+ Tizen::Base::String& GetDisplayName(void) const;
+ //phone number
+ void SetPhoneNumber(Tizen::Base::String& pPhoneNumber);
+ Tizen::Base::String& GetPhoneNumber(void) const;
+ //matched search string
+ void AddSearchKey(Tizen::Base::String& pSearchString);
+ void RemoveSearchKey(int index);
+ void ReplaceSearchKey(int index, Tizen::Base::String& pSearchString);
+ //Used to get the first matched search key
+ Tizen::Base::String* GetSearchKey(void);
+ Tizen::Base::Collection::IList* GetSearchKeyList(void);
+ //Used to transfer ownership of 'pBitmap' to 'DialContactInfo'.
+ void SetThumbnail(Tizen::Graphics::Bitmap* pBitmap);
+ Tizen::Graphics::Bitmap* GetThumbnailN(void) const;
+ //Coll Log Db Id
+ void SetCallLogDbId(int callLogDbId);
+ int GetCallLogDbId(void);
+ //Checks whether the value of the specified instance is equal to the value of the current instance of %Object.
+ virtual bool Equals(const Object& obj) const;
+ /**
+ * Used to return new 'DialContactInfo' object with the same state
+ * as the object on which this function is called.
+ */
+ DialContactInfo* CloneN(void);
+ void SetRecordId(Tizen::Social::RecordId recordID);
+ Tizen::Social::RecordId GetRecodrdId(void);
+
+private:
+ //Copy Constructor - we dont want any bitwise copy.
+ DialContactInfo(const DialContactInfo& obj);
+
+private:
+ int __callLogDbId;
+ Tizen::Base::String* __pDisplayName;
+ Tizen::Base::String* __pPhoneNumber;
+ Tizen::Graphics::Bitmap* __pThumbnail;
+ Tizen::Base::Collection::ArrayList* __pSearchKeyList;
+ Tizen::Social::RecordId __recordID;
+};
+
+#endif // _PHN_DIAL_CONTACT_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialPresentationModel.h
+ * @brief This is the header file for the %DialPresentationModel class.
+ *
+ * This header file contains the declarations for %DialPresentationModel class.
+ */
+#ifndef PHNDIALPRESENTATIONMODEL_H_
+#define PHNDIALPRESENTATIONMODEL_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FTelephony.h>
+#include "PhnRetrieveSuggestionsTasks.h"
+#include "PhnTypes.h"
+
+class DialContactInfo;
+class DialTabDialer;
+class SettingsManager;
+
+/**
+ * @class DialPresentationModel
+ * @brief This class acts as an interface between the Dialer Screen and core engine.
+ */
+class DialPresentationModel
+ : public Tizen::App::IAppControlResponseListener
+ , public ISuggestionsRetrievedEventListener
+{
+public:
+ DialPresentationModel(DialTabDialer& pParentPanel);
+ ~DialPresentationModel();
+
+ /**
+ * Used to fetch the contacts suggestion list.
+ * Starts a new thread for async search of contacts, call logs with phone number and name.
+ */
+ bool FetchSuggestionList(const Tizen::Base::String& searchString);
+ //Used to fetch Speed dial mapping for pressed button, if present.
+ Tizen::Base::String* FetchSpeedDialNumberN(int actionId);
+ //Used to fetch contact at specified index from search result list.
+ DialContactInfo* GetSuggestionAtIndex(int index);
+ //Used to fetch the no. of suggested contacts in search result list.
+ int GetNumberOfSuggestions(void);
+ //clear search results
+ void ClearSearchResults(void);
+ //Used to open contacts "Add" AppControl
+ void AddContactsToAddressBook(Tizen::Base::String& contactNumber);
+ //Used to open Messaging "Compose" AppControl
+ result OpenMessagingAppControl(Tizen::Base::String& contactNumber);
+ //Used to open contacts "Add" AppControl
+ result LaunchAddContactsAppControl(Tizen::Base::String& contactNumber);
+ //Used to fetch latest dialed or caller number from call logs
+ Tizen::Base::String* FetchLatestNumberFromLogsN(void);
+ //Used to make an outgoing call
+ ErrorCodes DialCall(const Tizen::Base::String& contactNumber);
+
+protected:
+ // Get the sim info
+ result GetSimInfo(void);
+ //used to make an outgoing call request using call appcontrol
+ result LaunchCallAppControl(const Tizen::Base::String& contactNumber);
+ //Called when the application control is completed.
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ // Called when the retrieval of contact suggestion list is completed
+ virtual void HandleContactsRetrievalCompleted(Tizen::Base::Collection::IList* pContactsList);
+private:
+ SettingsManager* __pSettingsManager;
+ Tizen::Base::Collection::ArrayList* __pNumberSuggestionList;
+ //Used to Control access to __pNumberSuggestionList
+ Tizen::Base::Runtime::Mutex __mutex;
+ Tizen::Base::String* __pSearchString;
+ /// Worker thread
+ Tizen::Base::Runtime::Thread* __pSearchThread;
+ RetrieveContactsListTask* __pAsyncSearchTask;
+ DialTabDialer& __parentDialerPanel;
+};
+
+#endif /* PHNDIALPRESENTATIONMODEL_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialerKeypad.h
+ * @brief This is the header file for the %DialerKeypad class.
+ *
+ * This header file contains the declarations for %DialerKeypad class.
+ */
+#ifndef _PHN_DIALER_KEYPAD_H_
+#define _PHN_DIALER_KEYPAD_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnTypes.h"
+
+/**
+ * @class DialerKeypad
+ * @brief This class presents a Panel based UI for keypads used in Dialer Tab.
+ *
+ */
+class DialerKeypad
+ : public Tizen::Ui::Controls::Panel
+{
+private:
+ enum ButtonState
+ {
+ BTN_NORMAL,
+ BTN_PRESS,
+ BTN_DIM,
+ };
+
+public:
+ DialerKeypad(DialerState openedState);
+ virtual ~DialerKeypad(void);
+
+ bool ConstructPanel(Tizen::Ui::IActionEventListener* pActionListener,
+ Tizen::Ui::ITouchLongPressGestureEventListener* pLongTapListener,Tizen::Ui::ITouchEventListener* pTouchListner);
+ /**
+ * Overrides this method to provide user-specific initialization code after the control is added to a container.
+ * @remarks OnInitializing() is called when the control is about to be added to a container.
+ * @remarks To cancel adding this control to the parent, return E_FAILURE in this method.
+ * @see OnTerminating()
+ */
+ virtual result OnInitializing(void);
+ /**
+ * Overrides this method to provide user-specific termination code.
+ * @return An error code
+ * @remarks OnTerminating() is called right before the control is removed successfully from the container.
+ * @remarks To cancel removing this control from the parent, return E_FAILURE in this method.
+ * @see OnInitializing()
+ */
+ virtual result OnTerminating(void);
+
+ virtual result OnDraw(void);
+ //void add listeners to last row buttons
+ void AddListenersToLastRowButtons();
+ //set/unset the focus to buttons
+ void SetFocusToButtons(bool keypad, bool lastrow);
+ // Set Bitmap to the Buttons in panel.
+ void SetBitmapToKeypadButtons(void);
+ //Enable/Disable the keypad tone
+ void SetKeypadTone(bool enable);
+
+private:
+
+ //Adds Action listener and Long press detectors to buttons.
+ void AddListenersToButtons(void);
+ //used to determine whether to show cancel button
+ bool IsShowCancelButton(void);
+ //used to determine whether to show voice mail
+ bool IsShowVoiceMailIcon(void);
+ //used to determine whether to show video call button
+ bool IsShowVideoCallButton(void);
+
+private:
+ //Acts as Action listener & LongPress Gesture Listener
+ Tizen::Ui::IActionEventListener* __pParentActionListener;
+ Tizen::Ui::ITouchLongPressGestureEventListener* __pParentLongTapListener;
+ Tizen::Ui::ITouchEventListener* __pParentTouchListner;
+ //Long press gesture detectors for buttons
+ Tizen::Base::Collection::ArrayList* __pLongPressDetectors;
+ //Identifies dialer keypad opened from which state
+ DialerState __openedState;
+};
+
+#endif // _PHN_DIALER_KEYPAD_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnEmergencyDialForm.h
+ * @brief This is the header file for the EmergencyDialForm class.
+ *
+ * This header file contains the declarations for EmergencyDialForm class.
+ */
+#ifndef _PHN_EMERGENCY_DIAL_FORM_H_
+#define _PHN_EMERGENCY_DIAL_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class DialerKeypad;
+class ErrorMsgPopup;
+
+/**
+ * @class EmergencyDialForm
+ * @brief This class presents Emergency dial form.
+ *
+ */
+class EmergencyDialForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IActionEventListener
+ , public IPopupClosedEventListener
+ , public Tizen::Ui::ITouchLongPressGestureEventListener
+{
+public:
+ EmergencyDialForm(void);
+ virtual ~EmergencyDialForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ //Event Listeners from TouchLongPressGestureDetector
+ // Called when a long press gesture is detected.
+ virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector);
+ //Called when a long press detection is canceled.
+ virtual void OnLongPressGestureCanceled(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector){}
+
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+ //Called when the application control is completed.
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+
+private:
+ //Used to construct dialer keypad.
+ void ConstructKeypad(void);
+ //Used to show formatted contact number in text field.
+ void ShowFormattedText(Tizen::Ui::Controls::EditField* pEditField, int actionId);
+ //Used to prepare for MOCall and switch to emergency outgoing call screen.
+ void DialEmergencyCall(const Tizen::Base::String& contactNumber);
+ result LaunchCallAppControl(const Tizen::Base::String& contactNumber);
+
+private:
+ DialerKeypad* __pDialKeypad;
+ ErrorMsgPopup* __pErrorMsgPopup;
+ bool __isAppControlLaunched;
+};
+
+#endif // _PHN_EMERGENCY_DIAL_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnErrorMsgPopup.h
+ * @brief This is the header file for the %ErrorMsgPopup class.
+ *
+ * This header file contains the declarations for %ErrorMsgPopup class.
+ */
+#ifndef _PHN_ERROR_MSG_POPUP_H_
+#define _PHN_ERROR_MSG_POPUP_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class IPopupClosedEventListener
+ * @brief This interface is used to notify the popup is closed event to Scenes.
+ *
+ */
+class IPopupClosedEventListener
+{
+public:
+ virtual ~IPopupClosedEventListener(void){};
+ // Called when the error message Pop-up is closed.
+ virtual void HandlePopupClosed(void) = 0;
+};
+
+/**
+ * @class ErrorMsgPopup
+ * @brief This class shows message popup in error condition.
+ *
+ */
+class ErrorMsgPopup: public Tizen::Ui::Controls::Popup
+ ,public Tizen::Base::Runtime::ITimerEventListener
+{
+public:
+ ErrorMsgPopup(IPopupClosedEventListener* pEventListener);
+ virtual ~ErrorMsgPopup(void);
+ /**
+ * Function is used to show error message popup
+ * based on the error code received.
+ */
+ void ShowErrorMsgPopupN(int errorCode);
+
+ //From ITimerEventListener
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+private:
+ void ConstructPopup(int errorCode);
+ //Function is used to fetch error messages based on error code
+ Tizen::Base::String FetchErrorMessage(int errorCode);
+ //draws and shows the popup on screen
+ void ShowPopup(void);
+
+private:
+ //Timer used to show message
+ Tizen::Base::Runtime::Timer* __pTimer;
+ //Listener to popup closed event.
+ IPopupClosedEventListener* __pEventListener;
+ //used to close the popup
+ int __popupModalResult;
+};
+
+#endif // _PHN_ERROR_MSG_POPUP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnIAppStateChangeListner.h
+ * @brief This is the header file for the IPhnIAppStateChangeListner class.
+ */
+
+#ifndef _PHN_STATE_CHANGE_LISTNER_H_
+#define _PHN_STATE_CHANGE_LISTNER_H_
+
+#include <FBase.h>
+
+class IAppStateChangeListener
+ : public Tizen::Base::Object
+{
+public:
+ virtual ~IAppStateChangeListener(void) {}
+
+ virtual void OnForeground(void) = 0;
+ virtual void OnBackground(void) = 0;
+};
+
+#endif /* _PHN_STATE_CHANGE_LISTNER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+/*
+ * PhnICallLogViewByPopupListener.h
+ *
+ * Created on: Mar 13, 2013
+ * Author: sekhar.b
+ */
+
+#ifndef PHNICALLLOGVIEWBYPOPUPLISTENER_H_
+#define PHNICALLLOGVIEWBYPOPUPLISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+/**
+ * @class ICallLogViewByPopupListener
+ * @brief Class ICallLogViewByPopupListener is listener for popup log type selection.
+ *
+ */
+class ICallLogViewByPopupListener
+ : public Tizen::Base::Runtime::IEventListener
+{
+public:
+ /**
+ * This is the destructor for this class.
+ */
+ virtual ~ICallLogViewByPopupListener(void) {}
+
+ /**
+ * On Item selected.
+ */
+ virtual void OnItemSelected() = 0;
+};
+
+#endif /* PHNICALLLOGVIEWBYPOPUPLISTENER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/**
+ * @file PhnICalllogChangeListener.h
+ * @brief This is the header file for the %ICalllogChangeListener class.
+ *
+ * This header file contains the declarations for %ICalllogChangeListener class.
+ */
+#ifndef _PHN_CALL_LOG_CHANGE_LISTENER_H_
+#define _PHN_CALL_LOG_CHANGE_LISTENER_H_
+
+/**
+ * @class ICalllogChangeListener
+ * @brief This class presents call back function from call log module.
+ *
+ */
+class ICalllogChangeListener
+{
+public:
+ virtual ~ICalllogChangeListener(void){};
+
+ virtual void OnCalllogChanged(void) = 0;
+
+};
+
+#endif //_PHN_CALL_LOG_CHANGE_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnIPopupItemSelectListener.h
+ * @brief This is the header file for the %IPopupItemSelectListener class.
+ *
+ * This header file contains the declarations for %IPopupItemSelectListener class.
+ */
+#ifndef _IPOPUP_ITEM_SELECT_LISTENER_H_
+#define _IPOPUP_ITEM_SELECT_LISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+
+/**
+ * @class IPopupItemSelectListener
+ * @brief Class IPopupItemSelectListener is listener for popup object deletion.
+ *
+ */
+class IPopupItemSelectListener
+ : public Tizen::Base::Runtime::IEventListener
+{
+public:
+ /**
+ * This is the destructor for this class.
+ */
+ virtual ~IPopupItemSelectListener(void) {}
+
+ /**
+ * On Item selected.
+ */
+ virtual void OnItemSelected(int itemIndex) = 0;
+};
+
+#endif // _IPOPUP_ITEM_SELECT_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnISettingsEventListener.h
+ * @brief This is the header file for the %ISettingsEventListener class.
+ *
+ * This header file contains the declarations for %ISettingsEventListener class.
+ */
+#ifndef _PHN_I_SETTINGS_EVENT_LISTENER_H_
+#define _PHN_I_SETTINGS_EVENT_LISTENER_H_
+
+#include "PhnTypes.h"
+
+/**
+ * @class ISettingsEventListener
+ * @brief This interface is used to listen to events from Telephony Manager.
+ *
+ */
+class ISettingsEventListener
+{
+public:
+ virtual ~ISettingsEventListener(void){};
+
+ //Handle the response for getCallWaiting request
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated) = 0;
+ //Handle the response for setCallWaiting request
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled) = 0;
+ //Handle the response for getCallForwarding request
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime) = 0;
+ //Handle the response for setCallForwarding request
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime) = 0;
+ //Handle the response for setcallBarring request
+ virtual void HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated) = 0;
+ //Handle the response for getCallBarring request
+ virtual void HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated) = 0;
+ //Handle flight mode change
+ virtual void HandleFlightMode(bool isFlightModeActivated) = 0;
+};
+
+#endif // _PHN_I_SETTINGS_EVENT_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnLogsDetailForm.h
+ * @brief This is the header file for the %DlLogsDetailForm class.
+ *
+ * This header file contains the declarations for %DlLogsDetailForm class.
+ */
+#ifndef _PHN_LOGS_DETAIL_FORM_H_
+#define _PHN_LOGS_DETAIL_FORM_H_
+
+#include <FBase.h>
+#include <FSysSettingInfo.h>
+#include <FUi.h>
+#include "PhnCallLogPresentationModel.h"
+#include "PhnCallLogViewByPopup.h"
+#include "PhnIAppStateChangeListner.h"
+#include "PhnICallLogViewByPopupListener.h"
+#include "PhnLogsDetailItemProvider.h"
+
+class CallLogDetails;
+class CallLogManager;
+
+/**
+ * @class DlLogsDetailForm
+ * @brief This class presents a form based UI for call log details scene.
+ *
+ */
+class DlLogsDetailForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IWindowEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::Controls::IGroupedListViewItemEventListener
+ , public IAppStateChangeListener
+ , public ICalllogChangeListener
+ , public ICallLogViewByPopupListener
+ , public Tizen::Ui::Controls::IFormMenuEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::System::ISettingEventListener
+{
+
+// Construction
+public:
+ ///DlLogsDetailForm constructor
+ DlLogsDetailForm(void);
+
+ ///DlLogsDetailForm destructor
+ virtual ~DlLogsDetailForm(void);
+
+ ///Initializes the DlLogsDetailForm form
+ /*
+ * @param: Whether Initialize is success or not
+ */
+ bool Initialize();
+
+ ///This functions gets called during form OnInitializing
+ /*
+ * @param: result
+ */
+ result OnInitializing(void);
+
+ ///This functions gets called during form terminating
+ /*
+ * @param: result
+ */
+ result OnTerminating(void);
+
+ ///IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ ///IFormBackEventListener method
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ void SetFormMode(bool mode);
+
+ void SetAllListItems(bool checked);
+
+ void UnCheckAllItems(void);
+
+ void GetUpdatedListFromDatabase();
+
+ bool DeleteSelectedCalllog(void);
+
+ /// IGroupedListViewItemEventListener
+ virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){}
+ virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state);
+ virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction){}
+
+ ///ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ ///ISceneEventListener
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ void UpdateForm(void);
+ /**
+ * Called when the application control is completed.
+ */
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; }
+
+ void ShowDeletePopup(void);
+ void HideDeletePopup(void);
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer);
+ virtual void OnWindowActivated(const Tizen::Ui::Window &source);
+ virtual void OnWindowDeactivated(const Tizen::Ui::Window &source){}
+ result RemoveLogsList();
+
+ //Called when App comes to foreground
+ virtual void OnForeground(void);
+ //Called when App goes to background
+ virtual void OnBackground(void);
+
+ void SetListItemSelectStatus(bool status);
+ //Called when callog list changes
+ virtual void OnCalllogChanged(void);
+
+ void StoreItemselection(int groupIndex, int itemIndex, int elementId, ListItemStatus state);
+ void ManageItemSelection(void);
+ bool IsScecneVisible();
+ void SetSceneVisible(bool sceneMode);
+ void ShowBlockPopup(void);\r
+ //Used to show error message box
+ void ShowDuplicateErrorMessageBox(Tizen::Base::String& message);
+ void ShowInvalidMessageNumberMessageBox(Tizen::Base::String& message);
+ void ShowInvalidNumberMessageBox(String& number);
+ //Handles userevents
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+ //From IPopupEventListener
+ void OnItemSelected();
+ void ViewContactDetail(void);
+ //void ShowContextMenu();
+ ///IOrientationEventListener
+ virtual void OnOrientationChanged(const Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //ISettingEventListener
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+ //IFormMenuEventListener
+ virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form& source);
+ void ShowOptionsMenu();
+ void ManageUserDetail();
+ void GetTextWidthHeight(String str, float fontSize, float *width, float *height);
+
+ bool IsValidMessageNumber(const String& phoneNumber);
+ bool IsValidCallNumber(const String& phoneNumber);
+ void ShowDeleteConfirmationPopup();
+private:
+ ///Call button
+ Tizen::Ui::Controls::Button* __pButtonCall;
+
+ ///Message button
+ Tizen::Ui::Controls::Button* __pButtonMessage;
+
+ ///Contact Image
+ Tizen::Ui::Controls::Button* __pButtonContactImage;
+
+ ///Contact name
+ Tizen::Ui::Controls::Panel* __pPanelName;
+ Tizen::Ui::Controls::Panel* __pPanelNumberUnsaved;
+
+ ///Contact number
+ Tizen::Ui::Controls::Label* __pLabelNumber;
+ Tizen::Ui::Controls::Label* __pLabelBlocked;
+
+ ///Form footer
+ Tizen::Ui::Controls::Footer* __pFormFooter;
+
+ ///More option footer item
+ Tizen::Ui::Controls::ButtonItem __footerItemMore;
+
+ ///Delete footer item
+ Tizen::Ui::Controls::FooterItem __pFooterItemDelete;
+
+ ///Grouped list view
+ Tizen::Ui::Controls::GroupedListView* __pList;
+
+ Tizen::Ui::Controls::CheckButton* __pSelectAll;
+
+ //Selected pop up label
+ Tizen::Ui::Controls::Label* __pSelectedLabel;
+
+ LogsDetailItemProvider* __pDataProvider;
+
+ //Used only when device has HardWare key
+ Tizen::Ui::Controls::OptionMenu* __pOptionMenu;
+
+ ///List view height
+ int __listHeight;
+
+ ///form mode
+ bool __isEditMode;
+
+ bool __isSelectAll;
+ bool __isPresentInContacts;
+
+ int __listItemCount;
+ int __selectedItemCount;
+ Tizen::Base::Collection::ArrayListT<CallLogDetails>* __calllogListByNum;
+ CalLogPresentationModel* __pLogPresentor;
+ int __calllogCount;
+ Tizen::Base::String __number;
+ bool __isMsgAppControlLaunched;
+ bool __isCallAppControlLaunched;
+
+
+ Tizen::Base::Runtime::Timer __deleteLogsTimer;
+ Tizen::Ui::Controls::Popup* __pDeletePopup;
+ Tizen::Ui::Controls::Popup* __pConfirmationDeletePopup;
+
+ int __deleteGroupIndex;
+ int __deleteItemIndex;
+
+ Tizen::Base::Collection::ArrayList* __pCallLogId;
+ CallLogViewByPopup* __pLogsBlockPopup;\r
+ bool __isSceneVisible;
+ bool __isContactAppControlLaunched;
+ bool __isCallBeRejected;
+ bool __isMsgBeRejected;
+ Tizen::Base::String __contactName;
+ bool __isDeleteInProgress;
+};
+
+#endif /*_PHN_LOGS_DETAIL_FORM_H_*/
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDlLogsDetailItemProvider.h
+ * @brief This is the header file for the %DlLogsDetailItemDataProvider class.
+ *
+ * This header file contains the declarations for %DlLogsDetailItemDataProvider class.
+ */
+#ifndef _PHN_LOGS_DETAIL_ITEM_PROVIDER_H_
+#define _PHN_LOGS_DETAIL_ITEM_PROVIDER_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FSocial.h>
+#include "PhnCallLogPresentationModel.h"
+
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+class CallLogManager;
+class CallLogDetails;
+
+class CallLogDetailGroup
+ :public Tizen::Base::Object
+{
+
+public:
+ CallLogDetailGroup(void);
+ virtual ~CallLogDetailGroup(void);
+
+ Tizen::Base::Collection::ArrayList* GetLogData(void);
+ Tizen::Base::String GetTitleText(void);
+ void SetLogData(Tizen::Base::Collection::ArrayList* pData);
+ void SetTitleText(Tizen::Base::String titleText);
+
+private:
+ Tizen::Base::String __groupTitleText;
+ Tizen::Base::Collection::ArrayList* __pGroupElements;
+};
+
+
+
+
+class LogsDetailItemProvider
+ : public Tizen::Ui::Controls::IGroupedListViewItemProvider
+{
+
+public:
+ LogsDetailItemProvider();
+ virtual ~LogsDetailItemProvider();
+
+ void CreateCalllogDetailGroups();
+ void GetCurrentDateTime(Tizen::Base::DateTime& dt);
+ int GetDaysDifferenceBetweenDates(DateTime date1, DateTime date2);
+ CallLogDetailGroup* GetGroupWithTitle(String title);
+ void GetItemAtGroupIndex(int groupIndex, int itemIndex, CallLogDetails** pCalllogDetails);
+ bool IsGroupPresent(String title);
+ void ResetDetailsList(void);
+ void SetViewMode(bool mode);
+
+ // IGroupedListViewItemProvider
+ virtual int GetGroupCount(void);
+ virtual int GetItemCount(int groupIndex);
+ virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+private:
+ void GetCallogIconBitmap(CallLogType logType,Tizen::Graphics::Bitmap*& iconType, Tizen::Graphics::Bitmap*& iconArrow, Tizen::Base::String& text);
+ void GetTimeText(DateTime datetime,Tizen::Base::String& dateText);
+ bool IsTimeToBeDisplayed(CallLogType type);
+protected:
+ static const int ID_NAME_STRING;
+ static const int ID_NUMBER_STRING;
+ static const int ID_TIME_STRING;
+ static const int ID_CALLTYPE_BITMAP;
+
+ static const int X_TEXT_LINE1_ITEM;
+ static const int Y_TEXT_LINE1_ITEM;
+ static const int H_TEXT_LINE1_ITEM;
+ static const int W_TEXT_LINE1_ITEM;
+
+ static const int X_TEXT_LINE2_ITEM;
+ static const int Y_TEXT_LINE2_ITEM;
+ static const int H_TEXT_LINE2_ITEM;
+ static const int W_TEXT_LINE2_ITEM;
+
+ static const int X_TEXT_TIME_ITEM;
+ static const int Y_TEXT_TIME_ITEM;
+ static const int H_TEXT_TIME_ITEM;
+ static const int W_TEXT_TIME_ITEM;
+
+
+ static const int X_CALLTYPE_BITMAP_ITEM;
+ static const int Y_CALLTYPE_BITMAP_ITEM;
+ static const int H_CALLTYPE_BITMAP_ITEM;
+ static const int W_CALLTYPE_BITMAP_ITEM;
+
+private:
+ CalLogPresentationModel* __pLogPresentor;
+ bool __isEditMode;
+ Tizen::Base::Collection::IListT<CallLogDetails>* __pCalllogDetailListByNumber;
+ Tizen::Base::Collection::ArrayList* __pCallLogDetailGroups;
+ float __fontSize;
+ float __itemHeight;
+};
+
+#endif /* _PHN_LOGS_DETAIL_ITEM_PROVIDER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPanelFactory.h
+ * @brief This is the header file for the %PanelFactory class.
+ *
+ * This header file contains the declarations for %PanelFactory class.
+ */
+#ifndef _PHN_PANEL_FACTORY_H_
+#define _PHN_PANEL_FACTORY_H_
+
+#include <FUi.h>
+
+extern const wchar_t* PANEL_DIALER;
+extern const wchar_t* PANEL_LOGS;
+
+/**
+ * @class PanelFactory
+ * @brief This class provides the Panel factory for Dial application
+ *
+ */
+class PanelFactory
+ : public Tizen::Ui::Scenes::IPanelFactory
+{
+public:
+ PanelFactory(void);
+ virtual ~PanelFactory(void);
+
+ virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId);
+};
+
+#endif // _PHN_PANEL_FACTORY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPhoneApp.h
+ * @brief This is the header file for the %PhoneApp class.
+ *
+ * This header file contains the declarations for %PhoneApp class.
+ */
+#ifndef _PHN_PHONE_APP_H_
+#define _PHN_PHONE_APP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include "vconf.h"
+
+class IAppStateChangeListener;
+
+/**
+ * @class PhoneApp
+ * @brief PhoneApp must inherit from UiApp class
+ * which provides basic features necessary to define an UiApp.
+ *
+ */
+class PhoneApp
+ : public Tizen::App::UiApp
+ , public Tizen::System::IScreenEventListener
+ , public Tizen::App::IAppControlProviderEventListener
+ , public Tizen::App::IActiveAppEventListener
+ , public Tizen::System::ISettingEventListener
+ , public Tizen::Ui::IActionEventListener
+{
+public:
+
+ static Tizen::App::UiApp* CreateInstance(void);
+
+public:
+ PhoneApp(void);
+ virtual ~PhoneApp(void);
+
+public:
+ bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+ bool OnAppInitialized(void);
+ bool OnAppWillTerminate(void);
+ bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+ void OnForeground(void);
+ void OnBackground(void);
+ void OnLowMemory(void);
+ void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
+ void OnScreenOn(void);
+ void OnScreenOff(void);
+ //Called when application becomes active
+ virtual void OnActiveAppChanged(const Tizen::Base::String& appId);
+ //SettingsEventListener
+ void OnSettingChanged(Tizen::Base::String& key);
+ // Called when the application control request is received from the caller application.
+ virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
+ //Used to send response message to AppControl requester.
+ void SendAppControlResponseMessage(Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pExtraData);
+
+ //Used to query whether application is initialized as AppControl.
+ bool IsOpenAsAppControl(void);
+ //Used to get the initial scene Id
+ Tizen::Ui::Scenes::SceneId GetInitialScene(void);
+ //Used to set initial scene id
+ void SetInitialScene(Tizen::Ui::Scenes::SceneId initialSceneId);
+ //Used to get launch arguments at application launch
+ Tizen::Base::Collection::IList* GetAppLaunchArguments(void);
+
+ void AddAppStateChangeListener(const IAppStateChangeListener& listener);
+ void RemoveAppStateChangeListener(const IAppStateChangeListener& listener);
+
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //Called when call state is changed
+ static void OnCallStateChange(keynode_t *node, void *user_data);
+
+private:
+ //internal function to process AppControl request.
+ void ProcessAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::String* pUriData, const Tizen::Base::Collection::IMap* pArgsMap);
+ //internal function to handle AppControl Request for Dial.
+ void HandleDialerAppControlRequest(RequestId reqId,const Tizen::Base::String* pUriData, const Tizen::Base::Collection::IMap* pArgsMap);
+ //internal function to handle AppControl Request for call Settings.
+ void HandleSettingsAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap);
+ //Used to destroy launch application pop-up
+ void DestroyLaunchOptionPopup();
+
+ long long GetAvailableMemory(void);
+
+private:
+ //Used to implement AppControl Specific features.
+ bool __isOpenAsAppControl;
+ Tizen::Base::Collection::ArrayList* __pLaunchArgs;
+ //Used to store initial scene id
+ Tizen::Ui::Scenes::SceneId __initialSceneId;
+ Tizen::Base::Collection::ArrayList __listenerList;
+ Tizen::Base::String __currentDisplayLanguage;
+ Tizen::Base::String __currentFontSize;
+ RequestId __appControlRequestId;
+ Tizen::Ui::Controls::Popup* __pAppPopup;
+ Tizen::Base::String __operatioID;
+};
+
+#endif // _PHN_PHONE_APP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPhoneAppFrame.h
+ * @brief This is the header file for the %PhoneAppFrame class.
+ *
+ * This header file contains the declarations for %PhoneAppFrame class.
+ */
+#ifndef _PHN_PHONE_APP_FRAME_H_
+#define _PHN_PHONE_APP_FRAME_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class PhoneAppFrame
+ * @brief This class presents a main application frame and performs scene registration.
+ *
+ */
+class PhoneAppFrame
+ : public Tizen::Ui::Controls::Frame
+{
+public:
+ PhoneAppFrame(void);
+ virtual ~PhoneAppFrame(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+};
+
+#endif // _PHN_PHONE_APP_FRAME_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPhoneFormFactory.h
+ * @brief This is the header file for the %FormFactory class.
+ *
+ * This header file contains the declarations for %FormFactory class.
+ */
+#ifndef _PHN_PHONE_FORM_FACTORY_H_
+#define _PHN_PHONE_FORM_FACTORY_H_
+
+#include <FUi.h>
+#include "PhnTypes.h"
+
+/**
+ * @class FormFactory
+ * @brief This class presents a form factory functionality for all forms.
+ *
+ */
+class FormFactory
+ : public Tizen::Ui::Scenes::IFormFactory
+{
+public:
+ FormFactory(void);
+ virtual ~FormFactory(void);
+
+ //Factory Method from IFormFactory
+ virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
+
+private:
+ //Used to create forms related to Call Settings module
+ Tizen::Ui::Controls::Form* CreateCallSettingsForm(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
+
+};
+
+#endif // _PHN_PHONE_FORM_FACTORY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnRetrieveSuggestionsTasks.h
+ * @brief This is the header file for the %RetrieveContactsListTask class.
+ *
+ * This header file contains the declarations for %RetrieveContactsListTask class.
+ */
+#ifndef _PHN_RETRIEVE_SUGGESTIONS_TASKS_H_
+#define _PHN_RETRIEVE_SUGGESTIONS_TASKS_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+
+class DialContactInfo;
+//class CallLogDetails;
+
+/**
+ * @class ISuggestionsRetrievedEventListener
+ * @brief This is event listener interface for informing that
+ * the retrieval of contact suggestion list is completed.
+ */
+class ISuggestionsRetrievedEventListener
+{
+public:
+ virtual ~ISuggestionsRetrievedEventListener(void){};
+
+ /**
+ * Called when the retrieval of contact suggestion list is completed.
+ * Ownership transferred for 'pContactsMap' to listener.
+ */
+ virtual void HandleContactsRetrievalCompleted(Tizen::Base::Collection::IList* pContactsMap) = 0;
+};
+
+/**
+ * @class RetrieveContactsListTask
+ * @brief This Class used to provide Thread functionality for all Search Tasks asynchronously.
+ *
+ */
+class RetrieveContactsListTask
+ : public Tizen::Base::Object
+ , public Tizen::Base::Runtime::IRunnable
+{
+public:
+ RetrieveContactsListTask( ISuggestionsRetrievedEventListener& pEventListener);
+ //Destructor
+ ~RetrieveContactsListTask(void);
+ //2nd phase contruct to initialize search string and old search results if present.
+ result Construct(Tizen::Base::String& searchString,const Tizen::Base::Collection::IList* oldSearchResults);
+ ///called when the thread for search task starts
+ virtual Tizen::Base::Object* Run(void);
+
+private:
+ //internal function to search speed-dial numbers and add to list
+ void SearchSpeedDialForNumberN(void);
+ //internal function to search contacts by phone number and add to list.
+ void SearchContactsForNumber(void);
+ //internal function to searches call logs for phone number and add to list.
+ /*void SearchCallLogsForNumber(void);*/
+ //internal function to search contacts by name and add to list.
+ void SearchContactsForName(void);
+ //internal function to save contacts starting with 'searchStr'.
+ void SearchContactsWithInitialChar(Tizen::Base::String& searchStr);
+ //internal function to update the already fetched suggestion list
+ void UpdateSuggestionList(void);
+
+ //internal function to save searched contact by number to single consolidated list.
+ void SaveContactsToListByNumber(Tizen::Base::Collection::IList& saveList, Tizen::Base::String& matchedString);
+ /**
+ * internal function to convert Contact to DialContactInfo.
+ * return null, if the contact does not have any phone numbers assigned to it.
+ */
+ DialContactInfo* ConvertToDialContactN(Tizen::Social::Contact& contact, Tizen::Base::String& matchedString, bool isSpeedDialContact = false);
+ /*DialContactInfo* ConvertLogDetailsToDialContactN(CallLogDetails& logDetails);*/
+
+private:
+ Tizen::Social::Addressbook* __pAddressBook;
+ ISuggestionsRetrievedEventListener& __pEventListener;
+ Tizen::Base::Collection::ArrayList* __pContactsList;
+ Tizen::Base::String* __pNumberStr;
+};
+
+/**
+ * @class SuggestionListComparer
+ * @brief This Class is used to compare 2 objects of 'DialContactInfo' type and returns the comparison results.
+ * This class can be used to sort an ArrayList of 'DialContactInfo' objects.
+ */
+class SuggestionListComparer
+: public Tizen::Base::Collection::IComparer
+{
+public:
+ SuggestionListComparer(){};
+ virtual ~SuggestionListComparer(){};
+ /**
+ * Used to compare two reference of 'DialContactInfo' and return 'cmpResult' as the comparison result.
+ *
+ * @code
+ * < 0 if the value of @c obj1 is less than the value of @c obj2
+ * == 0 if the value of @c obj1 is equal to the value of @c obj2
+ * > 0 if the value of @c obj1 is greater than the value of @c obj2
+ */
+ virtual result Compare(const Tizen::Base::Object& objRef1, const Tizen::Base::Object& objRef2, int& cmpResult) const;
+};
+
+#endif // _PHN_RETRIEVE_SUGGESTIONS_TASKS_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSceneRegister.h
+ * @brief This is the header file for the %SceneRegister class.
+ *
+ * This header file contains the declarations for %SceneRegister class.
+ */
+#ifndef _PHN_SCENE_REGISTER_H_
+#define _PHN_SCENE_REGISTER_H_
+
+#include "PhnTypes.h"
+
+/**
+ * @class SceneRegister
+ * @brief This class presents function to register all scenes.
+ *
+ */
+class SceneRegister
+{
+public:
+ SceneRegister(void);
+ ~SceneRegister(void);
+
+ //This function is used to register all scenes.
+ static result RegisterAllScenes(void);
+};
+
+#endif // _PHN_SCENE_REGISTER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsAddNumberForm.h
+ * @brief This is the header file for the %SettingsAddNumberForm class.
+ *
+ * This header file contains the declarations for %SettingsAddNumberForm class.
+ */
+#ifndef _PHN_SETTINGS_ADD_NUMBER_FORM_H_
+#define _PHN_SETTINGS_ADD_NUMBER_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class SettingsAddNumberForm
+ * @brief This class presents a settings form based UI for call settings.
+ *
+ */
+class SettingsAddNumberForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::ITextEventListener
+ , public Tizen::Ui::IKeypadEventListener
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+{
+public:
+ enum FormType
+ {
+ FORMTYPE_NUMBER_TO_REJECT,
+ FORMTYPE_AUTO_AREA_CODE,
+ };
+
+public:
+ SettingsAddNumberForm(FormType formType);
+ virtual ~SettingsAddNumberForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ //From IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //From ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+
+ //From IKeypadEventListener
+ virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
+ virtual void OnKeypadOpened(Tizen::Ui::Control& source);
+ virtual void OnKeypadClosed(Tizen::Ui::Control& source);
+ virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction){};
+ virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source){};
+
+ //Launches contacts app control for pick operation
+ void LaunchContactsAppControl(void);
+ //From IAppControlResponseListener
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+
+ // Called when a text is changed.
+ virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+ // Called when a change made to the text is canceled.
+ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //From IFormBackEventListener - Called when the current Form reverts back to the previous Form.
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //Searches addressbook for the number and sets the contact bitpmap
+ void SearchAndSetBitmapToContactButton(Tizen::Base::String& phoneNumber);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+private:
+ // This function is used to collapse selective groups while form initialization only.
+ void CollapseSelectiveGroups(Tizen::Ui::Controls::GroupedTableView* pMainMenuTableView);
+ //Function is used to initialize header and headerItems.
+ void InitializeHeaderAndFooter(void);
+ //Function is used to initialize numeric edit field.
+ void InitializeNumberEditField(Tizen::Ui::Controls::TableViewItem* pItem);
+ void UpdateCallRejectionDetail();
+ //Initialize group table view.
+ result InitializeGroupedTableView(void);
+ // This function is used to create list items which come under "GROUP_CRITERIA_OPTIONS".
+ Tizen::Ui::Controls::TableViewItem* CreateCriteriaOptionsMenuItem(int itemIndex, int itemWidth);
+ // This function is used to create "GROUP_ENTER_NUMBER".
+ Tizen::Ui::Controls::TableViewItem* CreateContactEditFieldItem(int itemWidth);
+ // This function is used to create "GROUP_SELECT_CRITERIA".
+ Tizen::Ui::Controls::TableViewItem* CreateExpandableCriteriaItem(int itemWidth);
+ // This function is used to handle selection of 'GROUP_SELECT_CRITERIA'.
+ void ToggleGroupExpansion(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex);
+ // This function is used to handle selection of matching criteria.
+ void HandleMatchingCriteriaSelected(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
+ //Function is used to go to previous form, based on current form state.
+ void GoBackToPreviousForm(void);
+ Tizen::Base::String FetchTextForCriteria(int itemIndex);
+ //Used to show error message box
+ void ShowDuplicateErrorMessageBox(Tizen::Base::String& message);
+ //Used to enable or disable save button
+ void EnableSaveButton(bool isEnable);
+ //Used to set selected contact's photo to Button
+ void SetBitmapToContactButton(Tizen::Graphics::Bitmap* pContactPhoto);
+ //Shows invalid contact pop-up
+ void ShowInvalidContactPopup(void);
+
+private:
+ //Main Group Items for group list view
+ enum CriteriaGroupId
+ {
+ GROUP_ENTER_NUMBER,
+ GROUP_SELECT_CRITERIA,
+ GROUP_CRITERIA_OPTIONS,
+ GROUP_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_ENTER_NUMBER'
+ enum GroupEnterNumberItems
+ {
+ ENTERNUMBER_EDITFIELD,
+ ENTERNUMBER_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_SELECT_CRITERIA'
+ enum GroupSelectCriteriaItems
+ {
+ SELECTCRITERIA_MATCH_CRITERIA,
+ SELECTCRITERIA_TOTALCOUNT,
+ };
+ //Items for 'GROUP_CRITERIA_OPTIONS'
+ enum GroupCriteriaOptionsItems
+ {
+ CRITERIAOPTIONS_EXACT,
+ CRITERIAOPTIONS_STARTSWITH,
+ CRITERIAOPTIONS_ENDSWITH,
+ CRITERIAOPTIONS_INCLUDE,
+ CRITERIAOPTIONS_TOTALCOUNT,
+ };
+ //used to store form state.
+ FormType __formType;
+ GroupCriteriaOptionsItems __selectedCriteria;
+ bool __isCriteriaOptionsMenuExpanded;
+ bool __isMatchCriteriaMenuItemSelected;
+ Tizen::Base::String __activePrefixDialingNumber;
+ bool __isContactAppControlLaunched;
+ Tizen::Ui::Controls::EditField* __pEditFieldNumber;
+ Tizen::Ui::Controls::Button* __pContactBtn;
+ bool __isKeypadShown;
+ Tizen::Ui::Controls::Popup* __pInvalidContactPopup;
+ Tizen::Base::String __editFieldText;
+ Tizen::Base::String __pickedContactId;
+};
+
+#endif //_PHN_SETTINGS_ADD_NUMBER_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsBarringPwdForm.h
+ * @brief This is the header file for the %SettingsBarringPwdForm class.
+ *
+ * This header file contains the declarations for %SettingsBarringPwdForm class.
+ */
+#ifndef _PHN_SETTINGS_BARRING_PWD_FORM_H_
+#define _PHN_SETTINGS_BARRING_PWD_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnErrorMsgPopup.h"
+#include "PhnTypes.h"
+
+/**
+ * @class SettingsBarringPwdForm
+ * @brief This class presents a settings form based UI for call settings barring password.
+ *
+ */
+class SettingsBarringPwdForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::ITextEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public IPopupClosedEventListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsBarringPwdForm(void);
+ virtual ~SettingsBarringPwdForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ //From IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //From ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ //From ITextEventListener
+ virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
+
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+
+ //From IFormBackEventListener - Called when the current Form reverts back to the previous Form.
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //Function is used to initialize header and footer items.
+ void InitializeHeaderAndFooter(void);
+ void ShowErrorMessage(int errorCode);
+
+private:
+ //call Barring condition to be set
+ CallBarringType __callBarringCondition;
+ //State of the condition to be set;
+ bool __conditionState;
+ //Ownership
+ ErrorMsgPopup* __pErrorMsgPopup;
+};
+
+#endif //_PHN_SETTINGS_BARRING_PWD_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallAccessoryForm.h
+ * @brief This is the header file for the %SettingsCallAccessoryForm class.
+ *
+ * This header file contains the declarations for %SettingsCallAccessoryForm class.
+ */
+#ifndef _PHN_SETTINGS_CALL_ACCESSORY_FORM_H_
+#define _PHN_SETTINGS_CALL_ACCESSORY_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsCallAccessoryForm
+ * @brief This class presents a settings form based UI for call settings - call status tones.
+ *
+ */
+class SettingsCallAccessoryForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsCallAccessoryForm(void);
+ virtual ~SettingsCallAccessoryForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //create call Accessory menu
+ result InitializeGroupedTableView(void);
+ // This function is used to collapse selective groups while form initialization only.
+ void CollapseSelectiveGroups(Tizen::Ui::Controls::GroupedTableView* pCallAccessoryTableView);
+ // This function is used to create list items which come under "GROUP_OUTCALL_CONDITION".
+ Tizen::Ui::Controls::TableViewItem* CreateExpandableItem(int groupIndex, int itemIndex, int itemWidth);
+ // This function is used to create list items which come under "GROUP_CALLERID_OPTIONS"
+ Tizen::Ui::Controls::TableViewItem* CreateOutCallConditionOptionsItem(int itemIndex, int itemWidth);
+ //Used to fetch text for outgoing call menu options
+ Tizen::Base::String FetchSubTextForOutCallConditionOptions(void);
+ // Function is used to handle item selection for "GROUP_CALLERID_OPTIONS"
+ void HandleOutCallConditionOptionsSelected(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus state);
+
+private:
+ //Groups for menu
+ enum TonesMenuGroupId
+ {
+ GROUP_BT_SETTINGS_HEADING,
+ GROUP_OUTCALL_CONDITION,
+ GROUP_OUTCALL_CONDITION_OPTIONS,
+ GROUP_OUTCALL_CONDITION_HLPTXT,
+ GROUP_TOTALCOUNT, //always the last element to get group count
+ };
+
+ //Items for "GROUP_OUTCALL_CONDITION" group
+ enum OutCallConditionItems
+ {
+ OUTCALL_CONDITION_MENU,
+ OUTCALL_CONDITION_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_OUTCALL_CONDITION_OPTIONS'
+ enum GroupOutCallConditionOptionsItems
+ {
+ OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE,
+ OUTCALL_CONDITION_MENUOPTION_UNLOCK_DEVICE,
+ OUTCALL_CONDITION_MENUOPTION_TOTALCOUNT, //No of options in drop down menu
+ };
+
+ //Singleton.
+ SettingsPresentationModel* __pSettingsPresentor;
+ bool __isCallConditionOptionsExpanded;
+};
+
+#endif //_PHN_SETTINGS_CALL_ACCESSORY_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallAnsweringForm.h
+ * @brief This is the header file for the %SettingsCallAnsweringForm class.
+ *
+ * This header file contains the declarations for %SettingsCallAnsweringForm class.
+ */
+#ifndef _PHN_SETTINGS_CALL_ANSWERING_FORM_H_
+#define _PHN_SETTINGS_CALL_ANSWERING_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsCallAnsweringForm
+ * @brief This class presents a settings form based UI for call settings - call status tones.
+ *
+ */
+class SettingsCallAnsweringForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsCallAnsweringForm(void);
+ virtual ~SettingsCallAnsweringForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //create call answering menu
+ result InitializeGroupedTableView(void);
+
+private:
+ //Groups for menu
+ enum TonesMenuGroupId
+ {
+ GROUP_ANSWER_CALL_KEY,
+ GROUP_ANSWER_CALL_KEY_HLPTXT,
+ GROUP_END_CALL_KEY,
+ GROUP_END_CALL_KEY_HLPTXT,
+ GROUP_TOTALCOUNT, //always the last element to get group count
+ };
+
+ //Items for "GROUP_ANSWER_CALL_KEY" group
+ enum AnswerCallItems
+ {
+ ANSWER_CALL_KEY_HOMEKEY,
+ ANSWER_CALL_TOTALCOUNT,
+ };
+
+ //Items for "GROUP_END_CALL_KEY" group
+ enum EndCallItems
+ {
+ END_CALL_KEY_POWERKEY,
+ END_CALL_KEY_TOTALCOUNT,
+ };
+ //Singleton.
+ SettingsPresentationModel* __pSettingsPresentor;
+};
+
+#endif //_PHN_SETTINGS_CALL_ANSWERING_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallForwardWaitBarrForm.h
+ * @brief This is the header file for the %SettingsCallForwardWaitBarrForm class.
+ *
+ * This header file contains the declarations for %SettingsCallForwardWaitBarrForm class.
+ */
+#ifndef _PHN_SETTINGS_CALL_FORWARD_WAIT_BARR_FORM_H_
+#define _PHN_SETTINGS_CALL_FORWARD_WAIT_BARR_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnErrorMsgPopup.h"
+#include "PhnISettingsEventListener.h"
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsCallForwardWaitBarrForm
+ * @brief This class presents a settings form based UI for call settings - Forwarding, waiting, barring call .
+ *
+ */
+class SettingsCallForwardWaitBarrForm
+ : public ISettingsEventListener
+ , public IPopupClosedEventListener
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ enum FormType
+ {
+ FORMTYPE_CALLFORWARDING_TYPE, //decide voice/video type for forwarding
+ FORMTYPE_VOICE_CALLFORWARDING, //actual options for call forwarding
+ FORMTYPE_CALLBARRING_TYPE, //decide voice/video type for barring
+ FORMTYPE_VOICE_CALLBARRING, //actual options for call barring
+ FORMTYPE_CALL_WAITING, //call waiting options
+ };
+
+public:
+ SettingsCallForwardWaitBarrForm(FormType formType);
+ virtual ~SettingsCallForwardWaitBarrForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ //From IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //From IFormBackEventListener
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //From ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+
+ //From ISettingsEventListener
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated);
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled);
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime);
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
+ virtual void HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated);
+ virtual void HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated);
+
+ virtual void HandleFlightMode(bool isFlightModeActivated){};
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+ //Function is used to initialize group table menu
+ result InitializeGroupedTableView(void);
+ // Function is used to create list items which come under "CallTypeItemIds"
+ Tizen::Ui::Controls::TableViewItem* CreateSettingCallTypeMenuItem(int itemIndex, int itemWidth);
+ // Function is used to handle item selection which come under "CallTypeItemIds"
+ void HandleCallTypeSelected(int itemIndex);
+ // Function is used to create list items under "CallForwardItemIds"
+ Tizen::Ui::Controls::TableViewItem* CreateCallForwardingOptions(int itemIndex, int itemWidth);
+ // Function is used to handle item selection for "CallForwardItemIds"
+ void HandleCallForwardingOptionSelected(int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
+ // Function is used to create list items only which come under "CallBarringItemIds"
+ Tizen::Ui::Controls::TableViewItem* CreateCallBarringOptions(int itemIndex, int itemWidth);
+ // Function is used to handle item selection for "CallBarringItemIds"
+ void HandleCallBarringOptionSelected(int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
+ // This function is used to create list items which come under "CallBarringItemIds"
+ Tizen::Ui::Controls::TableViewItem* CreateCallWaitingOptions(int itemIndex, int itemWidth);
+ // Function is used to handle item selection for "CallWaitingItemIds"
+ void HandleCallWaitingOptionSelected(Tizen::Ui::Controls::TableViewItem* pItem, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
+ // Used to show error message popup
+ void ShowErrorMessage(int errorCode);
+ //used to un-check all items in group
+ void UncheckAllOptions(void);
+ //Used to fetch processing animation and construct animation list.
+ void ConstructAnimationList(void);
+
+private:
+ //Groups supported by group table view
+ enum CallGroupTypes
+ {
+ CALLTYPE_GROUP,
+ CALLWAITING_GROUP,
+ CALLBARRING_GROUP,
+ CALLFORWARDING_GROUP,
+ CALLGROUP_COUNT,
+ };
+ //Setting ids for "CALLFORWARDING_GROUP" group
+ enum CallForwardItemIds
+ {
+ CALLFORWARD_ALWAYS,
+ CALLFORWARD_IF_BUSY,
+ CALLFORWARD_IF_NO_REPLY,
+ CALLFORWARD_IF_OUT_OF_REACH,
+ CALLFORWARD_TOTALITEMCOUNT, //always the last element to get settings count
+ };
+ //Setting ids for "CALLBARRING_GROUP" group
+ enum CallBarringItemIds
+ {
+ CALLBARRING_ALL_OUTGOING_CALL,
+ CALLBARRING_INTERNATIONAL_CALL,
+ CALLBARRING_INTERNATIONAL_EXCEPT_HOME,
+ CALLBARRING_ALL_INCOMING_CALL,
+ CALLBARRING_INCOMING_WHILE_ROAMING,
+ CALLBARRING_TOTALCOUNT, //always the last element to get settings count
+ };
+ //Setting ids for "CALLWAITING_GROUP" group
+ enum CallWaitingItemIds
+ {
+ CALLWAITING_ITEM,
+ CALLWAITING_TOTALCOUNT, //always the last element to get settings count
+ };
+
+ enum CallTypeItemIds
+ {
+ CALLTYPE_VOICE_CALL,
+// CALLTYPE_VIDEO_CALL,
+ CALLTYPE_TOTALCOUNT, //always the last element to get group count
+ };
+
+ //used to record which view to open - Call Forwarding, Barring, Waiting.
+ FormType __formType;
+ SettingsPresentationModel* __pSettingsPresentor;
+ //Ownership
+ ErrorMsgPopup* __pErrorMsgPopup;
+ //used to check if 'CALLFORWARD_ALWAYS' is activated
+ bool __isCallForwardAlwaysActivated;
+ //For processing animation
+ Tizen::Base::Collection::ArrayList* __pAnimationFrameList;
+ //Used to check if call waiting status is available.
+ bool __isCallWaitingStatusAvailable;
+ //Used to check the call barring status
+ bool __isCallBarringAllOutStatusAvailable;
+ bool __isCallBarringIntlCallStatusAvailable;
+ bool __isCallBarringIntlCallExptHomeStatusAvailable;
+ bool __isCallBarringIntlCallAllIncomingStatusAvailable;
+ bool __isCallBarringIntlCallIncomingRoamStatusAvailable;
+ //Used to check call waiting is Enabled
+ bool __isCallWaitingEnabled;
+ //Constants to save CallBarring values
+ bool __allOutGoingCalls;
+ bool __internationalCalls;
+ bool __internationalExceptHome;
+ bool __allIncomingCalls;
+ bool __incomingWhileRoaming;
+
+};
+
+#endif //_PHN_SETTINGS_CALL_FORWARD_WAIT_BARR_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallStatusTonesForm.h
+ * @brief This is the header file for the %SettingsCallStatusTonesForm class.
+ *
+ * This header file contains the declarations for %SettingsCallStatusTonesForm class.
+ */
+#ifndef _PHN_SETTINGS_CALL_STATUS_TONES_FORM_H_
+#define _PHN_SETTINGS_CALL_STATUS_TONES_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsCallStatusTonesForm
+ * @brief This class presents a settings form based UI for call settings - call status tones.
+ *
+ */
+class SettingsCallStatusTonesForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsCallStatusTonesForm(void);
+ virtual ~SettingsCallStatusTonesForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //create call reminders status menu
+ result InitializeGroupedTableView(void);
+
+private:
+ //Groups for menu
+ enum TonesMenuGroupId
+ {
+ GROUP_CALL_CONNECT,
+ GROUP_CALL_CONNECT_HLPTXT,
+ GROUP_CALL_REMINDER,
+ GROUP_CALL_REMINDER_HLPTXT,
+ GROUP_CALL_END,
+ GROUP_CALL_END_HLPTXT,
+ GROUP_TOTALCOUNT, //always the last element to get group count
+ };
+
+ //Items for "GROUP_CALL_CONNECT" group
+ enum CallConnectItems
+ {
+ CALLCONNECT_CONNECT_TONE,
+ CALLCONNECT_TOTALCOUNT,
+ };
+
+ //Items for "GROUP_CALL_REMINDER" group
+ enum CallReminderItems
+ {
+ CALLREMINDER_MINUTE_REMINDERS,
+ CALLREMINDER_TOTALCOUNT,
+ };
+
+ //Items for "GROUP_CALL_END" group
+ enum CallEndItems
+ {
+ CALLEND_END_TONE,
+ CALLEND_TOTALCOUNT,
+ };
+
+ //Singleton.
+ SettingsPresentationModel* __pSettingsPresentor;
+};
+
+#endif //_PHN_SETTINGS_CALL_STATUS_TONES_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsDeleteListForm.h
+ * @brief This is the header file for the %SettingsDeleteListForm class.
+ *
+ * This header file contains the declarations for %SettingsDeleteListForm class.
+ */
+#ifndef _PHN_SETTINGS_DELETE_LIST_FORM_H_
+#define _PHN_SETTINGS_DELETE_LIST_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnCallRejectInfo.h"
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsDeleteListForm
+ * @brief This class presents a settings form based UI for call settings - delete numbers to reject,
+ * delete rejection messages.
+ *
+ */
+class SettingsDeleteListForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+{
+public:
+ enum ListOfType
+ {
+ LISTOF_NUMBERS,
+ LISTOF_MESSAGES,
+ };
+
+public:
+ SettingsDeleteListForm(ListOfType listOfType);
+ virtual ~SettingsDeleteListForm(void);
+ void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //Initialize list view's main menu
+ result InitializeListView(void);
+ void ShowDeleteConfirmationPopup(int deleteCommandIdYes);
+
+ void InitializeSelectLabel();
+
+ //From IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
+
+ //From IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+private:
+ // Funtion is used to fetch list of rejected call numbers.
+ void FetchNumbersRejectList(void);
+ // Funtion is used to fetch list of "reject with messages".
+ void FetchRejectMsgsList(void);
+ // Funtion is used to initialise footer and footer items.
+ void InitializeFooter(void);
+ // Function is used to create "rejected number" items for list view.
+ Tizen::Ui::Controls::CustomItem* CreateListItemForNumbers(int index, int itemWidth);
+ // Function is used to create "reject with message" items for list view.
+ Tizen::Ui::Controls::CustomItem* CreateListItemForMsgs(int index, int itemWidth);
+ //used to select all items when selecting "Select All"
+ void SelectAllItems(bool isSelect);
+ //used to delete rejected numbers list
+ void DeleteRejectNumbersList(void);
+ //used to delete rejected messages list
+ void DeleteRejectMsgsList(void);
+
+private:
+ ListOfType __listOfType;
+ //list of rejected numbers
+ Tizen::Base::Collection::ArrayListT<CallRejectInfo>* __pNumbersList;
+ //list of reject msgs
+ Tizen::Base::Collection::IMapT<int, Tizen::Base::String>* __pMsgsMap;
+ //not owned
+ SettingsPresentationModel* __pSettingsPresentor;
+ int __checkedItemCount;
+ //Selected pop up label
+ Tizen::Ui::Controls::Label* __pSelectedLabel;
+ Tizen::Ui::Controls::Popup* __pConfirmationDeletePopup;
+};
+
+#endif //_PHN_SETTINGS_DELETE_LIST_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsEditRejectMsgForm.h
+ * @brief This is the header file for the %SettingsEditRejectMsgForm class.
+ *
+ * This header file contains the declarations for %SettingsEditRejectMsgForm class.
+ */
+#ifndef _PHN_SETTINGS_EDIT_REJECT_MSG_FORM_H_
+#define _PHN_SETTINGS_EDIT_REJECT_MSG_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsEditRejectMsgForm
+ * @brief This class presents a settings form based UI for editing reject messages from call settings.
+ *
+ */
+class SettingsEditRejectMsgForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::Ui::ITextEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ enum FormMode
+ {
+ FORMMODE_NEW_MESSAGE,
+ FORMMODE_EDIT_MESSAGE,
+ };
+
+public:
+ SettingsEditRejectMsgForm(FormMode formMode);
+ virtual ~SettingsEditRejectMsgForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From ITextEventListener
+ virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
+
+ //From IFormBackEventListener - Called when the current Form reverts back to the previous Form.
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //Function is used to initialize header and footer items.
+ void InitializeHeaderAndFooter(void);
+
+private:
+ int __itemIndex;
+ //used to store form mode.
+ FormMode __formMode;
+ SettingsPresentationModel* __pSettingsPresentor;
+ Tizen::Base::String __editRejectMsg;
+};
+
+#endif //_PHN_SETTINGS_EDIT_REJECT_MSG_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsForwardToNumberForm.h
+ * @brief This is the header file for the %SettingsForwardToNumberForm class.
+ *
+ * This header file contains the declarations for %SettingsForwardToNumberForm class.
+ */
+#ifndef _PHN_SETTINGS_FORWARD_TO_NUMBER_FORM_H_
+#define _PHN_SETTINGS_FORWARD_TO_NUMBER_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnTypes.h"
+#include "PhnErrorMsgPopup.h"
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsForwardToNumberForm
+ * @brief This class presents a settings form based UI for saving forwarding call settings.
+ *
+ */
+class SettingsForwardToNumberForm
+ : public IPopupClosedEventListener
+ , public ISettingsEventListener
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IKeypadEventListener
+ , public Tizen::Ui::ITextEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::App::IAppControlResponseListener
+{
+public:
+ enum ForwardCondition
+ {
+ FORWARDCONDITION,
+ FORWARDCONDITION_NOREPLY,
+ };
+
+public:
+ SettingsForwardToNumberForm(ForwardCondition forwardCondition);
+ virtual ~SettingsForwardToNumberForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+
+ //From IKeypadEventListener
+ virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
+ virtual void OnKeypadOpened(Tizen::Ui::Control& source){};
+ virtual void OnKeypadClosed(Tizen::Ui::Control& source);
+ virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction){};
+ virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source){};
+
+ //From ISettingsEventListener
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated){};
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled){};
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime);
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime){};
+ virtual void HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated){};
+ virtual void HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated){};
+ virtual void HandleFlightMode(bool isFlightModeActivated){}
+
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+
+ //Launches contacts app control for pick operation
+ void LaunchContactsAppControl(void);
+ //From IAppControlResponseListener
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ // Called when a text is changed.
+ virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+ // Called when a change made to the text is canceled.
+ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
+
+private:
+ // This function is used to collapse selective groups while form initialization only.
+ void CollapseSelectiveGroups(Tizen::Ui::Controls::GroupedTableView* pMainMenuTableView);
+ // Function is used to initialise header and headerItems.
+ void InitializeHeader(void);
+ // Funtion is use dto initalise numeric edit field.
+ void InitializeNumberEditField(void);
+ // Function is used to initialise group table view and add item provider.
+ result InitializeGroupedTableView(void);
+ // Function is used to create list items which come under "GroupWaitTimeOptionsItems".
+ Tizen::Ui::Controls::TableViewItem* CreateWaitingTimeOptionsMenuItems(int itemIndex, int itemWidth);
+ // This function is used to create "SELECTWAITTIME_WAIT_TIME".
+ Tizen::Ui::Controls::TableViewItem* CreateExpandableWaitingItem(int itemWidth);
+ // This function is used to handle selection of 'GroupSelectWaitTimeItems'.
+ void ToggleGroupExpansion(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex);
+ // This function is used to handle selection of waiting time.
+ void HandleSelectedWaitingTime(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
+ Tizen::Base::String FetchTextForSelectedOption(int selectedWaitTimeOption);
+ void ShowErrorMessage(int errorCode);
+
+private:
+ //Main groups available in list view.
+ enum WaitingTimeGroupId
+ {
+ GROUP_SELECT_WAIT_TIME,
+ GROUP_WAIT_TIME_OPTIONS,
+ GROUP_TOTALCOUNT,
+ };
+ //Items for 'GROUP_SELECT_WAIT_TIME'
+ enum GroupSelectWaitTimeItems
+ {
+ SELECTWAITTIME_WAIT_TIME,
+ SELECTWAITTIME_TOTALCOUNT, //No of options in "GROUP_ENTER_WAIT" drop down menu
+ };
+ //Items for 'GROUP_WAIT_TIME_OPTIONS'
+ enum GroupWaitTimeOptionsItems
+ {
+ WAITTIMEOPTIONS_FIVE_SEC = 5,
+ WAITTIMEOPTIONS_TEN_SEC = 10,
+ WAITTIMEOPTIONS_FIFTEEN_SEC = 15,
+ WAITTIMEOPTIONS_TWENTY_SEC = 20,
+ WAITTIMEOPTIONS_TWENTYFIVE_SEC = 25,
+ WAITTIMEOPTIONS_THIRTY_SEC = 30,
+ };
+
+ ForwardCondition __forwardCondition;
+ //call forward condition to be set
+ CallForwardCondition __callForwardCondition;
+ SettingsPresentationModel* __pSettingsPresentor;
+ GroupWaitTimeOptionsItems __selectedWaitTime;
+ bool __isWaitTimeOptionsMenuExpanded;
+ //Ownership
+ ErrorMsgPopup* __pErrorMsgPopup;
+};
+
+#endif //_PHN_SETTINGS_FORWARD_TO_NUMBER_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsMainMenuForm.h
+ * @brief This is the header file for the %SettingsMainMenuForm class.
+ *
+ * This header file contains the declarations for %SettingsMainMenuForm class.
+ */
+#ifndef _PHN_SETTINGS_MAIN_MENU_FORM_H_
+#define _PHN_SETTINGS_MAIN_MENU_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class SettingsMainMenuForm
+ * @brief This class presents a main menu form based UI for call settings.
+ *
+ */
+class SettingsMainMenuForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsMainMenuForm(void);
+ virtual ~SettingsMainMenuForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //update the table view bounds and table items based on current orientation
+ void UpdateTableViewBounds(Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //Function is used to initialize group table view.
+ result InitializeGroupedTableView(void);
+
+private:
+ //Groups for main menu
+ enum MainMenuGroupId
+ {
+ GROUP_CALL_REJECTION,
+ GROUP_CALL_REJECTION_HLPTXT,
+ GROUP_REJECT_MSG,
+ GROUP_REJECT_MSG_HLPTXT,
+ //GROUP_CALL_ANSWERING,
+ //GROUP_CALL_ANSWERING_HLPTXT,
+ GROUP_CALL_ACCESSORY,
+ GROUP_CALL_ACCESSORY_HLPTXT,
+ GROUP_MAIN_CALL_SETTINGS,
+// GROUP_VIDEOCALL_SETTING,
+// GROUP_VOICEMAIL_SETTING,
+ GROUP_TOTALCOUNT, //always the last element to get group count
+ };
+
+ //Items for 'GROUP_CALL_REJECTION'
+ enum GroupCallRejectionItems
+ {
+ CALLREJECTION_CALLREJECT_SETTINGS,
+ CALLREJECTION_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_REJECT_MSG'
+ enum GroupRejectMsgItems
+ {
+ REJECTMSG_REJECT_MESSAGES_SETTINGS,
+ REJECTMSG_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_CALL_ANSWERING'
+ enum GroupCallAnsweringItems
+ {
+ CALL_ANSWERING_KEY_SETTINGS,
+ CALL_ANSWERING_TOTALCOUNT,
+ };
+
+ //Items for 'GROUP_CALL_ACCESSORY'
+ enum GroupCallAccessoryItems
+ {
+ CALL_ACCESSORY_SETTINGS,
+ CALL_ACCESSORY_TOTALCOUNT,
+ };
+
+ //Setting id's for "GROUP_MAIN_CALL_SETTINGS" group
+ enum GroupMainCallSettingsItems
+ {
+ //MAINCALLSETTINGS_SPEEDDIAL,
+ MAINCALLSETTINGS_CALLFORWARDING,
+ MAINCALLSETTINGS_MORECALLSETTINGS,
+ MAINCALLSETTINGS_TOTALCOUNT, //always the last element to get settings count
+ };
+};
+
+#endif //_PHN_SETTINGS_MAIN_MENU_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsManager.h
+ * @brief This is the header file for the %SettingsManager class.
+ *
+ * This header file contains the declarations for %SettingsManager class.
+ */
+#ifndef _PHN_SETTINGS_MANAGER_H_
+#define _PHN_SETTINGS_MANAGER_H_
+
+#include <msg_types.h>
+#include <msg.h>
+#include <FBase.h>
+#include <FIo.h>
+#include <FSocial.h>
+#include <FSysSettingInfo.h>
+#include "ITapiCall.h"
+#include "ITapiSs.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelCall.h"
+#include "TelSs.h"
+#include "vconf.h"
+#include "PhnCallRejectInfo.h"
+#include "PhnISettingsEventListener.h"
+#include "PhnTypes.h"
+#include "PhnCallSettingDataService.h"
+
+/**
+ * @class SettingsManager
+ * @brief This class provides functionality to set and fetch settings related to voice call, e.g. Call barring,
+ * call forwarding, etc.
+ */
+class SettingsManager
+: public Tizen::System::ISettingEventListener
+{
+public:
+ //create a singleton instance
+ static SettingsManager* GetInstance(void);
+
+private:
+ //constructor
+ SettingsManager(void);
+ SettingsManager(SettingsManager& manager);
+ SettingsManager& operator =(const SettingsManager& manager);
+
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+
+public:
+ // Add the observer for setting events
+ void AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ //remove the observer for setting events
+ void RemoveSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ // Set the call Forwarding status
+ int SetCallForwardStatus(const Tizen::Base::String& phoneNumber, CallForwardCondition callFwdCondition, bool activateFwding, int noReplyTime = TAPI_SS_CF_NO_REPLY_TIME_30_SECS);
+ // Get the call Forwarding status
+ int GetCallForwardStatus(CallForwardCondition callFwdCondition);
+ // callback function to handle response for set call forward request
+ static void HandleSetForwardResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // callback function to handle response for get call forward request
+ static void HandleGetForwardResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // Set the call barring status
+ int SetCallBarringStatus(const Tizen::Base::String& password, CallBarringType callBarringType, bool activateBarring);
+ // callback function to handle response for set call barring request
+ static void HandleSetBarringResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // Get the call barring status
+ int GetCallBarringStatus(CallBarringType callBarringType);
+ // callback function to handle response for set call barring request
+ static void HandleGetBarringResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // Set the call waiting status
+ int SetCallWaitingStatus(bool activateWaiting);
+ // callback function to handle response for set call waiting request
+ static void HandleSetWaitingResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // Get the call waiting status
+ int GetCallWaitingStatus(void);
+ // callback function to handle response for set call waiting request
+ static void HandleGetWaitingResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData);
+ // Get the reject message list
+ Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
+ //Set the reject message count to 6
+ void SetRejectMessageListCount(void);
+ // Add/edit the message list at the given index
+ result SetRejectMessage(int messageIndex, const Tizen::Base::String& rejectMessage);
+ // delete the message from the list
+ result RemoveRejectMessage(const Tizen::Base::Collection::IListT<int>& deleteKeyList);
+ // get the prefix dialing list
+ Tizen::Base::Collection::IList* GetPrefixDialListN(void);
+ // Set the number to the prefix dial list
+ result SetPrefixDialNumber(int phoneNumberIndex, const Tizen::Base::String& phoneNumber);
+ // Get the number set at 'phoneNumberIndex'.
+ result GetPrefixDialNumberAtIndex(int phoneNumberIndex, Tizen::Base::String& phoneNumber);
+ // Set the prefix dial status
+ result SetPrefixDialingStatus(bool enablePrefixDialing);
+ // Set the active prefix dial to be used
+ result SetActivePrefixDialingValue(int prefixDialIndex);
+ // Get the active prefix dial to be used
+ result GetActivePrefixDialingValue(int& prefixDialIndex);
+ // Get the prefix dialing status
+ bool GetPrefixDialingStatus(void);
+ // Set the video call image path
+ result SetVideoCallImagePath(const Tizen::Base::String& imagePath);
+ // Get the video call image path
+ result GetVideoCallImagePath(Tizen::Base::String& imagePath);
+ // Set the call line identity
+ result SetCallLineIdentity(CallLineIdentity identity);
+ // Get the call line identity
+ result GetCallLineIdentity(CallLineIdentity& identity);
+ // Add the number to the call reject list
+ result AddToCallRejectList(const Tizen::Base::String& phoneNumber, CallRejectMatchCondition rejectCondition, bool isActivated = false);
+ // Add the number to the message reject list
+ result AddToMessageRejectList(const Tizen::Base::String& phoneNumber, _MSG_FILTER_TYPE_E matchType);
+ bool GetMsgFilterListIndex(const Tizen::Base::String& phoneNumber);
+ Tizen::Base::String* GetFilterText(int index, int type);
+ //Open message handle session
+ result OpenMsgHandleSession();
+ //Closes message handle session
+ void CloseMsgHandleSession();
+ // Get the call reject list
+ Tizen::Base::Collection::IListT<CallRejectInfo>* GetCallRejectList(void);
+ // Update the call reject number already present
+ result UpdateCallRejectRow(int rowId, const Tizen::Base::String& phoneNumber, bool activate, CallRejectMatchCondition rejectCondition);
+ // Remove the call reject item
+ result RemoveCallRejectRow(int rowId);
+ // Set the reject "unknown" status
+ result SetUnknownRejectStatus(bool activate);
+ // Get the reject "unknown" status
+ bool GetUnknownRejectStatus(void);
+ // checks if the call is to be rejected
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+ // Set the call alert status
+ result SetCallAlertStatus(CallAlertStatus callAlertStatus);
+ // Get the call alert status
+ result GetCallAlertStatus(CallAlertStatus& callAlertStatus);
+ // Set the call connect tone status
+ result SetCallConnectToneStatus(bool activate);
+ // Get the call connect tone status
+ bool GetCallConnectToneStatus(void);
+ // Set the minute minder tone status
+ result SetMinuteMinderToneStatus(bool activate);
+ // Get the minute minder tone status
+ bool GetMinuteMinderToneStatus(void);
+ // Set the call End tone status
+ result SetCallEndToneStatus(bool activate);
+ // Get the call End tone status
+ bool GetCallEndToneStatus(void);
+ //Set the speed dial mapping
+ result SetSpeedDialMapping(const Tizen::Base::String& contactId, int numberToMap);
+ // Get the speed dial mapping list
+ Tizen::Base::Collection::IMapT<int,SpeedDialInfo>* GetSpeedDialMappingN(void);
+ //Remove the speed dial mapping
+ result RemoveSpeedDialMapping(int rowId);
+ //Change the speed dial mapped
+ result UpdateSpeedDialMapping(int rowId, const Tizen::Base::String& contactId, int numberToMap);
+ //fetch the mapped speed dial contact no.
+ Tizen::Base::String* GetMappedSpeedDialNumberN(int aIndex);
+ //Fetch Contacts details by contact id
+ Tizen::Social::Contact* FetchContactDetailsN(const Tizen::Base::String& contactId);
+ //Sets the Call State
+ result SetCallState(CallState callState);
+ //Get the Call State
+ result GetCallState(CallState& callState);
+ // Activate or Deactivate Home Key to accept the incoming calls.
+ result EnableCallAnsweringKey(bool activate);
+ // Check if incoming call is accepted by Home Key.
+ bool IsCallAnsweringKeyEnabled(void);
+ // Activate or Deactivate Power Key to end the calls.
+ result EnableCallEndingKey(bool activate);
+ // Check if call is ended by Power Key.
+ bool IsCallEndingKeyEnabled(void);
+ // Activate or De-activate outgoing calls when device is locked.
+ // activate = true, to enable making calls when device is locked.
+ result EnableOutgoingCallWhenLocked(bool activate);
+ // Check if making call is possible when device is locked.
+ bool IsOutgoingCallEnabledWhenLocked(void);
+
+ void AddSystemEventListener(void);
+
+ void RemoveSystemEventListener(void);
+
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+
+ bool GetFlightModeStatus(void);
+
+private:
+
+ enum ForwardResponseType
+ {
+ SET_CALLFORWARD_RESPONSE,
+ GET_CALLFORWARD_RESPONSE,
+ };
+ enum BarringResponseType
+ {
+ SET_CALLBARRING_RESPONSE,
+ GET_CALLBARRING_RESPONSE,
+ };
+ enum WaitingResponseType
+ {
+ SET_CALLWAITING_RESPONSE,
+ GET_CALLWAITING_RESPONSE,
+ };
+private:
+ virtual ~SettingsManager(void);
+ //notify event listeners for Setting or Getting Call Forwarding status events.
+ void NotifyForwardingEventListeners(ForwardResponseType responseType, bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
+ //notify event listeners for Setting or Getting Call Barring status events.
+ void NotifyBarringEventListeners(BarringResponseType responseType, int result, CallBarringType callBarringType, bool isBarringActivated);
+ //notify event listeners for Setting or Getting Call Waiting status events.
+ void NotifyWaitingEventListeners(WaitingResponseType responseType, bool isCallSuccessful, bool isCallWaitingActivated);
+
+private:
+ static SettingsManager* __pInstance;
+ //handle to Telephony API
+ TapiHandle* __pTapiHandle;
+ Tizen::Base::Collection::ArrayListT<ISettingsEventListener*>* __pSettingsEventListener;
+ CallSettingDataService* __pCallSettingDataService;
+ msg_handle_t __pMsgHandle;
+ msg_struct_list_s* __pFilterList; //! List of filter
+ Tizen::Base::Collection::ArrayListT<int>* __pNumberFilterIndex;
+};
+
+#endif // _PHN_SETTINGS_MANAGER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsMoreOptionsForm.h
+ * @brief This is the header file for the %SettingsMoreOptionsForm class.
+ *
+ * This header file contains the declarations for %SettingsMoreOptionsForm class.
+ */
+#ifndef _PHN_SETTINGS_MORE_OPTIONS_FORM_H_
+#define _PHN_SETTINGS_MORE_OPTIONS_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsMoreOptionsForm
+ * @brief This class presents a additional settings form for call settings.
+ *
+ */
+class SettingsMoreOptionsForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsMoreOptionsForm(void);
+ virtual ~SettingsMoreOptionsForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ // Function is used to initialise group table view.
+ result InitializeGroupedTableView(void);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ // This function is used to create list items which come under "GROUP_CALLERID" & "GROUP_CALL_ALERT".
+ Tizen::Ui::Controls::TableViewItem* CreateExpandableItem(int groupIndex, int itemIndex, int itemWidth);
+ // This function is used to create list items which come under "GROUP_CALLERID_OPTIONS"
+ Tizen::Ui::Controls::TableViewItem* CreateCallerIdOptionsItem(int itemIndex, int itemWidth);
+ // This function is used to create list items which come under "GROUP_CALL_ALERT_OPTIONS"
+ Tizen::Ui::Controls::TableViewItem* CreateCallerAlertOptionsItem(int itemIndex, int itemWidth);
+ // This function is used to create list menu items
+ Tizen::Ui::Controls::TableViewItem* CreateSettingMenuItem(int groupIndex, int itemIndex, int itemWidth);
+ // Function is used to handle item selection for individual items.
+ void HandleSelectedSettings(int groupIndex, int itemIndex);
+ // Function is used to handle item selection for "GROUP_CALLERID_OPTIONS"
+ void HandleSelectedCallerIdOptions(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus state);
+ // Function is used to handle item selection for "GROUP_CALL_ALERT_OPTIONS"
+ void HandleSelectedCallAlertOptions(Tizen::Ui::Controls::GroupedTableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus state);
+ //Function to fetch text for caller id options
+ Tizen::Base::String FetchSubTextForSelectedCallerId();
+ //Function to fetch text for caller alert options
+ Tizen::Base::String FetchSubTextForSelectedCallerAlert();
+ //update the table view bounds and table items based on current orientation
+ void UpdateTableViewBounds(Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ //Groups
+ enum MoreMenuGroupId
+ {
+ GROUP_CALLERID,
+ GROUP_CALLERID_OPTIONS,
+ GROUP_CALL_SETTINGS,
+ GROUP_CALL_SETTINGS_HLPTXT,
+ GROUP_CALL_REMINDER,
+ GROUP_CALL_REMINDER_HLPTXT,
+ //GROUP_CALL_ALERT,
+ //GROUP_CALL_ALERT_OPTIONS,
+ GROUP_AREACODE,
+ GROUP_AREACODE_HLPTXT,
+ GROUP_TOTALCOUNT, //always the last element to get group count
+ };
+ //Items for 'GROUP_CALLERID'
+ enum GroupCallerIdItems
+ {
+ CALLERID_CALLER_SETTING,
+ CALLERID_TOTALCOUNT,
+ };
+ //Items for 'GROUP_CALLERID_OPTIONS'
+ enum GroupCallerIdOptionsItems
+ {
+ CALLEROPTIONS_BY_NETWORK,
+ CALLEROPTIONS_SHOW,
+ CALLEROPTIONS_HIDE,
+ CALLEROPTIONS_TOTALCOUNT, //No of options in "caller id" drop down menu
+ };
+ //Items for "GROUP_CALL_SETTINGS" group
+ enum CallSettingsItems
+ {
+ CALLSETTINGS_CALL_BARRING,
+ CALLSETTINGS_CALL_WAITING,
+ CALLSETTINGS_TOTALCOUNT,
+ };
+ //Items for "GROUP_CALL_REMINDER" group
+ enum CallReminderItems
+ {
+ CALLREMINDER_STATUS_TONES,
+ CALLREMINDER_TOTALCOUNT,
+ };
+ //Item for "GROUP_CALL_ALERT"
+ enum GroupCallAlertItems
+ {
+ CALLALERT_SETTING,
+ CALLALERT_TOTALCOUNT,
+ };
+ //Option Items for "GROUP_CALL_ALERT_OPTIONS"
+ enum GroupCallAlertOptionsItems
+ {
+ CALLALERT_OPTIONS_OFF,
+ CALLALERT_OPTIONS_SOUND,
+ CALLALERT_OPTIONS_VIBRATION,
+ CALLALERT_OPTIONS_TOTALCOUNT,
+ };
+ //Item for "GROUP_AREACODE" group
+ enum GroupAreaCodeItems
+ {
+ AREACODE_AUTO_AREA_CODE,
+ AREACODE_TOTALCOUNT,
+ };
+
+ SettingsPresentationModel* __pSettingsPresentor;
+ bool __isCallerIdExpanded;
+ bool __isCallAlertExpanded;
+ Tizen::Base::String __autoAreaCode;
+};
+
+#endif //_PHN_SETTINGS_MORE_OPTIONS_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsPresentationModel.h
+ * @brief This is the header file for the %SettingsPresentationModel class.
+ *
+ * This header file contains the declarations for %SettingsPresentationModel class.
+ */
+#ifndef _PHN_SETTINGS_PRESENTATION_MODEL_H_
+#define _PHN_SETTINGS_PRESENTATION_MODEL_H_
+
+#include <FSocial.h>
+#include <msg_types.h>
+#include "PhnISettingsEventListener.h"
+
+class SettingsManager;
+class CallRejectInfo;
+class SpeedDialInfo;
+
+/**
+ * @class SettingsPresentationModel
+ * @brief This class provides data to settings forms and provides functions
+ * to interact with Settings manager.
+ *
+ */
+class SettingsPresentationModel: public ISettingsEventListener
+{
+public:
+ //create a singleton instance
+ static SettingsPresentationModel* GetInstance(void);
+
+private:
+ SettingsPresentationModel(void);
+ SettingsPresentationModel(SettingsPresentationModel& presentor);
+ virtual ~SettingsPresentationModel(void);
+ SettingsPresentationModel& operator =(const SettingsPresentationModel& presentor);
+
+ //perform 2nd phase initialization
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+
+public:
+ // Add the observer for setting events
+ result AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ //remove the observer for setting events
+ void RemoveSettingEventListener(void);
+
+ // Get the reject message list
+ Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
+ //Set the reject message list count
+ void SetRejectMessageListCount(void);
+ // Add the number to the call reject list
+ result AddToCallRejectList(const Tizen::Base::String& phoneNumber, CallRejectMatchCondition rejectCondition, bool isActivated = false);
+ // Add the number to the message reject list
+ result AddToMessageRejectList(const Tizen::Base::String& phoneNumber, _MSG_FILTER_TYPE_E matchType);
+ bool GetMsgFilterListIndex(const Tizen::Base::String& phoneNumber);
+ // Get the call reject list
+ Tizen::Base::Collection::IListT<CallRejectInfo>* GetCallRejectList(void);
+ // Set the number to the prefix dial list
+ result SetPrefixDialNumber(int phoneNumberIndex, const Tizen::Base::String& phoneNumber);
+ // Set the active prefix dial to be used
+ result SetActivePrefixDialingValue(int prefixDialIndex);
+ // Set the prefix dial status
+ result SetPrefixDialingStatus(bool enablePrefixDialing);
+ // Get the active prefix dial number to be used
+ result GetActivePrefixDialNumber(Tizen::Base::String& phoneNumber);
+ // Set the call barring status
+ int SetCallBarringStatus(const Tizen::Base::String& password, CallBarringType callBarringType, bool activateBarring);
+ // Get the call Forwarding status
+ int GetCallForwardStatus(CallForwardCondition callFwdCondition);
+ // Set the call Forwarding status
+ int SetCallForwardStatus(const Tizen::Base::String& phoneNumber, CallForwardCondition callFwdCondition, bool activateFwding, int noReplyTime);
+ // Get the call barring status
+ int GetCallBarringStatus(CallBarringType callBarringType);
+ // Set the call waiitng status
+ int SetCallWaitingStatus(bool activateWaiting);
+ // Get the call waiting status
+ int GetCallWaitingStatus(void);
+ // Set the call connect tone status
+ result SetCallConnectToneStatus(bool activate);
+ // Get the call connect tone status
+ bool GetCallConnectToneStatus(void);
+ // Set the minute minder tone status
+ result SetMinuteMinderToneStatus(bool activate);
+ // Get the minute minder tone status
+ bool GetMinuteMinderToneStatus(void);
+ // Set the call End tone status
+ result SetCallEndToneStatus(bool activate);
+ // Get the call End tone status
+ bool GetCallEndToneStatus(void);
+ // Update the call reject number already present
+ result UpdateCallRejectRow(int rowId, const Tizen::Base::String& phoneNumber, bool activate, CallRejectMatchCondition rejectCondition);
+ // Remove the call reject item
+ result RemoveCallRejectRow(int rowId);
+ // Add/edit the message list at the given index
+ result SetRejectMessage(int messageIndex, const Tizen::Base::String& rejectMessage);
+ // delete the message from the list
+ result RemoveRejectMessage(const Tizen::Base::Collection::IListT<int>& deleteKeyList);
+ // checks if the call is to be rejected
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+ //Set the speed dial mapping
+ result SetSpeedDialMapping(const Tizen::Base::String& contactId, int numberToMap);
+ // Get the speed dial mapping list
+ Tizen::Base::Collection::IMapT<int,SpeedDialInfo>* GetSpeedDialMappingN(void);
+ //remove speed dial mapping for given 'rowId'.
+ result RemoveSpeedDialMapping(int rowId);
+ //update speed dial mapping for given 'rowId'.
+ result UpdateSpeedDialMapping(int rowId, const Tizen::Base::String& contactId, int numberToMap);
+ // Set the call line identity
+ result SetCallLineIdentity(CallLineIdentity identity);
+ // Get the call line identity
+ result GetCallLineIdentity(CallLineIdentity& identity);
+ // Set the call alert status
+ result SetCallAlertStatus(CallAlertStatus callAlertStatus);
+ // Get the call alert status
+ result GetCallAlertStatus(CallAlertStatus& callAlertStatus);
+ // Set the reject "unknown" status
+ result SetUnknownRejectStatus(bool activate);
+ // Get the reject "unknown" status
+ bool GetUnknownRejectStatus(void);
+ //Fetch Contacts details by contact id
+ Tizen::Social::Contact* FetchContactDetailsN(const Tizen::Base::String& contactId);
+ //Sets the call state
+ result SetCallState(CallState callState);
+ //Get the call state
+ result GetCallState(CallState& callState);
+ //Get Flight mode status
+ bool GetFlightModeStatus(void);
+ // Activate or Deactivate Home Key to accept the incoming calls.
+ result EnableCallAnsweringKey(bool activate);
+ // Check if incoming call is accepted by Home Key.
+ bool IsCallAnsweringKeyEnabled(void);
+ // Activate or Deactivate Power Key to end the calls.
+ result EnableCallEndingKey(bool activate);
+ // Check if call is ended by Power Key.
+ bool IsCallEndingKeyEnabled(void);
+ // Activate or De-activate outgoing calls when device is locked.
+ // activate = true, to enable making calls when device is locked.
+ result EnableOutgoingCallWhenLocked(bool activate);
+ // Check if making call is possible when device is locked.
+ bool IsOutgoingCallEnabledWhenLocked(void);
+
+protected:
+ //From ISettingsEventListener
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated);
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled);
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime);
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
+ virtual void HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated);
+ virtual void HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated);
+ virtual void HandleFlightMode(bool isFlightModeActivated){};
+
+private:
+ static SettingsPresentationModel* __pInstance;
+ //Owned. Is responsible for destroying the instance
+ SettingsManager* __pSettingsMgr;
+ ISettingsEventListener* __pSettingsEventListener;
+};
+
+#endif // _PHN_SETTINGS_PRESENTATION_MODEL_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsRejectListForm.h
+ * @brief This is the header file for the %SettingsRejectListForm class.
+ *
+ * This header file contains the declarations for %SettingsRejectListForm class.
+ */
+#ifndef _PHN_SETTINGS_REJECT_LIST_FORM_H_
+#define _PHN_SETTINGS_REJECT_LIST_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "PhnCallRejectInfo.h"
+#include "PhnIAppStateChangeListner.h"
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsRejectListForm
+ * @brief This class presents a form based UI for call settings.
+ *
+ */
+class SettingsRejectListForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public IAppStateChangeListener
+{
+public:
+ SettingsRejectListForm(void);
+ virtual ~SettingsRejectListForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //From IAppStateChangeListener
+ virtual void OnForeground(void);
+ virtual void OnBackground(void);
+ void UpdateRejectTableView(void);
+
+private:
+ // Function is used to initialize group list view.
+ result InitializeGroupedTableView(void);
+ // Function is used to fetch list of "rejected call numbers".
+ void FetchNumbersRejectList(void);
+ // Function is used to initialize footer and footer items.
+ void InitializeFooter(void);
+
+private:
+ //list of rejected call numbers fetched from Db.
+ Tizen::Base::Collection::ArrayListT<CallRejectInfo>* __pNumbersList;
+ //matching criteria
+ enum MatchingCriteriaId
+ {
+ CRITERIAID_EXACT,
+ CRITERIAID_STARTSWITH,
+ CRITERIAID_ENDSWITH,
+ CRITERIAID_INCLUDE,
+ };
+ SettingsPresentationModel* __pSettingsPresentor;
+};
+
+#endif //_PHN_SETTINGS_REJECT_LIST_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsRejectListForm.h
+ * @brief This is the header file for the %SettingsRejectMsgsForm class.
+ *
+ * This header file contains the declarations for %SettingsRejectMsgsForm class.
+ */
+#ifndef _PHN_SETTINGS_REJECT_MSGS_FORM_H_
+#define _PHN_SETTINGS_REJECT_MSGS_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class SettingsPresentationModel;
+
+/**
+ * @class SettingsRejectMsgsForm
+ * @brief This class presents a additional settings form for storing reject messages.
+ *
+ */
+class SettingsRejectMsgsForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedTableViewItemProvider
+ , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ SettingsRejectMsgsForm(void);
+ virtual ~SettingsRejectMsgsForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewGroupItem is changed.
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ //From IGroupedTableViewItemEventListener - Called when the state of a TableViewItem in the GroupedTableView is changed.
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ //From IGroupedTableViewItemEventListener - Called when the TableViewContextItem is opened or closed.
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+
+ //From IGroupedTableViewItemProvider - Gets the total number of groups.
+ virtual int GetGroupCount(void);
+ //From IGroupedTableViewItemProvider - Gets the total number of items in the specified group.
+ virtual int GetItemCount(int groupIndex);
+ //From IGroupedTableViewItemProvider - Gets the group item for the specified index from the item provider.
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified group item.
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified group item.
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ //From IGroupedTableViewItemProvider - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ //From IGroupedTableViewItemProvider - Deletes the specified item.
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Updates the specified item.
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ //From IGroupedTableViewItemProvider - Gets the default height of an group item.
+ virtual int GetDefaultGroupItemHeight(void);
+ //From IGroupedTableViewItemProvider - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ // Function is used to initialise group list view.
+ result InitializeGroupedTableView(void);
+ // Function is used to fetch list of "rejected with messages".
+ void FetchRejectMsgs(void);
+ void SetRejectMessageCount(void);
+ // Function is used to initialise footer and footer items.
+ void InitializeFooter(void);
+
+private:
+ //list of reject messages fetched from Db.
+ Tizen::Base::Collection::IMapT<int, Tizen::Base::String>* __pMsgsMap;
+ //settings presentation model
+ SettingsPresentationModel* __pSettingsPresentor;
+ //footer action id
+ enum FooterActionId
+ {
+ IDA_ADD_FOOTER_ITEMID,
+ IDA_DELETE_FOOTER_ITEMID,
+ IDA_CANCEL_FOOTER_ITEMID,
+ };
+ //matching criteria
+ enum MatchingCriteriaId
+ {
+ CRITERIAID_EXACT,
+ CRITERIAID_STARTSWITH,
+ CRITERIAID_ENDSWITH,
+ CRITERIAID_INCLUDE,
+ };
+};
+
+#endif //_PHN_SETTINGS_REJECT_MSGS_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsSpeedDialForm.h
+ * @brief This is the header file for the %SettingsSpeedDialForm class.
+ *
+ * This header file contains the declarations for %SettingsSpeedDialForm class.
+ */
+#ifndef _PHN_SETTINGS_SPEED_DIAL_FORM_H_
+#define _PHN_SETTINGS_SPEED_DIAL_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FSocial.h>
+#include "PhnTypes.h"
+#include "PhnSpeedDialPopup.h"
+#include "PhnIPopupItemSelectListener.h"
+#include "PhnIAppStateChangeListner.h"
+
+class SettingsPresentationModel;
+class SpeedDialInfo;
+
+/**
+ * @class SettingsSpeedDialForm
+ * @brief This class presents a additional settings form for setting and updating speed dial settings.
+ *
+ */
+class SettingsSpeedDialForm
+ : public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public IPopupItemSelectListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public IAppStateChangeListener
+{
+public:
+ SettingsSpeedDialForm(void);
+ virtual ~SettingsSpeedDialForm(void);
+ bool Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ //From IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //From IFormBackEventListener
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ //From ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ //From IAppControlResponseListener
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ //From IPopupEventListener
+ void OnItemSelected(int itemIndex);
+ //Update or Close Invalid Contact Popup
+ void UpdateInvalidContactPopup(const Tizen::Social::ContactChangeInfo* pInfo);
+ //From IAddressbookEventListener
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList){};
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+ //Called when application come to foreground
+ virtual void OnForeground(void);
+ virtual void OnBackground(void) {};
+
+ void ShowInvalidContactPopup(const Tizen::Base::String& contactDisplayName);
+
+private:
+ // Function is used to initialise footer and footer items.
+ void InitializeFooter(void);
+ // Function is used to initialise buttons and add listener.
+ void InitializePhotoButtons(const Tizen::Base::String& btnName, const Tizen::Base::String& lblName, ActionId actionId);
+ // Function is used to initialise voice mail button and add listener.
+ //void InitializeVoiceMail(void);
+ //Launches contacts app control for pick operation
+ void LaunchAppControl(void);
+ // updates the button according to the button clicked
+ void UpdateButton(void);
+ // updates all buttons
+ void UpdateAllButtons(void);
+ //Used to reinitalize speed dial delete list
+ void ReInitializeDeleteList(void);
+ void SetDefaultImageAndLabelToButton(Tizen::Ui::Controls::Button& btn, Tizen::Ui::Controls::Label& lbl, ActionId actionId);
+ Tizen::Social::Contact* GetSpeedDialMappedContact(ActionId actionId);
+ void SetContactThumbnailToButton(Tizen::Ui::Controls::Button& speedDialButton, Tizen::Graphics::Bitmap& contactPhoto, ActionId actionId);
+ void SetCheckIconInDeleteMode(Tizen::Ui::Controls::Button& speedDialButton, Tizen::Graphics::Bitmap& contactPhoto, ActionId actionId);
+ void DrawNumericEnrichedTxtToCanvas(Tizen::Base::String& number, Tizen::Graphics::Canvas& canvas);
+
+private:
+ Tizen::Base::Collection::HashMapT<int,SpeedDialInfo>* __pSpeedDialMappingList;
+ //Singleton do not delete
+ SettingsPresentationModel* __pSettingsPresentor;
+ int __keyToMap;
+ bool __isUpdate;
+ bool __isDeleteMode;
+ Tizen::Social::Addressbook* __pAddressbook;
+ SpeedDialPopup* __pSpeedDialPopup;
+ Tizen::Base::Collection::ArrayListT<int>* __pDeleteList;
+ Tizen::Ui::Scenes::SceneId* __pPreviousSceneId;
+ bool __isContactAppControlLaunched;
+ Tizen::Ui::Controls::Popup* __pInvalidContactPopup;
+ Tizen::Social::RecordId __invalidContactRecordId;
+ bool __contactUpdate; // Do not remove the CheckMark on SpeedDialButton if its just a contact Update
+};
+
+#endif //_PHN_SETTINGS_SPEED_DIAL_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSpeedDialInfo.h
+ * @brief This is the header file for the %SpeedDialInfo class.
+ *
+ * This header file contains the declarations for %SpeedDialInfo class.
+ */
+#ifndef _PHN_SPEED_DIAL_INFO_H_
+#define _PHN_SPEED_DIAL_INFO_H_
+
+#include <FBase.h>
+#include "PhnTypes.h"
+
+/**
+ * @class SpeedDialInfo
+ * @brief This class holds information about speed dial mappings fetched/stored from database.
+ *
+ */
+class SpeedDialInfo
+ : public Tizen::Base::Object
+{
+
+public:
+ // Default Constructor
+ SpeedDialInfo(void);
+ virtual ~SpeedDialInfo(void);
+ /**
+ * This is the equality operator for this SpeedDialInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ bool operator ==(const SpeedDialInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this SpeedDialInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ bool operator !=(const SpeedDialInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ SpeedDialInfo& operator =(const SpeedDialInfo& rhs);
+
+public:
+ int rowId;
+ int keyMapping;
+ Tizen::Base::String contactId;
+};
+
+#endif // _PHN_SPEED_DIAL_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSpeedDialPopup.h
+ * @brief This is the header file for the %SpeedDialPopup class.
+ *
+ * This header file contains the declarations for %SpeedDialPopup class.
+ */
+#ifndef _PHN_SPEED_DIAL_POPUP_H_
+#define _PHN_SPEED_DIAL_POPUP_H_
+
+#include <FApp.h>
+#include <FUi.h>
+
+#include "PhnIPopupItemSelectListener.h"
+
+/**
+ * @class SpeedDialPopup
+ * @brief This class provides popup messages in Speed dial settings form.
+ *
+ */
+class SpeedDialPopup
+ : public Tizen::Ui::Controls::Popup
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+{
+
+public:
+ SpeedDialPopup(IPopupItemSelectListener& listener);
+ virtual ~SpeedDialPopup(void);
+ int Initialize(void);
+
+ // IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
+
+ //IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ // From IActionEventListener
+ void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+private:
+ void ConstructListData(void);
+
+private:
+ Tizen::Ui::Controls::Button* __pCancelButton;
+ IPopupItemSelectListener& __popupListener;
+ Tizen::Base::Collection::ArrayList* __pListItemArray;
+};
+
+#endif // _PHN_SPEED_DIAL_POPUP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSuggestionItemProvider.h
+ * @brief This is the header file for the %SuggestionItemProvider class.
+ *
+ * This header file contains the declarations for %SuggestionItemProvider class.
+ */
+#include <FBase.h>
+#include <FUi.h>
+
+#ifndef _PHN_SUGGESTION_ITEM_PROVIDER_H_
+#define _PHN_SUGGESTION_ITEM_PROVIDER_H_
+
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+class DialPresentationModel;
+
+/**
+ * @class SuggestionItemProvider
+ * @brief This class provides Item provider for search contact list.
+ *
+ */
+class SuggestionItemProvider
+ : public IListViewItemProvider
+{
+public:
+ SuggestionItemProvider(DialPresentationModel& pDialPresentationModel);
+ ~SuggestionItemProvider(void);
+ ///IListViewItemProvider method
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ ///IListViewItemProvider method
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ ///IListViewItemProvider method
+ virtual int GetItemCount(void);
+
+private:
+ DialPresentationModel& __dialPresentationModel;
+};
+#endif // _PHN_SUGGESTION_ITEM_PROVIDER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabDialer.h
+ * @brief This is the header file for the %DialTabDialer class.
+ *
+ * This header file contains the declarations for %DialTabDialer class.
+ */
+#ifndef _PHN_TAB_DIALER_H_
+#define _PHN_TAB_DIALER_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include "PhnSuggestionItemProvider.h"
+#include "PhnDialPresentationModel.h"
+#include "PhnErrorMsgPopup.h"
+#include "PhnIAppStateChangeListner.h"
+
+class DialerKeypad;
+
+/**
+ * @class DialTabDialer
+ * @brief This class provides tab based UI for Dialer.
+ *
+ */
+class DialTabDialer
+ : public Tizen::Ui::Controls::Panel
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public IPopupClosedEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Ui::ITouchLongPressGestureEventListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public IAppStateChangeListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::System::ISettingEventListener
+ , public Tizen::Ui::ITextEventListener
+ , public Tizen::Ui::ITouchEventListener
+{
+public:
+ DialTabDialer(void);
+ virtual ~DialTabDialer(void);
+ bool Initialize(void);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ //Used to show suggestions
+ void ShowSuggestionBox(Tizen::Base::String& name, Tizen::Base::String& mobileNo, Tizen::Base::String& matchedKey, Tizen::Base::String& resultCount);
+ //Used to hide search results.
+ void HideSearchGadget(void);
+ void HideSearchBox(void);
+ //Used to show "Add to Contacts" button
+ void ShowAddToContactsButton(void);
+ //Used to update search results.
+ void UpdateSearchResults(void);
+ //Used to show search Box.
+ void ShowSearchGadget(void);
+
+ //Set the original positions for UseContact and DropDown/DropUp Buttons
+ void SetOrigPosUseContact(void);
+ //Set the shifted positions for UseContact and DropDown/DropUp Buttons
+ void SetShiftedPosUseContact(void);
+ //Called when App comes to foreground
+ virtual void OnForeground(void);
+ //Called when App goes to background
+ virtual void OnBackground(void);
+ //Used to set that an AppControl is running
+ void SetAppControlLaunched(bool launched);
+ //USed to check if an AppControl is running
+ bool GetAppControlLaunched(void);
+ void ShowOptionsMenu();
+ void HandleFormBackRequest();
+
+protected:
+ void ShowFormattedText(Tizen::Ui::Controls::EditField* pEditField, Tizen::Base::String contactNumber);
+ void ShowFormattedText(Tizen::Ui::Controls::EditField* pEditField, int actionId);
+ //search box create, update and hide
+ void InitializeSearchBox(void);
+ //Used to initialize search list view
+ void InitializeSearchListView(void);
+ //Used to show search results in list view.
+ void ShowSearchListView(void);
+ //Used to hide search results list view.
+ void HideSearchListView(void);
+ //Used to initialize EditField for contacts.
+ void InitializeContactsTextBox(void);
+ //Used to contruct drop-down menu for search results.
+ void ConstructSearchMenu(void);
+ //Used to construct dial keypad.
+ void ConstructKeypad(void);
+ //Make an outgoingcall
+ bool DialOutgoingCall(const Tizen::Base::String& contactNumber);
+ //Used to add pause
+ void AddPause(void);
+ //Used to add pause
+ void AddWait(void);
+ //Used to add +
+ void AddPlus(void);
+ //Switch to Speed dial settings form.
+ void SwitchToSpeedDialForm(void);
+ //Used to get confirmation for assigning speed dial.
+ void ShowSpeedDialConfirmationPopup(bool isVoiceMail=false);
+ //Used to show context menu
+ void ShowContextMenu();
+ //Used to show context menu
+ void ShowPauseWaitMenu(Tizen::Base::String& contactNumber, int portraitAnchorPositionY,
+ int portraitAnchorPositionX, int landscapeAnchorPositionX, int landscapeAnchorPositionY);
+ //Used to check if App is in foreground.
+ bool IsForeground();
+ //Used to show silent mode message box
+ void ShowSilentModeToggle(bool bEnabled);
+ //
+ void SetIgnoreClearKey(bool bIgnore);
+ bool IsClearKeyIgnored(void);
+
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //IListViewItemEventListener method
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus status){}
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){}
+ virtual void OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo){}
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){}
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+ ///IOrientationEventListener
+ virtual void OnOrientationChanged(const Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+ // Called from TouchLongPressGestureDetector when a long press gesture is detected.
+ virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector);
+ //Called from TouchLongPressGestureDetector when a long press detection is canceled.
+ virtual void OnLongPressGestureCanceled(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector){}
+ // Called by AddressBook to notify when contacts are changed.
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ // Called by AddressBook to notify when categories are changed.
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) {};
+ virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
+ virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source){};
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; }
+
+ //ISettings Event Listener
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+
+ //ITouchEventListener
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo);
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
+
+ enum ActionIds
+ {
+ IDA_BTN_SHOW_CONTEXTMENU = 100,
+ IDA_BTN_USE_CONTACT_DATA,
+ IDA_BTN_DISPLAY_CONTACTS,
+ IDA_BTN_ADD_TO_CONTACTS,
+ IDA_MENU_SPEED_DIAL,
+ IDA_MENU_SEND_MESSAGE,
+ IDA_MENU_ADD_PAUSE,
+ IDA_MENU_ADD_WAIT,
+ IDA_MENU_EXIT,
+ IDA_MENU_BACK,
+ IDA_SPEEDDIAL_POPUP_YES,
+ IDA_SPEEDDIAL_POPUP_NO,
+ IDA_SEARCH_FIELD,
+ IDA_SEARCH_ICON
+ };
+
+ //Button Dimensions
+ static const int IDI_BGBITMAP_WIDTH ;
+ static const int IDI_BGBITMAP_HEIGHT;
+ static const int IDI_BGBITMAP_POS_X;
+ static const int IDI_BGBITMAP_POS_Y;
+ static const int IDI_TEXT1_SIZE;
+ static const int IDI_TEXT2_SIZE;
+
+private:
+ //Panel* __pSearchBox;
+ Tizen::Ui::Controls::ListView* __pSearchListView;
+ Tizen::Ui::Controls::ContextMenu* __pCallContextMenu;
+ //Used only when device has HardWare key
+ Tizen::Ui::Controls::OptionMenu* __pOptionMenu;
+ SuggestionItemProvider* __pSuggestionListProvider;
+ //Ownership
+ ErrorMsgPopup* __pErrorMsgPopup;
+ bool __isSearchListOpened;
+ DialPresentationModel* __pDialPresentationModel;
+ DialerKeypad* __pDialKeypad;
+ Tizen::Ui::Controls::Popup* __pConfirmationPopup;
+ bool __isAppForeground;
+ Tizen::Social::Addressbook* __pAddressBook;
+ bool __isAppControlLaunched;
+ bool __isContactsUpdated;
+ DialerState __dialerState;
+ bool __isClearKeyIgnore;
+};
+
+#endif // _PHN_TAB_DIALER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabLogs.h
+ * @brief This is the header file for the %DialTabLogs class.
+ *
+ * This header file contains the declarations for %DialTabLogs class.
+ */
+#ifndef _PHN_TAB_LOGS_H_
+#define _PHN_TAB_LOGS_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+#include <FSysSettingInfo.h>
+#include <FUi.h>
+#include "PhnTabLogsItemProvider.h"
+#include "PhnICalllogChangeListener.h"
+#include "PhnCallLogPresentationModel.h"
+#include "PhnIAppStateChangeListner.h"
+#include "PhnCallLogViewByPopup.h"
+#include "PhnICallLogViewByPopupListener.h"
+//#include "calllog.h"
+
+class CallLogDetails;
+class CallLogManager;
+
+/**
+ * @class DialTabLogs
+ * @brief This class provides tab based UI for Call Log.
+ *
+ */
+class DialTabLogs
+ : public Tizen::Ui::Controls::Panel
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::Controls::IGroupedListViewItemEventListener
+ , public Tizen::Ui::IActionEventListener
+ , public ICalllogChangeListener
+ , public Tizen::Ui::IWindowEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public IAppStateChangeListener
+ , public ICallLogViewByPopupListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::System::ISettingEventListener
+{
+public:
+ ///DialTabLogs constructor
+ DialTabLogs(void);
+
+ ///DialTabLogs destructor
+ virtual ~DialTabLogs(void);
+
+ ///Initializes the DialTabLogs form
+ /*
+ * @param: Whether Initialize is success or not
+ */
+ bool Initialize(void);
+
+ ///This functions gets called during form OnInitializing
+ /*
+ * @param: result
+ */
+ virtual result OnInitializing(void);
+
+ ///This functions gets called during form terminating
+ /*
+ * @param: result
+ */
+ virtual result OnTerminating(void);
+
+ void SetCallLogDisplayMode(bool isEdit);
+
+ void UnCheckAllItems(void);
+
+ ///IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ ///ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+
+ ///ISceneEventListener
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ /// IGroupedListViewItemEventListener
+ virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ /// IGroupedListViewItemEventListener
+ virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state);
+ /// IGroupedListViewItemEventListener
+ virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction);
+ /// ICalllogChangeListener
+ virtual void OnCalllogChanged(void);
+
+ void SetListItemSelectStatus(bool status);
+
+ void DeleteSelectedCalllog(void);
+
+ void ShowDeletePopup(void);
+ void HideDeletePopup(void);
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer);
+ virtual void OnWindowActivated(const Tizen::Ui::Window &source);
+ virtual void OnWindowDeactivated(const Tizen::Ui::Window &source){}
+ result RemoveLogsList(void);
+ //Handles userevents
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+ //Called when App comes to foreground
+ virtual void OnForeground(void);
+ //Called when App goes to background
+ virtual void OnBackground(void);
+
+ void StoreItemselection(int groupIndex, int itemIndex, int elementId, ListItemStatus state);
+ void ManageItemSelection(void);
+ bool IsScecneVisible();
+ void SetSceneVisible(bool sceneMode);
+ void ShowLogsViewByPopup(void);
+
+ //From IPopupEventListener
+ void OnItemSelected();
+ void ShowContextMenu();
+ ///IOrientationEventListener
+ virtual void OnOrientationChanged(const Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //From IAddressbookEventListener
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList){};
+ void UpdateCallLogList(void);
+ //ISettingEventListener
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+ void ShowOptionsMenu();
+ void CancelDelete();
+ void HandleFormBackRequest();
+ void ShowDeleteConfirmationPopup(int deleteCommandIdYes);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; }
+
+private:
+ //used to handle 'IDA_CHECKBUTTON_SELECT_ALL'
+ void HandleAllItemSelection(void);
+
+protected:
+ //static const int IDA_FOOTER_LOG_MORE = 103;
+ static const int IDA_CONTEXTMENU_VIEWBY = 104;
+ static const int IDA_FOOTER_LOG_DELETE = 105;
+ static const int IDA_FOOTER_LOG_CANCEL = 106;
+ static const int IDA_CHECKBUTTON_SELECT_ALL = 108;
+ static const int IDA_CHECKBUTTON_UNSELECT_ALL = 109;
+ static const int IDA_POPUP_DELETE_CANCEL = 110;
+ static const int IDA_POPUP_DELETE_YES = 111;
+ static const int IDA_POPUP_DELETE_NO = 112;
+ static const int IDA_POPUP_DELETEALL_YES = 113;
+
+private:
+ ///Form Footer
+ Tizen::Ui::Controls::Footer* __pFormFooter;
+
+ ///More option footer item
+ Tizen::Ui::Controls::ButtonItem __footerItemMore;
+
+ ///Delete footer item
+ Tizen::Ui::Controls::FooterItem __footerItemDelete;
+
+ ///Grouped list view
+ Tizen::Ui::Controls::GroupedListView* __plogsListView;
+
+ ///Grouped list view
+ Tizen::Ui::Controls::CheckButton* __pButtonSelectAll;
+
+ //Selected pop up label
+ Tizen::Ui::Controls::Label* __pSelectedLabel;
+
+ //Used only when device has HardWare key
+ Tizen::Ui::Controls::OptionMenu* __pOptionMenu;
+
+ Tizen::Social::Addressbook* __pAddressbook;
+
+ ///Grouped list view item provider
+ CustomDataProvider* __pDataProvider;
+
+ CalLogPresentationModel* __pLogPresentor;
+ int __groupCount;
+ int __itemCount;
+ bool __isSelectAll;
+ int __selectedItemCount;
+ bool __isEditMode;
+ int calllogCount;
+ Tizen::Base::Collection::ArrayList* __pArgs;
+ Tizen::Base::Runtime::Timer __deleteLogsTimer;
+ Tizen::Ui::Controls::Popup* __pDeletePopup;
+ Tizen::Ui::Controls::Popup* __pConfirmationDeletePopup;
+ int __deleteGroupIndex;
+ int __deleteItemIndex;
+ Tizen::Base::Collection::ArrayList* __pCallLogId;
+ bool __isSceneVisible;
+ CallLogViewByPopup* __pLogsViewbyPopup;
+ bool __isMsgAppControlLaunched;
+ bool __isCallAppControlLaunched;
+ bool __isDeleteInProgress;
+ float __fontSize;
+ float __itemHeight;
+};
+
+#endif // _PHN_TAB_LOGS_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabLogsItemProvider.h
+ * @brief This is the header file for the %CustomDataProvider class.
+ *
+ * This header file contains the declarations for %CustomDataProvider class.
+ */
+#include <FBase.h>
+#include <FUi.h>
+#include <FSocial.h>
+#include "PhnCalllogManager.h"
+
+#ifndef _PHN_TAB_LOGS_ITEM_PROVIDER_H_
+#define _PHN_TAB_LOGS_ITEM_PROVIDER_H_
+
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+class GroupItemClass;
+
+/**
+ * @class CustomDataProvider
+ * @brief This class provides base class for item providers of calllog application
+ *
+ */
+class CustomDataProvider
+ : public Tizen::Ui::Controls::IGroupedListViewItemProvider
+{
+public:
+ CustomDataProvider(void);
+ virtual ~CustomDataProvider(void);
+
+ void SetListItemStyle(bool mode);
+
+ // IGroupedListViewItemProvider
+ virtual int GetGroupCount(void);
+ virtual int GetItemCount(int groupIndex);
+ virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+
+ void GetItemAtGroupIndex(int groupIndex, int itemIndex, CallLogDetails** pCalllogDetails);
+
+private:
+ void GetCallogIconBitmap(CallLogType logType,Tizen::Graphics::Bitmap*& iconType, Tizen::Graphics::Bitmap*& iconArrow);
+ float GetTextWidth(Tizen::Base::String contactName);
+private:
+ bool __isEditStyle;
+ Tizen::Base::Collection::ArrayList* __pGroupData;
+ Tizen::Social::Addressbook* __pAddressBook;
+ Tizen::Ui::Controls::ListContextItem* __pItemContext;
+ Tizen::Ui::Controls::ListContextItem* __pItemContextForMMLogs;
+ Tizen::Ui::Controls::ListContextItem* __pItemContextForHidenLogs;
+ float __fontSize;
+ float __itemHeight;
+
+};
+
+#endif /* _PHN_TAB_LOGS_ITEM_PROVIDER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTypes.h
+ * @brief This is the header file provides common constants and enums used across application.
+ *
+ */
+#ifndef PHNTYPES_H_
+#define PHNTYPES_H_
+
+#include <FBase.h>
+#include <FMedia.h>
+#include <FGraphics.h>
+#include "PhnCommonUtils.h"
+
+//Bitmaps for settings module
+extern const wchar_t* IDB_VOICECALL_ICON;
+extern const wchar_t* IDB_LIST_EXPAND_CLOSE;
+extern const wchar_t* IDB_LIST_EXPAND_CLOSE_PRESSED;
+extern const wchar_t* IDB_LIST_EXPAND_OPENED;
+extern const wchar_t* IDB_LIST_EXPAND_OPENED_PRESSED;
+extern const wchar_t* IDB_BACK_HEADER_ITEM;
+extern const wchar_t* IDB_BACK_HEADER_ITEM_PRESSED;
+extern const wchar_t* IDB_CANCEL_NORMAL_FOOTER_ITEM;
+extern const wchar_t* IDB_CANCEL_PRESS_FOOTER_ITEM;
+extern const wchar_t* IDB_CANCEL_HEADER_ITEM;
+extern const wchar_t* IDB_PROCESSING_ICONS;
+extern const wchar_t* IDB_SELECT_CONTACT__ICON;
+extern const wchar_t* IDB_SELECT_CONTACT_ICON_NORMAL;
+extern const wchar_t* IDB_SELECT_CONTACT_ICON_PRESSED;
+extern const wchar_t* IDB_SELECT_CONTACT_BG_ICON;
+extern const wchar_t* IDB_SELECT_CONTACT_PRESS_BG_ICON;
+extern const wchar_t* IDB_SETTINGS_SINGLE_LIST_ITEM_BG;
+extern const wchar_t* IDB_SETTINGS_TOP_LIST_ITEM_BG;
+extern const wchar_t* IDB_SETTINGS_CENTER_LIST_ITEM_BG;
+extern const wchar_t* IDB_SETTINGS_BOTTOM_LIST_ITEM_BG;
+//bitmap for dialer module
+extern const wchar_t* IDB_DIALER_BTN_LINE2_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE3_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE4_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE5_ICON;
+extern const wchar_t* IDB_DIALER_STAR_ICON ;
+extern const wchar_t* IDB_DIALER_MUTE_ICON ;
+extern const wchar_t* IDB_DIALER_VIDEOCALL_ICON ;
+extern const wchar_t* IDB_DIALER_CALL_ICON ;
+extern const wchar_t* IDB_DIALER_CLEAR_ICON ;
+extern const wchar_t* IDB_DIALER_CALL_BG_ICON ;
+extern const wchar_t* IDB_BTN_OPTION_BG_ICON ;
+extern const wchar_t* IDB_BTN_OPTION_PRESS_BG_ICON;
+extern const wchar_t* IDB_BTN_MORE_ICON ;
+extern const wchar_t* IDB_BTN_MORE_PRESS_ICON ;
+extern const wchar_t* IDB_POPUP_BUBBLE_ICON ;
+extern const wchar_t* IDB_POPUP_BUBBLE_PRESS_ICON;
+extern const wchar_t* IDB_POPUP_BUBBLE_UP_ICON ;
+extern const wchar_t* IDB_POPUP_BUBBLE_UP_PRESS_ICON;
+extern const wchar_t* IDB_DIALER_BTN_PRESS_ICON;
+extern const wchar_t* IDB_VOICEMAIL_BTN_ICON;
+extern const wchar_t* IDB_VOICEMAIL_BTN_PRESS_ICON;
+//Added for latest Keypad changes
+extern const wchar_t* IDB_KEYPAD_NUMBER_00ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_01ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_02ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_03ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_04ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_05ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_06ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_07ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_08ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_09ICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_ASTERIKICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_VOICEMAILICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_MUTEICON;
+extern const wchar_t* IDB_KEYPAD_NUMBER_SHARPICON;
+//Keypad Press
+extern const wchar_t* IDB_KEYPAD_PRESSICON;
+//Keypad button Background
+extern const wchar_t* IDB_KEYPAD_BGICON;
+//Call 9 Patch
+extern const wchar_t* IDB_KEYPAD_CALLDIM9PATCH;
+extern const wchar_t* IDB_KEYPAD_CALLPRESS9PATCH;
+//Clear 9 Patch
+extern const wchar_t* IDB_KEYPAD_CLEARDIM9PATCH;
+extern const wchar_t* IDB_KEYPAD_CLEARPRESS9PATCH;
+//Display panel Background
+extern const wchar_t* IDB_DISPLAYPANEL_BG;
+//Call Button
+extern const wchar_t* IDB_CALLBUTTON_BG;
+//Clear button
+extern const wchar_t* IDC_BUTTON_KEYPADCLEAR;
+//Bitmap used in Call Log module
+extern const wchar_t* IDB_CALLOG_LIST_BG;
+extern const wchar_t* IDB_LOG_RECEIVEDCALL_ICON;
+extern const wchar_t* IDB_LOG_DIALEDCALL_ICON;
+extern const wchar_t* IDB_LOG_MISSEDCALL_ICON;
+extern const wchar_t* IDB_LOG_BLOCKEDCALL_ICON;
+extern const wchar_t* IDB_LOG_NO_CONTENT;
+extern const wchar_t* IDB_CIRCLE_BUTTON_NORMAL;
+extern const wchar_t* IDB_CIRCLE_BUTTON_PRESSED;
+extern const wchar_t* IDB_LOG_DETAIL_CALL_ICON;
+extern const wchar_t* IDB_LOG_DETAIL_CALL_PRESSED_ICON;
+extern const wchar_t* IDB_LOG_DETAIL_MSG_ICON;
+extern const wchar_t* IDB_LOG_DETAIL_MSG_PRESSED_ICON;
+extern const wchar_t* IDB_LOG_CALL_ICON;
+extern const wchar_t* IDB_LOG_MMS_ICON;
+extern const wchar_t* IDB_LOG_SMS_ICON;
+extern const wchar_t* IDB_LOG_EMAIL_ICON;
+extern const wchar_t* IDB_LOG_VIDEO_ICON;
+extern const wchar_t* IDB_GROUP_LOG_CALL_DELETE_ICON;
+extern const wchar_t* IDB_LOG_MORE_ICON;
+extern const wchar_t* IDB_LOG_MORE_PRESSED_ICON;
+
+//String messages
+extern const wchar_t* IDS_DIALER_MOBILE_STR;
+extern const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG;
+extern const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG;
+extern const wchar_t* IDS_DIALER_VOICE_POPUP_MSG;
+extern const wchar_t* IDS_DIALER_VOICE_POPUP_TITLE_MSG;
+extern const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING;
+extern const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_CONTACT;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_SPEED_DIAL;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_PAUSE;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_WAIT;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_EXIT;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_BACK;
+extern const wchar_t* IDS_SPEED_DIAL_SEARCH_KEY;
+extern const wchar_t* IDS_VOICE_CALL_BTN_NAME;
+extern const wchar_t* IDS_VIDEO_CALL_BTN_NAME;
+extern const wchar_t* IDS_MSG_BTN_NAME;
+extern const wchar_t* IDS_PEOPLE_STR;
+extern const wchar_t* IDS_MGR_CONF_CALL_LIST_STR;
+extern const wchar_t* IDS_LOG_CONTEXT_CALL;
+extern const wchar_t* IDS_LOG_CONTEXT_MESSAGE;
+extern const wchar_t* IDS_LOG_CONTEXT_VIDEOCALL;
+extern const wchar_t* IDS_LOG_CONTEXT_DELETE;
+extern const wchar_t* IDS_AM_TIME;
+extern const wchar_t* IDS_PM_TIME;
+extern const wchar_t* IDS_CALLLOG_NO_NAME;
+extern const wchar_t* IDS_CALLLOG_NO_NUMBER;
+extern const wchar_t* IDS_CALLLOG_RECEIVED;
+extern const wchar_t* IDS_CALLLOG_MISSED;
+extern const wchar_t* IDS_CALLLOG_OUTGOING;
+extern const wchar_t* IDS_CALLLOG_RECEIVED_MSG;
+extern const wchar_t* IDS_CALLLOG_SENT_MSG;
+extern const wchar_t* IDS_CALLLOG_REJECTED;
+extern const wchar_t* IDS_CALLLOG_DELETE_FOOTER;
+extern const wchar_t* IDS_CALLLOG_CANCEL_FOOTER;
+extern const wchar_t* IDS_EMERGENCY_CALL;
+extern const wchar_t* IDS_SELECT_CALL_LOG ;
+extern const wchar_t* IDS_SELECTED_ITEM_STRING;
+extern const wchar_t* IDS_SELECT_NUMBER;
+extern const wchar_t* IDS_NUMBER_SELECTED;
+extern const wchar_t* IDS_NUMBERS_SELECTED;
+extern const wchar_t* IDS_SELECT_MESSAGE;
+extern const wchar_t* IDS_MESSAGE_SELECTED;
+extern const wchar_t* IDS_MESSAGES_SELECTED;
+extern const wchar_t* IDS_NO_LOGS;
+extern const wchar_t* IDS_FLIGHT_MODE_ON;
+extern const wchar_t* IDS_SETTING_WRONG_PASSWORD_TEXT;
+extern const wchar_t* IDS_SETTING_SYSTEM_FAILURE_TEXT;
+extern const wchar_t* IDS_ADD_TO_CONTACTS;
+extern const wchar_t* IDS_CANCEL;
+extern const wchar_t* IDS_LOGS_TODAY;
+extern const wchar_t* IDS_LOGS_YESTERDAY;
+extern const wchar_t* IDS_DELETING_CALL_LOGS;
+extern const wchar_t* IDS_CANCEL_DELETING_CALL_LOGS;
+extern const wchar_t* IDS_CONTEXTMENU_ITEM_VIEWBY;
+extern const wchar_t* IDS_CONTEXTMENU_ITEM_DETAILS;
+extern const wchar_t* IDS_CONTEXTMENU_ITEM_BLOCK;
+extern const wchar_t* IDS_REJECT_MESSAGE_CREATE;
+extern const wchar_t* IDS_DELETE_CONFORMATION_STRING;
+extern const wchar_t* IDS_DIALER_VOICE_MAIL_POPUP_MSG;
+extern const wchar_t* IDS_LOW_MEMORY_MSG;
+extern const wchar_t* IDS_LOW_MEMORY_MSG_TITLE;
+extern const wchar_t* IDS_DELETE_YES;
+extern const wchar_t* IDS_DELETE_NO;
+
+//resource string messages for settings module
+extern const wchar_t* IDS_BLANK_LANGUAGE;
+extern const wchar_t* IDS_BLANK_FONTSIZE;
+extern const wchar_t* IDS_KEY_LANGUAGE_CHANGE;
+extern const wchar_t* IDS_KEY_FONTSIZE_CHANGE;
+extern const wchar_t* IDS_ADD_BTN_STRING;
+extern const wchar_t* IDS_SETTING_REJECT_MESSAGE_EMPTY;
+extern const wchar_t* IDS_DELETE_BTN_STRING;
+extern const wchar_t* IDS_CANCEL_BTN_STRING;
+extern const wchar_t* IDS_REMOVE_CONTACT;
+extern const wchar_t* IDS_DELETE_NUMBER_TITLE;
+extern const wchar_t* IDS_DELETE_MSGS_TITLE;
+extern const wchar_t* IDS_SELECT_ALL_LIST_ITEM_STRING;
+extern const wchar_t* IDS_DEFAULT_REJECT_ITEM_STRING;
+extern const wchar_t* IDS_SETTINGS_MATCHCRITERIA_STRING;
+extern const wchar_t* IDS_CALLERID_BYNETWORK_STRING;
+extern const wchar_t* IDS_CALLERID_SHOW_STRING;
+extern const wchar_t* IDS_CALLERID_HIDE_STRING;
+extern const wchar_t* IDS_SETTING_CALLALERT_OFF_STRING;
+extern const wchar_t* IDS_SETTING_CALLALERT_SOUND_STRING;
+extern const wchar_t* IDS_SETTING_CALLALERT_VIBRATE_STRING;
+extern const wchar_t* IDS_SETTING_BARRING_STRING;
+extern const wchar_t* IDS_SETTING_WAITING_STRING;
+extern const wchar_t* IDS_SETTING_WAITING_HLP_STRING;
+extern const wchar_t* IDS_SETTING_STATUS_TONES_STRING;
+extern const wchar_t* IDS_SETTING_STATUS_TONES_HLP_STRING;
+extern const wchar_t* IDS_SETTING_AUTO_AREACODE_STRING;
+extern const wchar_t* IDS_SETTING_AUTO_AREACODE_HLP_STRING;
+extern const wchar_t* IDS_SETTING_REJECT_STRING;
+extern const wchar_t* IDS_SETTING_REJECT_HLP_STRING;
+extern const wchar_t* IDS_SETTING_REJECT_MSG_STRING;
+extern const wchar_t* IDS_SETTING_REJECT_MSG_HLP_STRING;
+extern const wchar_t* IDS_SETTING_SPEEDDIAL_STRING;
+extern const wchar_t* IDS_SETTING_FORWARDING_STRING;
+extern const wchar_t* IDS_SETTING_MORE_MAIN_STRING;
+extern const wchar_t* IDS_SETTING_MORE_SUB_STRING;
+extern const wchar_t* IDS_SETTING_WAITING_TIME_STRING;
+extern const wchar_t* IDS_SETTING_WAIT_INTERVAL_STRING;
+extern const wchar_t* IDS_SETTING_CONNECTTONE_STRING;
+extern const wchar_t* IDS_SETTING_CONNECTTONE_HLP_STRING;
+extern const wchar_t* IDS_SETTING_REMINDERS_STRING;
+extern const wchar_t* IDS_SETTING_REMINDERS_HLP_STRING;
+extern const wchar_t* IDS_SETTING_ENDTONE_STRING;
+extern const wchar_t* IDS_SETTING_ENDTONE_HLP_STRING;
+extern const wchar_t* IDS_SETTING_FORWARD_CALLTYPE_TITLE;
+extern const wchar_t* IDS_SETTING_BARRING_CALLTYPE_TITLE;
+extern const wchar_t* IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_OPTIONS_TITLE;
+extern const wchar_t* IDS_SETTING_WAITING_OPTIONS_TITLE;
+extern const wchar_t* IDS_SETTING_CALLTYPE_VOICE_STRING;
+extern const wchar_t* IDS_SETTING_VOICEFORWARD_ALWAYS;
+extern const wchar_t* IDS_SETTING_VOICEFORWARD_IFBUSY;
+extern const wchar_t* IDS_SETTING_VOICEFORWARD_NOREPLY;
+extern const wchar_t* IDS_SETTING_VOICEFORWARD_OUTOFREACH;
+extern const wchar_t* IDS_SETTING_DEACTIVATE_STATUS;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_OUTGOING;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_INTERNATIONAL;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_EXCEPTHOME;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_INCOMING;
+extern const wchar_t* IDS_SETTING_VOICEBARRING_WHENROAMING;
+extern const wchar_t* IDS_SETTING_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDS_MATCHCRITERIA_EXACT;
+extern const wchar_t* IDS_MATCHCRITERIA_START;
+extern const wchar_t* IDS_MATCHCRITERIA_END;
+extern const wchar_t* IDS_MATCHCRITERIA_INCLUDE;
+extern const wchar_t* IDS_SETTING_CALLERID_MAIN_STR;
+extern const wchar_t* IDS_SETTING_CALLERID_SUB_STR;
+extern const wchar_t* IDS_SETTING_CALL_ALERT_MAIN_STR;
+extern const wchar_t* IDS_SETTING_CALL_ALERT_SUB_STR;
+extern const wchar_t* IDS_SETTING_SAVE_HEADER_ITEM;
+extern const wchar_t* IDS_SETTING_CONTACT_BUTTON;
+extern const wchar_t* IDS_SETTING_DONE_HEADER_ITEM;
+extern const wchar_t* IDS_AREA_CODE_OFF_STR;
+extern const wchar_t* IDS_DUPLICATE_REJECT_MSG_ERROR_STRING;
+extern const wchar_t* IDS_SETTING_CALL_ANSWER_MSG_HLP_STRING;
+extern const wchar_t* IDS_SETTING_CALL_ACCESSORY_MSG_HLP_STRING;
+extern const wchar_t* IDS_SETTING_CALL_ANSWERING_STRING;
+extern const wchar_t* IDS_SETTING_CALL_ACCESSORY_STRING;
+extern const wchar_t* IDS_SETTING_ANSWER_CALL_KEY_HLP_STRING;
+extern const wchar_t* IDS_SETTING_END_CALL_KEY_HLP_STRING;
+extern const wchar_t* IDS_SETTING_ANSWER_CALL_KEY_STRING;
+extern const wchar_t* IDS_SETTING_END_CALL_KEY_STRING;
+extern const wchar_t* IDS_SETTING_BT_SETTINGS_HEADING_STRING;
+extern const wchar_t* IDS_SETTING_OUTCALL_CONDITION_HLP_STRING;
+extern const wchar_t* IDS_SETTING_OUTCALL_CONDITION_MAIN_STRING;
+extern const wchar_t* IDS_SETTING_OUTCALL_LOCKDEVICE_STRING;
+extern const wchar_t* IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING;
+extern const wchar_t* IDS_VIEWBY_POPUP_TITLE_STRING;
+extern const wchar_t* IDS_BLOCK_POPUP_TITLE_STRING;
+extern const wchar_t* IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING;
+extern const wchar_t* IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING;
+extern const wchar_t* IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING;
+extern const wchar_t* IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING;
+extern const wchar_t* IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING;
+extern const wchar_t* IDS_BLOCK_CALL_CHKBTN_STRING;
+extern const wchar_t* IDS_BLOCK_MESSAGE_CHKBTN_STRING;
+extern const wchar_t* IDS_VIEWBY_CANCEL_BTN_STRING;
+extern const wchar_t* IDS_BLOCK_OK_BTN_STRING;
+extern const wchar_t* IDS_BLOCK_CANCEL_BTN_STRING;
+extern const wchar_t* IDS_BLOCK_CALL_INFO_STRING;
+extern const wchar_t* IDS_BLOCK_MSG_INFO_STRING;
+extern const wchar_t* IDS_BLOCK_CALL_MSG_INFO_STRING;
+extern const wchar_t* IDS_VOICE_MAIL_DEFAULT_STRING;
+extern const wchar_t* IDS_SETTING_ADD_NUMBER_TITLE;
+extern const wchar_t* IDS_SETTING_AUTO_AREA_CODE_TITLE;
+extern const wchar_t* IDS_SETTING_ADD_REJECT_MSG_TITLE;
+extern const wchar_t* IDS_SETTING_SET_BARRING_PWD_TITLE;
+extern const wchar_t* IDS_SETTING_EDIT_REJECT_MSG_TITLE;
+extern const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT;
+extern const wchar_t* IDS_PHONE;
+extern const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT_OK;
+extern const wchar_t* IDS_SILENT_MODE_ENABLED;
+extern const wchar_t* IDS_SILENT_MODE_DISABLED;
+extern const wchar_t* IDS_INVALID_CONTACT_STRING;
+
+//control name
+extern const wchar_t* IDC_GROUPEDTABLEVIEW;
+extern const wchar_t* IDC_LISTVIEW;
+extern const wchar_t* IDC_NUMBER_EDITFIELD;
+extern const wchar_t* IDC_SELECT_CONTACT_BUTTON;
+extern const wchar_t* IDC_FOWARDING_NUMBER_EDITFIELD;
+extern const wchar_t* IDC_VOICEMAIL_BUTTON;
+extern const wchar_t* IDC_REJECTMSG_EDITFIELD;
+extern const wchar_t* IDC_EDITFIELD;
+extern const wchar_t* IDC_SELECTEDOPTION_SUBTEXT_LABEL;
+extern const wchar_t* IDC_MATCHCRITERIA_MAINTEXT_LABEL;
+extern const wchar_t* IDC_ANIMATION_CONTROL;
+extern const wchar_t* IDC_TABLEITEM_BG_LABEL;
+extern const wchar_t* IDC_ENTER_NUMBER_LABEL;
+//Panel
+extern const wchar_t* PANEL_DIALER;
+extern const wchar_t* PANEL_LOGS;
+//Corresponding Settings form name
+extern const wchar_t* IDL_FORM_SETTINGS_PREFIX;
+extern const wchar_t* IDL_FORM_MAIN_SETTING_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDL_FORM_SPEED_DIAL;
+extern const wchar_t* IDL_FORM_MORE_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_STATUSTONES;
+extern const wchar_t* IDL_FORM_CALLTYPE_FORWARD;
+extern const wchar_t* IDL_FORM_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDL_FORM_CALLTYPE_BARRING;
+extern const wchar_t* IDL_FORM_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDL_FORM_ADD_REJECT_NUMBER;
+extern const wchar_t* IDL_FORM_AUTO_AREA_CODE;
+extern const wchar_t* IDL_FORM_ADD_REJECT_MSG;
+extern const wchar_t* IDL_FORM_EDIT_REJECT_MSG;
+extern const wchar_t* IDL_FORM_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDL_FORM_DEL_NUMBER;
+extern const wchar_t* IDL_FORM_DEL_MESSAGE;
+extern const wchar_t* IDL_FORM_CALL_ANSWER_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_ACCESSORY_OPTIONS;
+//Dialer & Call Log Form names
+extern const wchar_t* IDL_FORM_DIAL_APP;
+extern const wchar_t* IDL_FORM_CALL_LOG_DETAIL;
+extern const wchar_t* IDL_FORM_RESTRICTED_CALL_LOG_DETAIL;
+extern const wchar_t* IDL_DIALER_KEYPAD_PANEL;
+extern const wchar_t* IDL_FORM_EMERGENCY_DIAL;
+// Dialer LastRow Keys
+extern const wchar_t* IDC_PANEL_LASTROW;
+extern const wchar_t* IDC_BUTTON_CALL;
+extern const wchar_t* IDC_BUTTON10;
+//Constants - Settings Scene name
+extern const wchar_t* IDSCN_SCENE_MAIN_SETTING_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDSCN_SCENE_SPEED_DIAL;
+extern const wchar_t* IDSCN_SCENE_MORE_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_STATUSTONES;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_FORWARD;
+extern const wchar_t* IDSCN_SCENE_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_BARRING;
+extern const wchar_t* IDSCN_SCENE_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_NUMBER;
+extern const wchar_t* IDSCN_SCENE_AUTO_AREA_CODE;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_EDIT_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDSCN_SCENE_DEL_NUMBER;
+extern const wchar_t* IDSCN_SCENE_DEL_MESSAGE;
+extern const wchar_t* IDSCN_SCENE_CALL_ANSWER_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_ACCESSORY_OPTIONS;
+//Dialer & Call Log Scene names
+extern const wchar_t* IDSCN_DIALER;
+extern const wchar_t* IDSCN_CALL_LOG;
+extern const wchar_t* IDSCN_CALL_LOG_DETAILS;
+extern const wchar_t* IDSCN_RESTRICTED_CALL_LOG_DETAILS;
+extern const wchar_t* IDSCN_EMERGENCY_DIAL;
+
+extern const wchar_t* TYPE_VIDEO;
+extern const wchar_t* TYPE_VOICE;
+extern const wchar_t* TYPE_SMS;
+extern const wchar_t* TEL;
+extern const wchar_t* TO;
+//Contacts app control parameters
+extern const wchar_t* CONTACTS_VIEW_TYPE;
+extern const wchar_t* CONTACTS_VIEW_TYPE_CONTACT;
+extern const wchar_t* CONTACTS_ID_KEY;
+
+extern const wchar_t* OPERATION_ID_PICK;
+extern const wchar_t* OPERATION_ID_VIEW;
+extern const wchar_t* OPERATION_ID_ADD;
+extern const wchar_t* OPERATION_ID_EDIT;
+extern const wchar_t* OPERATION_ID_CONFIGURE;
+extern const wchar_t* OPERATION_ID_CAPTURE;
+extern const wchar_t* OPERATION_ID_CALL;
+extern const wchar_t* OPERATION_ID_COMPOSE;
+extern const wchar_t* OPERATION_ID_DIAL;
+extern const wchar_t* OPERATION_ID_ADD_CALL;
+
+extern const wchar_t* PROVIDER_ID_CAMERA;
+extern const wchar_t* PROVIDER_ID_GALLERY;
+extern const wchar_t* PROVIDER_ID_CALL;
+extern const wchar_t* PROVIDER_ID_MESSAGE;
+extern const wchar_t* PROVIDER_ID_EMAIL;
+extern const wchar_t* PROVIDER_ID_MEDIA;
+extern const wchar_t* PROVIDER_ID_CONTACTS;
+
+extern const wchar_t* RETURN_TYPE_PHONE;
+extern const wchar_t* RETURN_TYPE_EMAIL;
+extern const wchar_t* RETURN_TYPE_CONTACT_ID;
+extern const wchar_t* RETURN_TYPE_ITEM_ID;
+extern const wchar_t* CONTACT_KEY_ITEM_ID;
+
+extern const wchar_t* DELIMITER;
+extern const wchar_t* LAUNCHTYPE;
+extern const wchar_t* PARAM_ORIGIN_MT;
+extern const wchar_t* CALL_HANDLE;
+extern const wchar_t* CONTACT_NUMBER;
+extern const wchar_t* PARAM_CALL_TYPE;
+extern const wchar_t* PARAM_CALL_VALUE_VOICE;
+extern const wchar_t* PARAM_PHONE_NUMBER;
+extern const wchar_t* INPUT_TYPE_PHONE;
+extern const wchar_t* INPUT_TYPE_MAIL;
+extern const wchar_t* CONTACT_KEY_ITEM_TYPE ;
+extern const wchar_t* ITEM_TYPE_CONTACT ;
+extern const wchar_t* ITEM_TYPE_PERSON;
+extern const wchar_t* MESSAGE_TYPE;
+extern const wchar_t* MESSAGE_SMS_TYPE;
+extern const wchar_t* MESSAGE_TEXT;
+extern const wchar_t* MESSAGE_TO;
+
+extern const wchar_t* SELECTION_MODE;
+extern const wchar_t* RETURN_TYPE;
+extern const wchar_t* SELECTION_MODE_SINGLE;
+extern const wchar_t* RETURN_KEY_VALUE;
+
+//Settings Strings
+extern const wchar_t* SETTINGS_FLIGHT_MODE_STR;
+extern const wchar_t* SETTING_INFO_KEY_FONT_SIZE;
+extern const wchar_t* SETTING_INFO_KEY_TIME_FORMAT;
+extern const wchar_t* SETTING_INFO_KEY_DATE_CHANGE;
+extern const wchar_t* SETTING_INFO_KEY_CONTACTS_ORDER;
+
+//Voice Call- Common Command Ids
+enum CommandIds
+{
+ IDA_ADD_CALL = DIAL_CMD_TOTAL_COUNT+1,
+ IDA_OPEN_CONTACTS,
+ IDA_VOICE_CALL,
+ IDA_VIDEO_CALL,
+ IDA_MESSAGE,
+ IDA_ADD_TO_CONTACTS, //add current contact to AddressBook
+ IDA_BACK_EVENT,
+ IDA_MORE_OPTIONS_MENU,
+ IDA_CALL_WAITING_OPTION_CHECKED,
+ IDA_CALL_WAITING_OPTION_UNCHECKED,
+ IDA_TOTAL_CMD_IDS,
+};
+
+enum SoundMode
+{
+ SOUND_MODE_VOICE = 0,
+ SOUND_MODE_RINGTONE,
+ SOUND_MODE_MEDIA
+};
+
+//Type of the call (incoming, outgoing etc for call log database
+enum CallLogType
+{
+ CALL_LOG_TYPE_ALL,
+
+ CALL_LOG_TYPE_VOICE_INCOMING,
+ CALL_LOG_TYPE_VOICE_OUTGOING,
+ CALL_LOG_TYPE_VOICE_MISSED,
+ CALL_LOG_TYPE_VOICE_MISSED_UNSEEN,
+ CALL_LOG_TYPE_VOICE_REJECTED,
+ CALL_LOG_TYPE_VOICE_BLOCKED,
+
+ CALL_LOG_TYPE_VIDEO_INCOMING,
+ CALL_LOG_TYPE_VIDEO_OUTGOING,
+ CALL_LOG_TYPE_VIDEO_MISSED,
+ CALL_LOG_TYPE_VIDEO_REJECTED,
+ CALL_LOG_TYPE_VIDEO_BLOCKED,
+
+ CALL_LOG_TYPE_SMS_INCOMING,
+ CALL_LOG_TYPE_SMS_OUTGOING,
+ CALL_LOG_TYPE_SMS_BLOCKED,
+
+ CALL_LOG_TYPE_MMS_INCOMING,
+ CALL_LOG_TYPE_MMS_OUTGOING,
+ CALL_LOG_TYPE_MMS_BLOCKED,
+
+ CALL_LOG_TYPE_EMAIL_INCOMING,
+ CALL_LOG_TYPE_EMAIL_OUTGOING,
+ CALL_LOG_TYPE_MAX,
+
+};
+
+enum DialerState
+{
+ DIALER_STATE_FIRST_SCENE = 0,
+ DIALER_STATE_NORMAL_APPCONTROL,
+ DIALER_STATE_EMERGENCY_APPCONTROL,
+ DIALER_STATE_ADD_CALL_APPCONTROL,
+};
+
+//Error code to handle error scenarios
+enum ErrorCodes
+{
+ ERROR_NONE,
+ ERROR_INVALID_INPUT,
+ ERROR_DIAL_FAILED,
+ ERROR_INVALID_NUMBER,
+ ERROR_REJECT_FAILED,
+ ERROR_JOIN_FAILED,
+ ERROR_SWAP_FAILED,
+ ERROR_END_CALL_FAILED,
+ ERROR_END_FROM_CONFERENCE_FAILED,
+ ERROR_SPLIT_FROM_CONFERENCE_FAILED,
+ ERROR_CODE_SIM_INITIALIZATION_FAILED,
+ ERROR_NOT_EMERGENCY_NUM,
+ ERROR_TAPI_INIT_FAILED,
+ ERROR_TAPI_ERROR,
+ ERROR_BARRING_PWD_TOO_LONG,
+ ERROR_FLIGHT_MODE_SET,
+ ERROR_SYSTEM_FAILURE,
+ ERROR_WRONG_BARRING_PASSWORD,
+ ERROR_GENERAL,
+};
+
+enum DialerRequestType
+{
+ REQUEST_SHOW_SUGGESTION,
+ REQUEST_SHOW_ADD_TO_CONTACTS,
+ REQUEST_SHOW_SPEED_DIAL_POPUP,
+ REQUEST_SHOW_VOICE_MAIL_POPUP,
+ REQUEST_CALL_SPEED_DIAL_NUM,
+};
+
+enum LogRequestType
+{
+ REQUEST_CHANGE_EDIT_MODE,
+ REQUEST_CHANGE_VIEWBY,
+ REQUEST_CHANGE_BLOCK,
+};
+
+enum IncomingCallFormRequestType
+{
+ REQUEST_ITEM_SELECTED,
+};
+
+enum UpdateTableView
+{
+ REQUEST_UPDATE_TABLE,
+};
+
+//Action Ids for Settings module & Speed dial
+enum ActionId
+{
+ IDA_VOICEMAIL = 1,
+ IDA_SELECT_PHOTO2,
+ IDA_SELECT_PHOTO3,
+ IDA_SELECT_PHOTO4,
+ IDA_SELECT_PHOTO5,
+ IDA_SELECT_PHOTO6,
+ IDA_SELECT_PHOTO7,
+ IDA_SELECT_PHOTO8,
+ IDA_SELECT_PHOTO9,
+ IDA_SELECT_CONTACT,
+};
+
+enum FooterActionId
+{
+ IDA_ADD_FOOTER_ITEMID = IDA_SELECT_CONTACT + 1,
+ IDA_DELETE_FOOTER_ITEMID,
+ IDA_CANCEL_FOOTER_ITEMID,
+ IDA_SAVE_FOOTER_ITEMID,
+ IDA_POPUP_INVALID_OK,
+ IDA_NOACTION_ITEMID,
+};
+
+enum HeaderActionId
+{
+ IDA_SAVE_HEADER_ITEMID = IDA_NOACTION_ITEMID + 1,
+ IDA_CANCEL_HEADER_ITEMID,
+};
+
+enum PopupActionId
+{
+ IDA_BUTTON_CLOSE_SPEED_DIAL_POPUP = IDA_CANCEL_HEADER_ITEMID + 1,
+ IDA_UPDATE_SPEED_DIAL,
+ IDA_REMOVE_SPEED_DIAL,
+};
+enum CallForwardCondition
+{
+ CALL_FORWARD_ALL, /* Forward All Calls */
+ CALL_FORWARD_BUSY, /* Forward if Busy */
+ CALL_FORWARD_NO_REPLY, /* Forward if No Reply */
+ CALL_FORWARD_NOT_REACHABLE /* Forward if Not Reachable */
+};
+
+enum CallBarringType
+{
+ CALL_BARRING_ALL_OUTGOING, /* Barring All Outgoing Calls */
+ CALL_BARRING_INTERNATIONAL_OUTGOING, /* Barring Outgoing International Calls */
+ CALL_BARRING_INTERNATIONAL_EXCEPT_HOME, /* Barring Outgoing International Calls except to Home Country */
+ CALL_BARRING_ALL_INCOMING, /* Barring All Incoming Calls */
+ CALL_BARRING_INCOMING_ROAMING /* Barring Incoming Calls when roam*/
+};
+
+enum CallLineIdentity
+{
+ CALL_LINE_IDENTITY_DEFAULT = 0, /**< Calling line identity will be sent. Based on network setting, Line identity will presented to the called party. */
+ CALL_LINE_IDENTITY_SHOW, /**< Display calling line identity */
+ CALL_LINE_IDENTITY_HIDE /**< Hide the display of Calling line identity */
+};
+
+enum CallRejectMatchCondition
+{
+ CALL_REJECT_MATCH_EXACTLY = 1,
+ CALL_REJECT_MATCH_START,
+ CALL_REJECT_MATCH_END,
+ CALL_REJECT_MATCH_INCLUDE,
+};
+
+enum CallRejectUpdateField
+{
+ CALL_REJECT_UPDATE_RULE = 1,
+ CALL_REJECT_UPDATE_NUMBER,
+ CALL_REJECT_UPDATE_ACTIVATE
+};
+
+enum CallAlertStatus
+{
+ CALL_ALERT_OFF = 0,
+ CALL_ALERT_SOUND,
+ CALL_ALERT_VIBRATE
+};
+
+enum CallState
+{
+ /** No call connected */
+ CALL_STATE_CALL_OFF = 0,
+ /** Voice call is connecting */
+ CALL_STATE_CALL_VOICE_CONNECTING,
+ /** Voice call is connected */
+ CALL_STATE_CALL_VOICE_ACTIVE,
+ /** Video call is connecting */
+ CALL_STATE_CALL_VIDEO_CONNECTING,
+ /** Video call is connecting */
+ CALL_STATE_CALL_VIDEO_ACTIVE,
+
+ CALL_STATE_MAX
+
+};
+
+//Constants
+extern const wchar_t* IDI_KEY2_TXT;
+extern const wchar_t* IDI_KEY3_TXT;
+extern const wchar_t* IDI_KEY4_TXT;
+extern const wchar_t* IDI_KEY5_TXT;
+extern const wchar_t* IDI_KEY6_TXT;
+extern const wchar_t* IDI_KEY7_TXT;
+extern const wchar_t* IDI_KEY8_TXT;
+extern const wchar_t* IDI_KEY9_TXT;
+
+//Settings UI contants
+// Colors used in List views //
+extern const unsigned int COLOR_GROUP_ITEM_BG;
+extern const unsigned int COLOR_LIST_MENU_ITEM;
+extern const unsigned int COLOR_SECONDDEPTH_ITEM_BG;
+extern const unsigned int COLOR_HELP_ITEM_BG;
+extern const unsigned int COLOR_NORMAL_MAIN_TXT;
+extern const unsigned int COLOR_NORMAL_SUB_TXT;
+extern const unsigned int COLOR_NORMAL_SELECTED_OPTION_SUB_TXT;
+extern const unsigned int COLOR_PRESS_SUB_TXT;
+extern const unsigned int COLOR_PRESS_MAIN_TXT;
+extern const unsigned int COLOR_HELP_TXT;
+extern const unsigned int COLOR_LEFT_HEADER_EXPAND_ITEMS;
+//Main List Option text
+extern const unsigned int COLOR_MAIN_TXT;
+extern const unsigned int COLOR_REJECT_MESSAGE_TXT;
+//Main List text
+extern const int NORMAL_FONT_SIZE_MAIN_TXT;
+extern const int GIANT_FONT_SIZE_MAIN_TXT;
+extern const int HUGE_FONT_SIZE_MAIN_TXT;
+extern const int LARGE_FONT_SIZE_MAIN_TXT;
+extern const int SMALL_FONT_SIZE_MAIN_TXT;
+extern const int FONT_SIZE_SUB_TXT;
+
+extern const int NORMAL_ITEMRECT_SIZE;
+extern const int GIANT_ITEMRECT_SIZE;
+extern const int HUGE_ITEMRECT_SIZE;
+extern const int LARGE_ITEMRECT_SIZE;
+extern const int SMALL_ITEMRECT_SIZE;
+
+extern const int NORMAL_MAINTEXTRECT_SIZE;
+extern const int GIANT_MAINTEXTRECT_SIZE;
+extern const int HUGE_MAINTEXTRECT_SIZE;
+extern const int LARGE_MAINTEXTRECT_SIZE;
+extern const int SMALL_MAINTEXTRECT_SIZE;
+
+extern const int NORMAL_SUBTEXTRECT_SIZE;
+extern const int GIANT_SUBTEXTRECT_SIZE;
+extern const int HUGE_SUBTEXTRECT_SIZE;
+extern const int LARGE_SUBTEXTRECT_SIZE;
+extern const int SMALL_SUBTEXTRECT_SIZE;
+
+//Help text
+extern const int FONT_SIZE_HELP_TXT;
+extern const int W_HDR_FTR_ICON;
+extern const int H_HDR_FTR_ICON;
+//Processing Animation constants
+extern const int IDI_ANIM_DURATION;
+extern const int IDI_ANIM_PROGRESS_COUNT;
+//Delete List
+extern const unsigned int COLOR_NORMAL_ITEM_BG;
+extern const unsigned int COLOR_PRESS_ITEM_BG;
+extern const unsigned int COLOR_SELECTALL_ITEM_BG;
+
+// Dimensions used in Settings List views //
+// menu item height
+extern const int H_LIST_HIDDENGROUP_ITEM;
+extern const int H_LIST_NORMAL_MENU_ITEM;
+extern const int H_LIST_DROPDOWN_MENU_ITEM;
+extern const int H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+extern const int H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+extern const int H_EDITOR_LIST_ITEM;
+//text item height
+extern const int H_LIST_NORMAL_TXT_ITEM;
+extern const int H_LIST_SUB_TXT_ITEM;
+//Two line text for Drop down menu item
+extern const int H_LIST_DROPDOWN_TXT_ITEM;
+//single line text
+extern const int X_LIST_MENU_TEXT_ITEM;
+extern const int Y_LIST_MENU_TEXT_ITEM;
+//Help text
+extern const int X_LIST_MENU_HLPTXT_ITEM;
+extern const int Y_LIST_MENU_HLPTXT_ITEM;
+//custom Item for Bg line
+extern const int Y_CUSTOM_BG_ELEMENT;
+//Position for delete list item
+extern const int X_DEL_LIST_ELEMENT;
+extern const int Y_DEL_LIST_ELEMENT;
+extern const int Y_POS_TABLEVIEW_LS;
+extern const int Y_POS_TABLEVIEW_PR;
+
+// Dimensions for icons //
+//Expand icon for DropDown Menu Items
+extern const int W_EXPAND_ICON;
+extern const int H_EXPAND_ICON;
+extern const int W_SLIDER_ICON;
+extern const int H_SLIDER_ICON;
+extern const int W_ANIMATION_MARGIN;
+//contact icon for Add Rejected Number view
+extern const int W_CONTACT_ICON;
+extern const int H_CONTACT_ICON;
+//Dimensions for custom bg line
+extern const int W_CUSTOM_BG_ELEMENT;
+//Item Width for delete list
+extern const int W_DELETE_LIST_ITEM;
+//Width of Blue Header Rectangle for expandable group items
+extern const int W_LEFT_HEADER_EXPAND_ITEMS;
+
+#endif /* PHNTYPES_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnUnknownLogsDetailForm.h
+ * @brief This is the header file for the %UnknownLogsDetailForm class.
+ *
+ * This header file contains the declarations for %UnknownLogsDetailForm class.
+ */
+#ifndef _PHN_UNKNOWN_LOGS_DETAIL_FORM_H_
+#define _PHN_UNKNOWN_LOGS_DETAIL_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FSocial.h>
+#include <FSysSettingInfo.h>
+#include "PhnCallLogPresentationModel.h"
+#include "PhnIAppStateChangeListner.h"
+
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+class CallLogDetails;
+
+/**
+ * @class UnknownLogsDetailForm
+ * @brief This class presents a form based UI for call log details scene.
+ *
+ */
+class UnknownLogsDetailForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::IActionEventListener
+ , public ICalllogChangeListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IGroupedListViewItemProvider
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::System::ISettingEventListener
+{
+
+// Construction
+public:
+ ///UnknownLogsDetailForm constructor
+ UnknownLogsDetailForm(void);
+
+ ///UnknownLogsDetailForm destructor
+ virtual ~UnknownLogsDetailForm(void);
+
+ ///Initializes the UnknownLogsDetailForm form
+ /*
+ * @param: Whether Initialize is success or not
+ */
+ bool Initialize();
+
+ ///This functions gets called during form OnInitializing
+ /*
+ * @param: result
+ */
+ result OnInitializing(void);
+
+ ///This functions gets called during form terminating
+ /*
+ * @param: result
+ */
+ result OnTerminating(void);
+
+ ///IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ //ICalllogChangeListener
+ virtual void OnCalllogChanged(void);
+
+ ///IFormBackEventListener method
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ // IGroupedListViewItemProvider
+ virtual int GetGroupCount(void);
+ virtual int GetItemCount(int groupIndex);
+ virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; }
+
+ ///ISceneEventListener
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ ///ISceneEventListener
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ //ISettingEventListener
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+ void ShowDeletePopup();
+ void GetCurrentDateTime(DateTime& dt);
+ int GetDaysDifferenceBetweenDates(DateTime date1, DateTime date2);
+ void GetTimeText(DateTime datetime,Tizen::Base::String& dateText);
+ void GetCallogIconBitmap(CallLogType logType,Tizen::Graphics::Bitmap*& iconType, Tizen::Graphics::Bitmap*& iconArrow, Tizen::Base::String& text);
+ bool IsTimeToBeDisplayed(CallLogType type);
+
+protected:
+ static const int ID_NAME_STRING;
+ static const int ID_NUMBER_STRING;
+ static const int ID_TIME_STRING;
+ static const int ID_CALLTYPE_BITMAP;
+
+ static const int X_TEXT_LINE1_ITEM;
+ static const int Y_TEXT_LINE1_ITEM;
+ static const int W_TEXT_LINE1_ITEM;
+
+ static const int X_TEXT_LINE2_ITEM;
+ static const int Y_TEXT_LINE2_ITEM;
+ static const int H_TEXT_LINE2_ITEM;
+ static const int W_TEXT_LINE2_ITEM;
+
+ static const int X_TEXT_TIME_ITEM;
+ static const int Y_TEXT_TIME_ITEM;
+ static const int H_TEXT_TIME_ITEM;
+ static const int W_TEXT_TIME_ITEM;
+
+ static const int X_CALLTYPE_BITMAP_ITEM;
+ static const int Y_CALLTYPE_BITMAP_ITEM;
+ static const int H_CALLTYPE_BITMAP_ITEM;
+ static const int W_CALLTYPE_BITMAP_ITEM;
+
+private:
+ Tizen::Ui::Controls::Label* __pUnknownNumber;
+ ///Form footer
+ Tizen::Ui::Controls::Footer* __pFormFooter;
+
+ ///Delete footer item
+ Tizen::Ui::Controls::FooterItem __pFooterItemDelete;
+
+ ///Grouped list view
+ Tizen::Ui::Controls::GroupedListView* __pList;
+
+ Tizen::Ui::Controls::Popup* pDeletePopup;
+
+ CalLogPresentationModel* __pLogPresentor;
+
+ CallLogDetails* __pCalllogInfo;
+
+ float __fontSize;
+ float __itemHeight;
+
+};
+
+#endif /*_PHN_LOGS_DETAIL_FORM_H_*/
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+ <Id>zktdpemtmw</Id>
+ <Version>1.0.0</Version>
+ <Type>C++App</Type>
+ <Requirements>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch.armv7">true</Feature>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch.x86">true</Feature>
+ <Feature Name="http://tizen.org/feature/platform.core.fpu.arch.vfpv3">true</Feature>
+ </Requirements>
+ <Apps>
+ <ApiVersion>2.2</ApiVersion>
+ <Privileges>
+ <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+ <Privilege>http://tizen.org/privilege/appusage</Privilege>
+ <Privilege>http://tizen.org/privilege/setting</Privilege>
+ <Privilege>http://tizen.org/privilege/telephony</Privilege>
+ <Privilege>http://tizen.org/privilege/contact.read</Privilege>
+ <Privilege>http://tizen.org/privilege/messaging.read</Privilege>
+ <Privilege>http://tizen.org/privilege/messaging.write</Privilege>
+ </Privileges>
+ <UiApp LaunchingHistoryVisible="True" Main="True" MenuIconVisible="True" Name="Phone" SubMode="True">
+ <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+ <UiTheme SystemTheme="White"/>
+ <DisplayNames>
+ <DisplayName Locale="eng-US">Phone</DisplayName>
+ <DisplayName Locale="eng-GB">Phone</DisplayName>
+ </DisplayNames>
+ <Icons>
+ <Icon Section="MainMenu">mainmenu.png</Icon>
+ </Icons>
+ <AppControls>
+ <AppControl>
+ <Operation>http://tizen.org/appcontrol/operation/configure</Operation>
+ <Operation>http://tizen.org/appcontrol/operation/dial</Operation>
+ <Uri>tel</Uri>
+ </AppControl>
+ </AppControls>
+ <LaunchConditions/>
+ <Notifications>
+ <Notification Name="Ticker">On</Notification>
+ <Notification Name="Sound">On</Notification>
+ <Notification Name="Contents">Off</Notification>
+ <Notification Name="Badge">On</Notification>
+ </Notifications>
+ </UiApp>
+ </Apps>
+</Manifest>
--- /dev/null
+Name: apps.Phone
+Summary: Phone application
+Version: 1.0.0.0
+Release: 1
+Group: TO_BE/FILLED_IN
+License: TO BE FILLED IN
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: pkgconfig(osp-appfw)
+BuildRequires: pkgconfig(osp-uifw)
+BuildRequires: pkgconfig(osp-social)
+BuildRequires: pkgconfig(osp-messaging)
+BuildRequires: pkgconfig(osp-media)
+BuildRequires: pkgconfig(osp-image)
+BuildRequires: pkgconfig(osp-image-core)
+BuildRequires: pkgconfig(osp-shell)
+BuildRequires: pkgconfig(osp-telephony)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(tapi)
+BuildRequires: pkgconfig(mm-sound)
+BuildRequires: pkgconfig(contacts-service2)
+BuildRequires: pkgconfig(msg-service)
+BuildRequires: osp-appfw-internal-devel
+BuildRequires: osp-uifw-internal-devel
+BuildRequires: osp-media-internal-devel
+BuildRequires: hash-signer
+
+ # runtime requires
+Requires: osp-installer
+
+%description
+Verification application: Phone
+
+%prep
+%setup -q
+
+%build
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+%ifarch %{ix86}
+%if 0%{?simulator}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
+
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE.Flora %{buildroot}/usr/share/license/%{name}
+
+%make_install
+###### for package signing step ######
+PKG_ID=zktdpemtmw
+%define tizen_sign 1
+%define tizen_sign_base /usr/apps/${PKG_ID}
+%define tizen_sign_level platform
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+
+%post
+/sbin/ldconfig
+PKG_ID=zktdpemtmw
+echo "/usr/etc/package-manager/backend/tpk -i /usr/apps/"${PKG_ID}
+/usr/etc/package-manager/backend/tpk -i /usr/apps/${PKG_ID}
+cp -f /usr/lib/osp/osp-ui-app-loader /usr/apps/${PKG_ID}/bin/Phone
+/usr/bin/vconftool set -t int memory/call/state "0" -g 6521 -i -f
+
+%postun
+/sbin/ldconfig
+PKG_ID=zktdpemtmw
+echo "/usr/etc/package-manager/backend/tpk -u "${PKG_ID}
+/usr/etc/package-manager/backend/tpk -u ${PKG_ID}
+
+%files
+%defattr(-,root,root,-)
+/usr/apps/*
+/usr/share/license/%{name}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201302121633" Dversion="20120315">
+ <text id="IDS_SETTING_VOICEFORWARD_NOREPLY_STRING">If no reply</text>
+ <text id="IDS_CONTEXTMENU_ITEM_DETAILS">Details</text>
+ <text id="IDS_SETTING_CALLERID_SUB_STRING">Show</text>
+ <text id="IDS_SETTING_CONNECTTONE_STRING">Call Connect Tone</text>
+ <text id="IDS_CALLLOG_DELETE_FOOTER">Delete</text>
+ <text id="IDS_DIALER_MENU_ITEM_EXIT">Exit</text>
+ <text id="IDS_DIALER_MENU_ITEM_BACK">Back</text>
+ <text id="IDS_SETTING_CONNECTTONE_HLP_STRING">There will be a signal sound when the line is connected</text>
+ <text id="IDS_SETTINGS_MATCHCRITERIA_STRING">Match criteria</text>
+ <text id="IDS_DATETIME_SEP">Sep</text>
+ <text id="IDS_SETTING_REJECT_HLP_STRING">Manage Call mode</text>
+ <text id="IDS_SETTING_VOICEBARRING_INTERNATIONAL_STRING">Int'l calls</text>
+ <text id="IDS_SETTING_DONE_HEADER_ITEM">Done</text>
+ <text id="IDS_SETTING_WAIT_INTERVAL_STRING">seconds</text>
+ <text id="IDS_CALLERID_HIDE_STRING">Hide</text>
+ <text id="IDS_NO_LOGS">No Logs</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_WAIT">Add wait</text>
+ <text id="IDS_SPEEDDIAL_POP_YES_BTN_STRING">Yes</text>
+ <text id="IDS_MESSAGES_SELECTED">%d Messages Selected</text>
+ <text id="IDS_SETTING_CALLTYPE_VOICE_STRING">Voice Call</text>
+ <text id="IDS_SETTING_REMINDERS_STRING">Minute Reminders</text>
+ <text id="IDS_SETTING_WRONG_PASSWORD">Wrong Password</text>
+ <text id="IDS_SETTING_WRONG_PASSWORD_TEXT">Enter Correct Password</text>
+ <text id="IDS_SETTING_SYSTEM_FAILURE">Error</text>
+ <text id="IDS_SETTING_SYSTEM_FAILURE_TEXT">System Failure</text>
+ <text id="IDS_SETTINGS_DELETE_MSGS_TITLE_STRING">Reject Messages</text>
+ <text id="IDS_DEFAULT_SPEED_DIAL_TEXT">.Name</text>
+ <text id="IDS_ALREADY_USED_MSG">already in use</text>
+ <text id="IDS_SETTING_ENDTONE_HLP_STRING">There will be a signal sound when the line is disconnected</text>
+ <text id="IDS_SETTING_WAITING_HLP_STRING">During a call, notify me of incoming calls</text>
+ <text id="IDS_SETTING_REJECT_MSG_STRING">Set Reject Messages</text>
+ <text id="IDS_SETTING_VOICEFORWARD_IFBUSY_STRING">If busy</text>
+ <text id="IDS_REMOVE_CONTACT">Remove</text>
+ <text id="IDS_SETTING_REJECT_MESSAGE_EMPTY">< Create ></text>
+ <text id="IDS_CANCEL">Cancel</text>
+ <text id="IDS_MATCHCRITERIA_INCLUDE_STRING">Includes</text>
+ <text id="IDS_SETTING_FORWARDING_STRING">Call Forwarding</text>
+ <text id="IDS_SETTING_AUTO_AREACODE_STRING">Auto Area Code</text>
+ <text id="IDS_INVALID_NUMBER_ERROR_MSG">Invalid Number.</text>
+ <text id="IDS_CALLLOG_REJECTED">Rejected Call</text>
+ <text id="IDS_PEOPLE_STR">People</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_CONTACT">Add Contact</text>
+ <text id="IDS_SETTING_CALLALERT_OFF_STRING">Off</text>
+ <text id="IDS_DIALER_MENU_ITEM_SPEED_DIAL">Speed Dial</text>
+ <text id="IDS_DATETIME_OCT">Oct</text>
+ <text id="IDS_AM_TIME">AM</text>
+ <text id="IDS_MATCHCRITERIA_END_STRING">Ends With</text>
+ <text id="IDS_SPEED_DIAL_TITLE">Speed Dial</text>
+ <text id="IDS_CALLLOG_CANCEL_FOOTER">Cancel</text>
+ <text id="IDS_CHANGE_CONTACT">Change Contact</text>
+ <text id="IDS_CALLLOG_NO_NUMBER">No Number</text>
+ <text id="IDS_SETTING_SAVE_HEADER_ITEM">Save</text>
+ <text id="IDS_SETTING_CONTACT_BUTTON">Contact</text>
+ <text id="IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING">Rejected Calls</text>
+ <text id="IDS_SETTING_REJECT_STRING">Call Rejection</text>
+ <text id="IDS_NUMBER_SELECTED">%d Number Selected</text>
+ <text id="IDS_BLOCK_CANCEL_BTN_STRING">Cancel</text>
+ <text id="IDS_SETTING_AUTO_AREACODE_HLP_STRING">Automatically add area code to number display panel</text>
+ <text id="IDS_CALLLOG_NO_NAME">No Name</text>
+ <text id="IDS_LONG_BARRING_PWD_ERROR_MSG">Barring Password length should be less than or equal to 4.</text>
+ <text id="IDS_DATETIME_APR">Apr</text>
+ <text id="IDS_SETTING_SPEEDDIAL_STRING">Speed Dial</text>
+ <text id="IDS_DELETE_CONFORMATION_STRING">Delete?</text>
+ <text id="IDS_DATETIME_JUN">Jun</text>
+ <text id="IDS_DATETIME_JUL">Jul</text>
+ <text id="IDS_DIALER_MOBILE_STR">Mobile</text>
+ <text id="IDS_SETTING_WAITING_TIME_STRING">Waiting Time</text>
+ <text id="IDS_SETTING_WAITING_STRING">Call Waiting</text>
+ <text id="IDS_SETTING_VOICEFORWARD_OUTOFREACH_STRING">If out of reach</text>
+ <text id="IDS_SETTING_VOICEBARRING_WHENROAMING_STRING">Incoming When Roaming</text>
+ <text id="IDS_TAPI_INIT_ERROR_MSG">TAPI Server Initialization Failed.</text>
+ <text id="IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING">Received Calls</text>
+ <text id="IDS_ADD_BTN_STRING">Add</text>
+ <text id="IDS_MSG_BTN_NAME">Message</text>
+ <text id="IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE_STRING">Voice Call Forwarding</text>
+ <text id="IDS_CONTEXTMENU_ITEM_VIEWBY">View by</text>
+ <text id="IDS_DATETIME_MAY">May</text>
+ <text id="IDS_SPEED_DIAL_POPUP_TITLE">Edit</text>
+ <text id="IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING">Missed Calls</text>
+ <text id="IDS_SETTING_CALLERID_MAIN_STRING">Show my caller ID</text>
+ <text id="IDS_BLOCK_OK_BTN_STRING">Ok</text>
+ <text id="IDS_DATETIME_MAR">Mar</text>
+ <text id="IDS_CALLLOG_RECEIVED_MSG">Received Message</text>
+ <text id="IDS_SETTING_CALL_ALERT_MAIN_STRING">Alerts during calls</text>
+ <text id="IDS_ADD_TO_CONTACTS">Add To Contacts</text>
+ <text id="IDS_SPEED_DIAL_DELETE_TITLE">Select Speed Dial</text>
+ <text id="IDS_CONTEXTMENU_ITEM_BLOCK">Block</text>
+ <text id="IDS_DIALER_MENU_ITEM_SEND_MSG">Send Message</text>
+ <text id="IDS_MATCHCRITERIA_EXACT_STRING">Exactly the same as</text>
+ <text id="IDS_CALL_OPTION_TITLE">Accept call after</text>
+ <text id="IDS_CALLLOG_OUTGOING">Outgoing Call</text>
+ <text id="IDS_BLOCK_MESSAGE_CHKBTN_STRING">Message</text>
+ <text id="IDS_VIEWBY_CANCEL_BTN_STRING">Cancel</text>
+ <text id="IDS_SETTING_WAITING_OPTIONS_TITLE_STRING">Call Waiting</text>
+ <text id="IDS_GENERAL_TAPI_ERROR_MSG">TAPI Error occurred.</text>
+ <text id="IDS_SETTING_STATUS_TONES_STRING">Call Status Tones</text>
+ <text id="IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG">Emergency Calls Only.</text>
+ <text id="IDS_CALL_OPTION8">Putting held calls(%d) on hold</text>
+ <text id="IDS_CALL_OPTION7">Putting active calls(%d) on hold</text>
+ <text id="IDS_CALL_OPTION6">Ending All Calls</text>
+ <text id="IDS_DEFAULT_REJECT_ITEM_STRING">Unknown</text>
+ <text id="IDS_CALL_OPTION5">Ending Call </text>
+ <text id="IDS_CALL_OPTION4">Ending Active Calls(%d)</text>
+ <text id="IDS_SPLIT_PARTICIPANT_ERROR_MSG">Split From Conference Failed.</text>
+ <text id="IDS_CALL_OPTION3">Ending Held Calls(%d)</text>
+ <text id="IDS_CALL_OPTION2">Ending Call With </text>
+ <text id="IDS_CALL_OPTION1">Putting %ls on hold</text>
+ <text id="IDS_BLOCK_CALL_INFO_STRING">Calls from this number already blocked</text>
+ <text id="IDS_BLOCK_MSG_INFO_STRING">Messages from this number already blocked</text>
+ <text id="IDS_BLOCK_CALL_MSG_INFO_STRING">Calls and messages from this number already blocked</text>
+ <text id="IDS_SETTING_FORWARD_CALLTYPE_TITLE_STRING">Call Forwarding</text>
+ <text id="IDS_NUMBERS_SELECTED">%d Numbers Selected</text>
+ <text id="IDS_CONTEXTMENU_ITEM_VIEWBY">View by</text>
+ <text id="IDS_FLIGHT_MODE_ON">Please disable Flight Mode to Call</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_PAUSE">Add 2-sec pause</text>
+ <text id="IDS_SETTING_CALL_WAITING_OPTIONS_STRING">Call Waiting</text>
+ <text id="IDS_SELECT_ALL_LIST_ITEM_STRING">Select All</text>
+ <text id="IDS_SETTING_ENDTONE_STRING">Call End Tone</text>
+ <text id="IDS_SETTING_CALLALERT_SOUND_STRING">Sound</text>
+ <text id="IDS_SETTING_BARRING_CALLTYPE_TITLE_STRING">Call Barring</text>
+ <text id="IDS_SETTING_VOICEBARRING_INCOMING_STRING">All Incoming Calls</text>
+ <text id="IDS_SETTINGS_DELETE_NUMBER_TITLE_STRING">Select Number</text>
+ <text id="IDS_MESSAGE_SELECTED">%d Message Selected</text>
+ <text id="IDS_AREA_CODE_OFF_STR">Off</text>
+ <text id="IDS_MATCHCRITERIA_START_STRING">Starts With</text>
+ <text id="IDS_VOICE_CALL_BTN_NAME">Voice Call</text>
+ <text id="IDS_INVALID_ARGS_ERROR_MSG">Invalid Parameters Passed.</text>
+ <text id="IDS_SETTING_STATUS_TONES_HLP_STRING">Sound settings during calls</text>
+ <text id="IDS_SETTING_VOICEBARRING_EXCEPTHOME_STRING">Int'l calls except home</text>
+ <text id="IDS_DELETE_BTN_STRING">Delete</text>
+ <text id="IDS_SPEEDDIAL_POP_NO_BTN_STRING">No</text>
+ <text id="IDS_SELECT_CALL_LOG">Select Log</text>
+ <text id="IDS_CALLLOG_MISSED">Missed Call</text>
+ <text id="IDS_CALLLOG_RECEIVED">Received Call</text>
+ <text id="IDS_DATETIME_FEB">Feb</text>
+ <text id="IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING">All Logs</text>
+ <text id="IDS_DATETIME_DEC">Dec</text>
+ <text id="IDS_SELECT_NUMBER">Select Number</text>
+ <text id="IDS_SIM_INIT_ERROR_MSG">Sim initialization is failed or not completed.</text>
+ <text id="IDS_SELECT_MESSAGE">Select Message</text>
+ <text id="IDS_SETTING_BARRING_STRING">Call Barring</text>
+ <text id="IDS_VIEWBY_POPUP_TITLE_STRING">View by</text>
+ <text id="IDS_BLOCK_POPUP_TITLE_STRING">Block</text>
+ <text id="IDS_DATETIME_NOV">Nov</text>
+ <text id="IDS_BLOCK_CALL_CHKBTN_STRING">Call</text>
+ <text id="IDS_SETTING_CALL_ALERT_SUB_STRING">Sound</text>
+ <text id="IDS_DELETING_CALL_LOGS">Deleting Logs</text>
+ <text id="IDS_SETTING_CALLALERT_VIBRATE_STRING">Vibration</text>
+ <text id="IDS_REJECT_MESSAGE_BTN">Reject With Message</text>
+ <text id="IDS_CANCEL_BTN_STRING">Cancel</text>
+ <text id="IDS_SETTING_VOICEBARRING_OUTGOING_STRING">All outgoing calls</text>
+ <text id="IDS_SETTING_CALLTYPE_VIDEO_STRING">Video Call</text>
+ <text id="IDS_MGR_CONF_CALL_LIST_STR">Manage Conference Call</text>
+ <text id="IDS_CALLLOG_SENT_MSG">Sent Message</text>
+ <text id="IDS_SETTINGS_ENTERNUMBER_STRING">Enter Number</text>
+ <text id="IDS_DIALER_SPEEDDIAL_POPUP_MSG">Assign now?</text>
+ <text id="IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG">No Speed Dial Assigned.</text>
+ <text id="IDS_CANCEL_DELETING_CALL_LOGS">Cancel</text>
+ <text id="IDS_LOGS_YESTERDAY">Yesterday</text>
+ <text id="IDS_CALLERID_BYNETWORK_STRING">By network</text>
+ <text id="IDS_CLOSE_POPUP">Close</text>
+ <text id="IDS_LIST_SEND_BUTTON">Send</text>
+ <text id="IDS_EMERGENCY_CALL">Emergency Call</text>
+ <text id="IDS_PM_TIME">PM</text>
+ <text id="IDS_CALLERID_SHOW_STRING">Show</text>
+ <text id="IDS_DIAL_ERROR_MSG">Call Not Allowed.</text>
+ <text id="IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING">Dialed Calls</text>
+ <text id="IDS_SETTING_REJECT_MSG_HLP_STRING">Edit Reject Messages</text>
+ <text id="IDS_GENERAL_ERROR_MSG">General Error.</text>
+ <text id="IDS_SETTING_MORE_MAIN_STRING">Additional Settings</text>
+ <text id="IDS_SETTING_VOICEBARRING_OPTIONS_TITLE_STRING">Voice Call Barring</text>
+ <text id="IDS_REJECT_FAILED_ERROR_MSG">Reject Failed.</text>
+ <text id="IDS_SETTING_VOICEFORWARD_ALWAYS_STRING">Always</text>
+ <text id="IDS_SETTING_REMINDERS_HLP_STRING">There will be signal sounds every minute</text>
+ <text id="IDS_VIDEO_CALL_BTN_NAME">Video Call</text>
+ <text id="IDS_CALL_SWAP_ERROR_MSG">Swap Failed.</text>
+ <text id="IDS_SETTING_DEACTIVATE_STATUS_STRING">Deactivated</text>
+ <text id="IDS_END_PARTICIPANT_ERROR_MSG">End From Conference failed.</text>
+ <text id="IDS_JOIN_FAILED_ERROR_MSG">Join Failed.</text>
+ <text id="IDS_DATETIME_AUG">Aug</text>
+ <text id="IDS_LOGS_TODAY">Today</text>
+ <text id="IDS_DATETIME_JAN">Jan</text>
+ <text id="IDS_SELECTED_ITEM_STRING">Selected (%d)</text>
+ <text id="IDS_DUPLICATE_REJECT_MSG_ERROR_STRING">Already In Use</text>
+ <text id="IDS_SETTING_CALL_ANSWER_MSG_HLP_STRING">Manage Call Answering/Ending Settings</text>
+ <text id="IDS_SETTING_CALL_ACCESSORY_MSG_HLP_STRING">Set Accessory Option For Call</text>
+ <text id="IDS_SETTING_CALL_ANSWERING_STRING">Call Answering/Ending</text>
+ <text id="IDS_SETTING_CALL_ACCESSORY_STRING">Accessory Settings For Call</text>
+ <text id="IDS_SETTING_ANSWER_CALL_KEY_HLP_STRING">Accept Incoming Calls By Pressing The Home Key</text>
+ <text id="IDS_SETTING_END_CALL_KEY_HLP_STRING">Press The Power Key To End Calls. This Will Not Turn Off The Screen.</text>
+ <text id="IDS_SETTING_ANSWER_CALL_KEY_STRING">Accept Calls Using Home</text>
+ <text id="IDS_SETTING_END_CALL_KEY_STRING">The Power Key Ends Calls</text>
+ <text id="IDS_SETTING_BT_SETTINGS_HEADING_STRING">BT Headset Settings For Outgoing Calls</text>
+ <text id="IDS_SETTING_OUTCALL_CONDITION_HLP_STRING">Make Calls Even When Device Locked</text>
+ <text id="IDS_SETTING_OUTCALL_CONDITION_MAIN_STRING">Outgoing Call Conditions</text>
+ <text id="IDS_SETTING_OUTCALL_LOCKDEVICE_STRING">Even When Device Locked</text>
+ <text id="IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING">Only When Device Unlocked</text>
+ <text id="IDS_SETTING_ENTER_NUMBER_STRING">Enter Number</text>
+ <text id="IDS_VOICE_MAIL_DEFAULT_STRING">Voice Mail</text>
+ <text id="IDS_SETTING_ADD_NUMBER_TITLE">Add</text>
+ <text id="IDS_SETTING_AUTO_AREA_CODE_TITLE">Auto Area Code</text>
+ <text id="IDS_SETTING_ADD_REJECT_MSG_TITLE">Add</text>
+ <text id="IDS_SETTING_SET_BARRING_PWD_TITLE">Password</text>
+ <text id="IDS_SETTING_EDIT_REJECT_MSG_TITLE">Edit</text>
+ <text id="IDS_DIALER_VOICE_MAIL_POPUP_MSG">No Voice Mail Assigned.\n Assign Now?</text>
+ <text id="IDS_LOW_MEMORY_MSG_TITLE">Low Memory</text>
+ <text id="IDS_LOW_MEMORY_MSG">Memory Low, Delete some data</text>
+ <text id="IDS_DELETE_YES">Yes</text>
+ <text id="IDS_DELETE_NO">No</text>
+ <text id="IDS_PHONE">Phone</text>
+ <text id="IDS_SPEED_DIAL_INVALID_CONTACT">Invalid Contact: </text>
+ <text id="IDS_SPEED_DIAL_INVALID_CONTACT_OK">Ok</text>
+ <text id="IDS_CHECKBUTTON_SELECTALL">Select All</text>
+ <text id="IDS_SETTINGS_MAINMENU_FORM_TITLE">Call</text>
+ <text id="IDS_SETTINGS_REJECTLIST_FORM">Call Rejection</text>
+ <text id="IDS_SETTINGS_REJECTMSGS_FORM">Reject Messages</text>
+ <text id="IDS_SETTINGS_CALL_ACCESSORY_FORM">Accessory Settings For Call</text>
+ <text id="IDS_SETTINGS_MOREOPTIONS_FORM">Additional Settings</text>
+ <text id="IDS_SETTINGS_STATUS_TONES_FORM_TITLE">Call Status Tones</text>
+ <text id="IDS_SETTING_SET_BARRING_PWD_LABEL_STRING">Enter Password</text>
+ <text id="IDS_DIALER_KEYPAD_STRING">Keypad</text>
+ <text id="IDS_DIALER_LOGS_STRING">Logs</text>
+ <text id="IDS_SILENT_MODE_ENABLED">Silent Mode Enabled</text>
+ <text id="IDS_SILENT_MODE_DISABLED">Silent Mode Disabled</text>
+ <text id="IDS_DIALER_VOICE_POPUP_MSG">Assign now?</text>
+ <text id="IDS_DIALER_VOICE_POPUP_TITLE_MSG">No Voice Mail Assigned.</text>
+ <text id="IDS_MESSAGE_NUMBER_IS_INVALID">Is Invalid Messaging Number</text>
+ <text id="IDS_CALL_NUMBER_IS_INVALID">Is Invalid Number</text>
+ <text id="IDS_UNKNOWN">Unknown</text>
+ <text id="IDS_INVALID_CONTACT_STRING">Invalid Contact</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="2.0.0.201307091413" Dversion="20120315">
+ <Popup id="IDL_CALL_BLOCK_POPUP">
+ <property accessibilityHint="" color="" titleText="::IDS_BLOCK_POPUP_TITLE_STRING" titleTextColor=""/>
+ <layout height="450.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+ <layout height="450.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+ </Popup>
+ <CheckButton id="IDC_BLOCK_CALL" parent="IDL_CALL_BLOCK_POPUP">
+ <property accessibilityHint1="" accessibilityHint2="" backgroundStyle="BACKGROUND_STYLE_DEFAULT" colorOfText="" colorOfTitleText="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" groupId="0" groupStyle="GROUP_STYLE_NONE" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalAlign="ALIGN_LEFT" normalColor="" normalColorOpacity="100" pressedColor="" pressedColorOpacity="100" pressedTextColor="" pressedTitleTextColor="" showTitleText="false" text="Call" titleText="" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="15.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="15.0"/>
+ </CheckButton>
+ <CheckButton id="IDC_BLOCK_MESSAGE" parent="IDL_CALL_BLOCK_POPUP">
+ <property accessibilityHint1="" accessibilityHint2="" backgroundStyle="BACKGROUND_STYLE_DEFAULT" colorOfText="" colorOfTitleText="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" groupId="0" groupStyle="GROUP_STYLE_NONE" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalAlign="ALIGN_LEFT" normalColor="" normalColorOpacity="100" pressedColor="" pressedColorOpacity="100" pressedTextColor="" pressedTitleTextColor="" showTitleText="false" text="Message" titleText="" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="127.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="127.0"/>
+ </CheckButton>
+ <Button id="IDC_BLOCK_OK" parent="IDL_CALL_BLOCK_POPUP">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Ok" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="268.0" x="316.0" y="258.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="267.0" x="19.0" y="257.0"/>
+ </Button>
+ <Button id="IDC_BLOCK_CANCEL" parent="IDL_CALL_BLOCK_POPUP">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Cancel" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="267.0" x="13.0" y="259.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="267.0" x="310.0" y="257.0"/>
+ </Button>
+ <Label id="IDC_BLOCK_INFO" parent="IDL_CALL_BLOCK_POPUP">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Block info" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="15.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_BLOCK_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_BLOCK_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="15.0"/>
+ </Label>
+</ScenePopup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201310162149" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_CALL_LOG_DETAIL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Panel id="IDC_PANEL_NAME" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="66.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="491.0" x="26.0" y="33.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="65.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_CALL_LOG_DETAIL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="984.0" x="26.0" y="20.0"/>
+ </Panel>
+ <Label id="IDC_LABEL_NAME" parent="IDC_PANEL_NAME">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="0" text="Name" textColor="" textSize="50.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout height="66.0" mode="Portrait" width="394.0" x="0.0" y="0.0"/>
+ <layout height="65.0" mode="Landscape" width="96.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_LABEL_NUMBER_COUNT" parent="IDC_PANEL_NAME">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="0" text="Count" textColor="" textSize="50.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout height="66.0" mode="Portrait" width="97.0" x="393.0" y="0.0"/>
+ <layout height="65.0" mode="Landscape" width="96.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_LABEL_NUMBER" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#000000" textSize="36.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_PANEL_NAME" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="491.0" x="26.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="51.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_PANEL_NAME" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="949.0" x="26.0" y="85.0"/>
+ </Label>
+ <Button id="IDC_BUTTON_CALL" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="138.0" x="165.0" y="208.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="138.0" x="300.0" y="185.0"/>
+ </Button>
+ <Button id="IDC_BUTTON_MESSAGE" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="138.0" x="417.0" y="208.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="138.0" x="860.0" y="185.0"/>
+ </Button>
+ <Button id="IDC_BUTTON_CONTACT_IMAGE" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="177.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="26.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_DETAIL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="543.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="177.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_DETAIL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="1103.0" y="0.0"/>
+ </Button>
+ <CheckButton id="IDC_SELECTALL" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property accessibilityHint1="" accessibilityHint2="" backgroundStyle="BACKGROUND_STYLE_DEFAULT" colorOfText="" colorOfTitleText="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" groupId="0" groupStyle="GROUP_STYLE_NONE" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalAlign="ALIGN_LEFT" normalColor="" normalColorOpacity="100" pressedColor="" pressedColorOpacity="100" pressedTextColor="" pressedTitleTextColor="" showTitleText="false" text="::IDS_CHECKBUTTON_SELECTALL" titleText="" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="153.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="153.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </CheckButton>
+ <Label id="IDC_LABEL_BLOCKED" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="56.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="56.0" x="654.0" y="43.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="56.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="50.0" x="1220.0" y="24.0"/>
+ </Label>
+ <Label id="IDC_LABEL_DETAIL_SELECTED" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="" textColor="" textSize="32.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_CALL_LOG_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="48.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="IDL_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="1172.0"/>
+ <layout bottomRelation="IDL_CALL_LOG_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="585.0"/>
+ </Label>
+ <Panel id="IDC_PANEL_NUMBER_UNSAVED" parent="IDL_CALL_LOG_DETAIL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="66.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="616.0" x="26.0" y="33.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="1081.0" x="15.0" y="36.0"/>
+ </Panel>
+ <Label id="IDC_LABEL_UNSAVED_NUMBER" parent="IDC_PANEL_NUMBER_UNSAVED">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="0" text="Unsaved Number" textColor="" textSize="50.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout height="66.0" mode="Portrait" width="370.0" x="0.0" y="0.0"/>
+ <layout height="52.0" mode="Landscape" width="77.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_LABEL_COUNT" parent="IDC_PANEL_NUMBER_UNSAVED">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="0" text="Count" textColor="" textSize="50.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout height="66.0" mode="Portrait" width="248.0" x="368.0" y="0.0"/>
+ <layout height="52.0" mode="Landscape" width="77.0" x="0.0" y="0.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="2.0.0.201307091413" Dversion="20120315">
+ <Popup id="IDL_CALL_LOG_VIEWBY_POPUP">
+ <property accessibilityHint="" color="" titleText="::IDS_VIEWBY_POPUP_TITLE_STRING" titleTextColor=""/>
+ <layout height="573.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+ <layout height="573.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+ </Popup>
+ <ListView id="IDC_VIEWBY_LISTVIEW" parent="IDL_CALL_LOG_VIEWBY_POPUP">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" itemDivider="true" itemDividerColor="" listScrollStyle="SCROLL_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="360.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_VIEWBY_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="360.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="0.0"/>
+ </ListView>
+ <Button id="IDC_BUTTON_CANCEL" parent="IDL_CALL_LOG_VIEWBY_POPUP">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_CANCEL" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="350.0" x="125.0" y="393.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="360.0" x="120.0" y="392.0"/>
+ </Button>
+</ScenePopup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201309111403" Dversion="20120315">
+ <Panel id="IDL_DIALER_KEYPAD_PANEL">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout column1Collapsed="false" column1Shrinkable="false" column1Spacing="0.0" column1Stretchable="false" column2Collapsed="false" column2Shrinkable="false" column2Spacing="24.0" column2Stretchable="false" column3Collapsed="false" column3Shrinkable="false" column3Spacing="24.0" column3Stretchable="false" height="615.0" maxColumn="3" maxRow="4" mode="Portrait" row1Collapsed="false" row1Shrinkable="true" row1Spacing="0.0" row1Stretchable="false" row2Collapsed="false" row2Shrinkable="true" row2Spacing="4.0" row2Stretchable="false" row3Collapsed="false" row3Shrinkable="true" row3Spacing="4.0" row3Stretchable="false" row4Collapsed="false" row4Shrinkable="true" row4Spacing="4.0" row4Stretchable="false" type="LAYOUT_GRID" width="720.0" x="0.0" y="0.0"/>
+ <layout column1Collapsed="false" column1Shrinkable="false" column1Spacing="0.0" column1Stretchable="false" column2Collapsed="false" column2Shrinkable="true" column2Spacing="12.0" column2Stretchable="false" column3Collapsed="false" column3Shrinkable="false" column3Spacing="12.0" column3Stretchable="false" height="609.0" maxColumn="3" maxRow="4" mode="Landscape" row1Collapsed="false" row1Shrinkable="false" row1Spacing="0.0" row1Stretchable="false" row2Collapsed="false" row2Shrinkable="false" row2Spacing="3.0" row2Stretchable="false" row3Collapsed="false" row3Shrinkable="false" row3Spacing="3.0" row3Stretchable="false" row4Collapsed="false" row4Shrinkable="false" row4Spacing="3.0" row4Stretchable="false" type="LAYOUT_GRID" width="640.0" x="0.0" y="0.0"/>
+ </Panel>
+ <Button id="IDC_BUTTON1" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="9.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="26.0" marginRight="0.0" marginTop="22.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON2" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON3" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="9.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON4" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="9.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="26.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON5" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON6" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="9.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON7" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="9.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="26.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON8" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON9" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="9.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON10" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="9.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="26.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON11" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+ <Button id="IDC_BUTTON12" parent="IDL_DIALER_KEYPAD_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="150.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="9.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="218.0"/>
+ <layout height="140.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="188.0"/>
+ </Button>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307091413" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_DIAL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="0" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="0" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet>
+ <headerItem accessibilityHint="" actionId="101" disabledBGBitmapPath="" disabledIconPath="" highlightedBGBitmapPath="" highlightedIconPath="" normalBGBitmapPath="" normalIconPath="" pressedBGBitmapPath="" pressedIconPath="" selectedBGBitmapPath="" text="::IDS_DIALER_KEYPAD_STRING"/>
+ <headerItem accessibilityHint="" actionId="103" disabledBGBitmapPath="" disabledIconPath="" highlightedBGBitmapPath="" highlightedIconPath="" normalBGBitmapPath="" normalIconPath="" pressedBGBitmapPath="" pressedIconPath="" selectedBGBitmapPath="" text="::IDS_DIALER_LOGS_STRING"/>
+ </itemSet>
+ </Header>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201303280947" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_EMERGENCY_DIAL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Panel id="IDC_PANEL_EMERGENCY_DISPLAY_DATA" parent="IDL_EMERGENCY_DIAL_FORM">
+ <property backgroundColor="#E8F5FD" backgroundColorOpacity="100" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="1220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_DIAL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_EMERGENCY_DIAL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_EMERGENCY_DIAL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="362.0" y="14.0"/>
+ </Panel>
+ <Label id="IDC_LABEL_EMERGENCY" parent="IDC_PANEL_EMERGENCY_DISPLAY_DATA">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#3F9BD2" backgroundColorOpacity="100" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="::IDS_EMERGENCY_CALL" textColor="#F9F9F9" textSize="54.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="108.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_EMERGENCY_DISPLAY_DATA" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_PANEL_EMERGENCY_DISPLAY_DATA" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_EMERGENCY_DISPLAY_DATA" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="185.0" x="200.0" y="0.0"/>
+ </Label>
+ <EditField id="IDC_EDITFIELD_NUMBER" parent="IDC_PANEL_EMERGENCY_DISPLAY_DATA">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="false" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="16.0" inputStyle="INPUT_STYLE_FULLSCREEN" keypadAction="" keypadEnabled="false" limitLength="18" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="#E8F5FD" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedColor="" pressedColorOpacity="100" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="45.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="90.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_EMERGENCY_DISPLAY_DATA" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="77.0" mode="Portrait" rightRelation="IDC_PANEL_EMERGENCY_DISPLAY_DATA" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_NORMAL" topRelation="IDC_LABEL_EMERGENCY" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="185.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" style="EDIT_FIELD_STYLE_NORMAL" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="148.0" x="268.0" y="0.0"/>
+ </EditField>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="2.0.0.201303182057" Dversion="20120315">
+ <Popup id="IDL_ERROR_MSG_POPUP">
+ <property accessibilityHint="" color="" titleText="" titleTextColor=""/>
+ <layout height="213.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="688.0"/>
+ <layout height="120.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="868.0"/>
+ </Popup>
+ <TextBox id="IDC_MSG_TEXTBOX" parent="IDL_ERROR_MSG_POPUP">
+ <property accessibilityHint="" disabledBackgroundBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" disabledTextColor="" highlightedBackgroundBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" lineSpacingExtra="1.0" lineSpacingMultiplier="1.0" normalBackgroundBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" text="" textAlignment="" textSize="42.0" textboxBorder="TEXT_BOX_BORDER_NONE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="true" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ERROR_MSG_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_ERROR_MSG_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="648.0" x="0.0" y="79.5"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="true" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ERROR_MSG_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_ERROR_MSG_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="828.0" x="0.0" y="33.0"/>
+ </TextBox>
+</ScenePopup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201310251600" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Panel id="IDL_PANEL_DIALER">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="1097.0" mode="Portrait" type="LAYOUT_RELATIVE" width="720.0" x="0.0" y="0.0"/>
+ <layout height="609.0" mode="Landscape" type="LAYOUT_RELATIVE" width="1280.0" x="0.0" y="0.0"/>
+ </Panel>
+ <Label id="IDC_LABEL_BACKGROUND" parent="IDL_PANEL_DIALER">
+ <property accessibilityHint="" backgroundBitmapPath="C01-3_number saerch_bg_02.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="315.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="782.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="461.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="148.0" marginLeft="640.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="640.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_LABEL_KEYPAD" parent="IDL_PANEL_DIALER">
+ <property accessibilityHint="" backgroundBitmapPath="C01-3_keypad_bg.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="782.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LABEL_BACKGROUND" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="315.0"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="609.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ </Label>
+ <EditField id="IDC_EDITFIELD" parent="IDL_PANEL_DIALER">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="#FFFFFF" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="false" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="#FFFFFF" horizontalMargin="0.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="false" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="#FFFFFF" pressedBGBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="94.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="#FFFFFF" verticalMargin="0.0" viewMode="false"/>
+ <layout bottomRelation="IDC_LABEL_BACKGROUND" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="177.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="138.0" marginLeft="0.0" marginRight="92.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="628.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDC_LABEL_BACKGROUND" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="202.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_LABEL_KEYPAD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="259.0" marginLeft="0.0" marginRight="92.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="548.0" x="640.0" y="0.0"/>
+ </EditField>
+ <Button id="IDC_BUTTON_CLEAR" parent="IDL_PANEL_DIALER">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-3_icon_clear.png" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="C01-3_dialer_icon_clear.png" pressedBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_LABEL_BACKGROUND" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="44.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="201.0" marginLeft="6.0" marginRight="10.0" marginTop="70.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="76.0" x="634.0" y="70.0"/>
+ <layout bottomRelation="None" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="44.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="350.0" marginLeft="8.0" marginRight="8.0" marginTop="86.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_PANEL_DIALER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="76.0" x="1196.0" y="86.0"/>
+ </Button>
+ <Button id="IDC_BUTTON_SEARCHFIELD" parent="IDL_PANEL_DIALER">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="C01-3_search_field.png" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="" horizontalAlign="ALIGN_LEFT" normalBGBitmapPath="" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="#9C9FA2" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" pressedTextColor="#9C9FA2" text="Search" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="66.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="584.0" x="61.0" y="111.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="50.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="50.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="500.0" x="730.0" y="0.0"/>
+ </Button>
+ <Button id="IDC_BUTTON_SEARCHICON" parent="IDL_PANEL_DIALER">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="C01-3_search_icon.png" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="C01-3_search_icon.png" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-3_search_icon.png" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="C01-3_search_icon.png" pressedBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="44.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="16.0" marginTop="10.0" mode="Portrait" rightRelation="IDC_BUTTON_SEARCHFIELD" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BUTTON_SEARCHFIELD" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="44.0" x="1.0" y="121.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="60.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_BUTTON_SEARCHFIELD" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="60.0" x="670.0" y="0.0"/>
+ </Button>
+ <Panel id="IDC_PANEL_SEARCH_BOX" parent="IDL_PANEL_DIALER">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDC_LABEL_BACKGROUND" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="177.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LABEL_BACKGROUND" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="177.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="259.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_LABEL_KEYPAD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_EDITFIELD" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="640.0" y="202.0"/>
+ </Panel>
+ <Panel id="IDC_PANEL_USE_CONTACT" parent="IDC_PANEL_SEARCH_BOX">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDC_PANEL_SEARCH_BOX" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_BOX" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_BOX" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_BOX" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="119.0"/>
+ </Panel>
+ <Button id="IDC_BUTTON_USE_CONTACT" parent="IDC_PANEL_USE_CONTACT">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="138.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_USE_CONTACT" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_USE_CONTACT" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ </Button>
+ <Panel id="IDC_PANEL_DROPDOWN" parent="IDC_PANEL_SEARCH_BOX">
+ <property backgroundColor="#4D4D4D" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDC_PANEL_SEARCH_BOX" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="86.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="26.0" marginLeft="0.0" marginRight="26.0" marginTop="26.0" mode="Portrait" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_BOX" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="86.0" x="608.0" y="26.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="86.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="26.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="86.0" x="528.0" y="141.0"/>
+ </Panel>
+ <Button id="IDC_BUTTON_DROP_DOWN" parent="IDC_PANEL_DROPDOWN">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="86.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="86.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="86.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="86.0" x="0.0" y="0.0"/>
+ </Button>
+ <Button id="IDC_BUTTON_ADD_CONTACTS" parent="IDC_PANEL_SEARCH_BOX">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_ADD_TO_CONTACTS" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_PANEL_SEARCH_BOX" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="92.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_BOX" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="30.0" marginLeft="22.0" marginRight="22.0" marginTop="16.0" mode="Portrait" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_BOX" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="676.0" x="22.0" y="16.0"/>
+ <layout bottomRelation="IDC_PANEL_SEARCH_BOX" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="92.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_BOX" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="30.0" marginLeft="28.0" marginRight="22.0" marginTop="137.0" mode="Landscape" rightRelation="IDC_PANEL_SEARCH_BOX" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_BOX" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="590.0" x="28.0" y="137.0"/>
+ </Button>
+ <Panel id="IDC_PANEL_LASTROW" parent="IDL_PANEL_DIALER">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="148.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="634.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="949.0"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="148.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_LABEL_KEYPAD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LABEL_BACKGROUND" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="640.0" y="461.0"/>
+ </Panel>
+ <Label id="IDC_LABEL_LASTROW_BG" parent="IDC_PANEL_LASTROW">
+ <property accessibilityHint="" backgroundBitmapPath="C01-3_keypad_bg_reduction.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_PANEL_LASTROW" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="148.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_LASTROW" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_PANEL_LASTROW" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_LASTROW" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDC_PANEL_LASTROW" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="148.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_LASTROW" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_LASTROW" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_LASTROW" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ </Label>
+ <Button id="IDC_BUTTON_CALL" parent="IDC_PANEL_LASTROW">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-3_button_01.png" normalBitmapPath="C01-3_icon_call.png" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="C01-3_button_01_press.png" pressedBitmapPath="C01-3_icon_call.png" pressedColor="#FFFFFF" pressedColorOpacity="0" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_PANEL_LASTROW" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="116.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="16.0" marginLeft="122.0" marginRight="122.0" marginTop="16.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_PANEL_LASTROW" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="298.0" x="211.0" y="16.0"/>
+ <layout bottomRelation="IDC_PANEL_LASTROW" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="116.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_LASTROW" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="171.0" marginRight="171.0" marginTop="16.0" mode="Landscape" rightRelation="IDC_PANEL_LASTROW" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_LASTROW" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="298.0" x="171.0" y="16.0"/>
+ </Button>
+ <Panel id="IDC_PANEL_SEARCH_LIST" parent="IDL_PANEL_DIALER">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDL_PANEL_DIALER" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="782.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="IDL_PANEL_DIALER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LABEL_BACKGROUND" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="315.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="135.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_LABEL_KEYPAD" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_DIALER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="640.0" y="474.0"/>
+ </Panel>
+ <ListView id="IDC_LISTVIEW_SEARCH" parent="IDC_PANEL_SEARCH_LIST">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" itemDivider="true" itemDividerColor="" listScrollStyle="SCROLL_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="782.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_LIST" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_PANEL_SEARCH_LIST" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_LIST" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="8.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_SEARCH_LIST" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_SEARCH_LIST" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_SEARCH_LIST" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ </ListView>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+<ScenePanel Bversion="2.0.0.201308220944" Dversion="20120315">
+ <Panel id="IDL_PANEL_LOGS">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="1000.0" mode="Portrait" type="LAYOUT_RELATIVE" width="720.0" x="0.0" y="0.0"/>
+ <layout height="720.0" mode="Landscape" type="LAYOUT_RELATIVE" width="1000.0" x="0.0" y="0.0"/>
+ </Panel>
+ <CheckButton id="IDC_CHECKBUTTON_SELECTALL" parent="IDL_PANEL_LOGS">
+ <property accessibilityHint1="" accessibilityHint2="" backgroundStyle="BACKGROUND_STYLE_DEFAULT" colorOfText="" colorOfTitleText="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" groupId="0" groupStyle="GROUP_STYLE_NONE" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalAlign="ALIGN_LEFT" normalColor="" normalColorOpacity="100" pressedColor="" pressedColorOpacity="100" pressedTextColor="" pressedTitleTextColor="" showTitleText="false" text="::IDS_CHECKBUTTON_SELECTALL" titleText="" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_LOGS" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_LOGS" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDL_PANEL_LOGS" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_LOGS" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_LOGS" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDL_PANEL_LOGS" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1000.0" x="0.0" y="0.0"/>
+ </CheckButton>
+ <Label id="IDC_LABEL_SELECTED_POPUP" parent="IDL_PANEL_LOGS">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="" textColor="" textSize="32.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_PANEL_LOGS" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="48.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_LOGS" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_PANEL_LOGS" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="952.0"/>
+ <layout bottomRelation="IDL_PANEL_LOGS" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="40.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_PANEL_LOGS" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_PANEL_LOGS" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1000.0" x="0.0" y="680.0"/>
+ </Label>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201309041510" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Label id="IDC_LABEL_UNKNOWN" parent="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="::IDS_UNKNOWN" textColor="" textSize="50.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="156.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="156.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </Label>
+ <GroupedListView id="IDC_UNKNOWN_LOG_LIST" parent="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" itemDivider="true" itemDividerColor="" listScrollStyle="SCROLL_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sectionColor="" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="948.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Portrait" rightRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDC_LABEL_UNKNOWN" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="176.0"/>
+ <layout bottomRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="461.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Landscape" rightRelation="IDL_RESTRICTED_CALL_LOG_DETAIL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDC_LABEL_UNKNOWN" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="176.0"/>
+ </GroupedListView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201309111403" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE_BUTTON" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <EditField id="IDC_REJECTMSG_EDITFIELD" parent="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="false" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="10.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="true" limitLength="80" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedColor="" pressedColorOpacity="100" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="45.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="10.0" viewMode="false"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="10.0" mode="Portrait" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="20.0" y="10.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="10.0" mode="Landscape" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="" topRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1240.0" x="20.0" y="10.0"/>
+ </EditField>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_ADD_NUMBER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_ADD_NUMBER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_ADD_NUMBER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="946.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="0.0" marginRight="0.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_ADD_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_ADD_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="40.0"/>
+ <layout bottomRelation="IDL_SETTINGS_ADD_NUMBER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_ADD_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_ADD_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="22.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201308220944" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_AUTO_AREA_CODE_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_AUTO_AREA_CODE_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="948.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="0.0" marginRight="0.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="40.0"/>
+ <layout bottomRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_AUTO_AREA_CODE_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="22.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_CALL_ACCESSORY_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_CALL_ACCESSORY_FORM" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_CALL_ACCESSORY_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1044.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="0.0" marginRight="0.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="40.0"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="585.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_ACCESSORY_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="22.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_CALL_ANSWERING_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="Call Answering/Ending" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_CALL_ANSWERING_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="946.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="0.0" marginRight="0.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="40.0"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="544.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_ANSWERING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="629.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_DELETE_LIST_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <ListView id="IDC_LISTVIEW" parent="IDL_SETTINGS_DELETE_LIST_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" itemDivider="true" itemDividerColor="" listScrollStyle="SCROLL_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="IDL_SETTINGS_DELETE_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="978.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_DELETE_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="48.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_DELETE_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_DELETE_LIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="496.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_DELETE_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_DELETE_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_DELETE_LIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </ListView>
+ <Label id="IDC_LABEL_DELETE_SELECTED" parent="IDL_SETTINGS_DELETE_LIST_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="32.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_SETTINGS_DELETE_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="48.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="IDL_SETTINGS_DELETE_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_DELETE_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LISTVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="978.0"/>
+ <layout bottomRelation="IDL_SETTINGS_DELETE_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="48.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_DELETE_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_DELETE_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_LISTVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="496.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <Label id="IDC_DUMMY_LISTVIEW_LABEL" parent="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#F8F6EF" backgroundColorOpacity="100" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="40.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="28.0" marginRight="28.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_FORWARDTO_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="22.0"/>
+ </Label>
+ <Button id="IDC_VOICEMAIL_BUTTON" parent="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Voicemail" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="328.0" x="196.0" y="200.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="328.0" x="476.0" y="182.0"/>
+ </Button>
+ <Label id="IDC_EDITFIELD_TITLE_LABEL" parent="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Enter number" textColor="#808080" textSize="32.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="140.0" marginTop="22.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="528.0" x="36.0" y="62.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="35.0" marginRight="28.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="942.0" x="63.0" y="44.0"/>
+ </Label>
+ <Button id="IDC_SELECT_CONTACT_BUTTON" parent="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="104.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD_TITLE_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="18.0" marginLeft="16.0" marginRight="20.0" marginTop="18.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="104.0" x="580.0" y="58.0"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="104.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD_TITLE_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="18.0" marginLeft="28.0" marginRight="35.0" marginTop="18.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="104.0" x="1033.0" y="40.0"/>
+ </Button>
+ <EditField id="IDC_FOWARDING_NUMBER_EDITFIELD" parent="IDL_SETTINGS_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="true" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="16.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="true" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="44.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="20.0" marginRight="140.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDC_EDITFIELD_TITLE_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="528.0" x="36.0" y="104.0"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="35.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDC_EDITFIELD_TITLE_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="942.0" x="63.0" y="86.0"/>
+ </EditField>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_MAINMENU_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_MAINMENU_FORM_TITLE" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_MAINMENU_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_MAINMENU_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_MAINMENU_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_MAINMENU_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_MAINMENU_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_MAINMENU_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="629.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_MAINMENU_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_MAINMENU_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_MAINMENU_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_MOREOPTIONS_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_MOREOPTIONS_FORM" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_MOREOPTIONS_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_MOREOPTIONS_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_MOREOPTIONS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_MOREOPTIONS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_MOREOPTIONS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_MOREOPTIONS_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="629.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_MOREOPTIONS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_MOREOPTIONS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_MOREOPTIONS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <Label id="IDC_DUMMY_LISTVIEW_LABEL" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#F8F6EF" backgroundColorOpacity="100" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="40.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="140.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="28.0" marginRight="28.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="22.0"/>
+ </Label>
+ <Button id="IDC_VOICEMAIL_BUTTON" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Voicemail" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="328.0" x="196.0" y="200.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="328.0" x="476.0" y="182.0"/>
+ </Button>
+ <Label id="IDC_EDITFIELD_TITLE_LABEL" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Enter number" textColor="#808080" textSize="32.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="140.0" marginTop="22.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="528.0" x="36.0" y="62.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="35.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="942.0" x="63.0" y="44.0"/>
+ </Label>
+ <Button id="IDC_SELECT_CONTACT_BUTTON" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="104.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD_TITLE_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="18.0" marginLeft="16.0" marginRight="20.0" marginTop="18.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="104.0" x="580.0" y="58.0"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="104.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_EDITFIELD_TITLE_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="18.0" marginLeft="28.0" marginRight="35.0" marginTop="18.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_DUMMY_LISTVIEW_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="104.0" x="1033.0" y="40.0"/>
+ </Button>
+ <EditField id="IDC_FOWARDING_NUMBER_EDITFIELD" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="true" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="16.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="true" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="44.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="20.0" marginRight="140.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_DUMMY_LISTVIEW_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDC_EDITFIELD_TITLE_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="528.0" x="36.0" y="104.0"/>
+ <layout bottomRelation="IDC_DUMMY_LISTVIEW_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_DUMMY_LISTVIEW_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="35.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDC_EDITFIELD_TITLE_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="942.0" x="63.0" y="86.0"/>
+ </EditField>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="770.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="16.0" marginRight="16.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_VOICEMAIL_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="314.0"/>
+ <layout bottomRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="329.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="28.0" marginRight="28.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_VOICEMAIL_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="278.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_REJECTLIST_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_REJECTLIST_FORM" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_REJECTLIST_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_REJECTLIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1026.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_REJECTLIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_REJECTLIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_REJECTLIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_REJECTLIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="544.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_REJECTLIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_REJECTLIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_REJECTLIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_REJECTMSGS_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_REJECTMSGS_FORM" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_REJECTMSGS_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_REJECTMSGS_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1026.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_REJECTMSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_REJECTMSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_REJECTMSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_REJECTMSGS_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="544.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_REJECTMSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_REJECTMSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_REJECTMSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_SET_BARRING_PWD__FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <Label id="IDC_LABEL1" parent="IDL_SETTINGS_SET_BARRING_PWD__FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="::IDS_SETTING_SET_BARRING_PWD_LABEL_STRING" textColor="#808080" textSize="32.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="40.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="28.0" marginRight="28.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="22.0"/>
+ </Label>
+ <EditField id="IDC_EDITFIELD" parent="IDL_SETTINGS_SET_BARRING_PWD__FORM">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="true" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="16.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="true" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedColor="" pressedColorOpacity="100" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="45.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="90.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="16.0" marginRight="16.0" marginTop="1.0" mode="Portrait" rightRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PASSWORD_NUMBER" topRelation="IDC_LABEL1" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="83.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="90.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="28.0" marginRight="28.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_SET_BARRING_PWD__FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PASSWORD_NUMBER" topRelation="IDC_LABEL1" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="64.0"/>
+ </EditField>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_SPEEDDIAL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="Speed Dial" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <ScrollPanel id="IDC_PHOTO_PANEL" parent="IDL_SETTINGS_SPEEDDIAL_FORM">
+ <property autoResizingEnabled="true" backgroundColor="" backgroundColorOpacity="0" clientAreaHeight="0" clientAreaWidth="0" pageScrollEnabled="true" scrollBarVisible="true" scrollDirection="SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL" scrollInputMode="SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION"/>
+ <panelLayout height="844.0" mode="Portrait" width="720.0"/>
+ <panelLayout height="844.0" mode="Landscape" width="1010.0"/>
+ <layout bottomRelation="IDL_SETTINGS_SPEEDDIAL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1026.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SPEEDDIAL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SETTINGS_SPEEDDIAL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_SPEEDDIAL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_SETTINGS_SPEEDDIAL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="544.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_SPEEDDIAL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="270.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_SPEEDDIAL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_SPEEDDIAL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="1010.0" x="270.0" y="0.0"/>
+ </ScrollPanel>
+ <Button id="IDC_VOICEMAIL_BUTTON" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="59.0" NormalBitmapY="59.0" PressedBitmapX="59.0" PressedBitmapY="59.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="14.0" y="25.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="14.0" y="25.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON2" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="251.0" y="25.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="251.0" y="25.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON3" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="488.0" y="25.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="488.0" y="25.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON4" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="14.0" y="298.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="14.0" y="298.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON5" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="251.0" y="298.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="251.0" y="298.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON6" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="488.0" y="298.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="488.0" y="298.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON7" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="14.0" y="571.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="14.0" y="571.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON8" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="251.0" y="571.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="251.0" y="571.0"/>
+ </Button>
+ <Button id="IDC_PHOTO_BUTTON9" parent="IDC_PHOTO_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="217.0" mode="Portrait" width="217.0" x="488.0" y="571.0"/>
+ <layout height="217.0" mode="Landscape" width="217.0" x="488.0" y="571.0"/>
+ </Button>
+ <Label id="IDC_VOICEMAIL_TXT_LABEL" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="Voice mail" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="14.0" y="242.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="14.0" y="242.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL2" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="2. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="251.0" y="242.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="251.0" y="242.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL3" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="3. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="488.0" y="242.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="488.0" y="242.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL4" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="4. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="14.0" y="515.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="14.0" y="515.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL5" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="5. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="251.0" y="515.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="251.0" y="515.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL6" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="6. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="488.0" y="515.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="488.0" y="515.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL7" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="7. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="14.0" y="788.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="14.0" y="788.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL8" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="8. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="251.0" y="788.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="251.0" y="788.0"/>
+ </Label>
+ <Label id="IDC_NAME_LABEL9" parent="IDC_PHOTO_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="9. Name" textColor="#000000" textSize="26.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="56.0" mode="Portrait" width="217.0" x="488.0" y="788.0"/>
+ <layout height="56.0" mode="Landscape" width="217.0" x="488.0" y="788.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_SETTINGS_STATUS_TONES_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="::IDS_SETTINGS_STATUS_TONES_FORM_TITLE" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <GroupedTableView id="IDC_GROUPEDTABLEVIEW" parent="IDL_SETTINGS_STATUS_TONES_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" collapseByPinchEnabled="false" fastScrollIndex="" groupedLookEnabled="false" itemDivider="false" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDL_SETTINGS_STATUS_TONES_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1044.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_STATUS_TONES_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="40.0" marginLeft="0.0" marginRight="0.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_STATUS_TONES_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_STATUS_TONES_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="40.0"/>
+ <layout bottomRelation="IDL_SETTINGS_STATUS_TONES_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="585.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_STATUS_TONES_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="22.0" marginLeft="0.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_SETTINGS_STATUS_TONES_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_STATUS_TONES_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="22.0"/>
+ </GroupedTableView>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+
+<ScenePopup Bversion="2.0.0.201306101756" Dversion="20120315">
+ <Popup id="IDL_SPEED_DIAL_POPUP">
+ <property accessibilityHint="" color="" titleText="::IDS_SPEED_DIAL_POPUP_TITLE" titleTextColor=""/>
+ <layout height="420.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="640.0"/>
+ <layout height="420.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="640.0"/>
+ </Popup>
+ <ListView id="IDC_LISTVIEW" parent="IDL_SPEED_DIAL_POPUP">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" itemDivider="true" itemDividerColor="" listScrollStyle="SCROLL_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="224.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SPEED_DIAL_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_SPEED_DIAL_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SPEED_DIAL_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="224.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SPEED_DIAL_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SPEED_DIAL_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SPEED_DIAL_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="640.0" x="0.0" y="0.0"/>
+ </ListView>
+ <Button id="IDC_CLOSE_BUTTON" parent="IDL_SPEED_DIAL_POPUP">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_CLOSE_POPUP" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_SPEED_DIAL_POPUP" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="24.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_LISTVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="300.0" x="170.0" y="244.0"/>
+ <layout bottomRelation="IDL_SPEED_DIAL_POPUP" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="24.0" marginLeft="0.0" marginRight="0.0" marginTop="20.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_LISTVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="300.0" x="170.0" y="244.0"/>
+ </Button>
+</ScenePopup>
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnAppUtility.cpp
+ * @brief Utility Class for Phone Application
+ */
+#include <FApp.h>
+#include <FSystem.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+
+AppUtility::AppUtility(void)
+{
+}
+
+AppUtility::~AppUtility(void)
+{
+}
+
+String
+AppUtility::GetResourceString(const String& stringId)
+{
+ String resourceString(L"");
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource)
+ {
+ pAppResource->GetString(stringId, resourceString);
+ }
+
+ return resourceString;
+}
+
+Bitmap*
+AppUtility::GetBitmapFromResourcesN(const String& imagePath, int imgWidth, int imgHeight)
+{
+ Bitmap* pBitmap = null;
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource)
+ {
+ pBitmap = pAppResource->GetBitmapN(imagePath);
+ if (pBitmap && imgWidth > 0 && imgHeight > 0)
+ {
+ //scale bitmap to predefined size
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pBitmap->Scale(Dimension(imgWidth, imgHeight));
+ }
+ }
+ return pBitmap;
+}
+
+void
+AppUtility::SetBackgroundBitmapToTableItem(TableViewItem* pTableItem, TableViewItemPos position)
+{
+ Label* pBgItemLbl = static_cast<Label*>(pTableItem->GetControl(IDC_TABLEITEM_BG_LABEL, true));
+ if (pBgItemLbl != null)
+ {
+ pTableItem->RemoveControl(pBgItemLbl);
+ }
+ //add a new background
+ pBgItemLbl = new (std::nothrow) Label();
+ pBgItemLbl->Construct(Rectangle(Point(0,0),Dimension(pTableItem->GetWidth(), pTableItem->GetHeight())), L"");
+ pBgItemLbl->SetName(IDC_TABLEITEM_BG_LABEL);
+
+ Bitmap* pNormalBitmap = null;
+ String normalBitmapPath(L"");
+ switch (position)
+ {
+ case TABLEVIEWITEMPOS_SINGLE_ITEM:
+ {
+ normalBitmapPath.Append(IDB_SETTINGS_SINGLE_LIST_ITEM_BG);
+ }
+ break;
+
+ case TABLEVIEWITEMPOS_TOP:
+ {
+ normalBitmapPath.Append(IDB_SETTINGS_TOP_LIST_ITEM_BG);
+ }
+ break;
+
+ case TABLEVIEWITEMPOS_CENTER:
+ {
+ normalBitmapPath.Append(IDB_SETTINGS_CENTER_LIST_ITEM_BG);
+ }
+ break;
+
+ case TABLEVIEWITEMPOS_BOTTOM:
+ {
+ normalBitmapPath.Append(IDB_SETTINGS_BOTTOM_LIST_ITEM_BG);
+ }
+ break;
+ }
+
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource != null)
+ {
+ //normal background bitmap
+ Bitmap* pBitmap = pAppResource->GetBitmapN(normalBitmapPath);
+ if (pBitmap->IsNinePatchedBitmap() == true)
+ {
+ Canvas normalCanvas;
+ normalCanvas.Construct( Rectangle( Point(0, 0), Dimension(pBgItemLbl->GetSize()) ) );
+ normalCanvas.DrawNinePatchedBitmap(normalCanvas.GetBounds() , *pBitmap);
+
+ pNormalBitmap = new (std::nothrow) Bitmap();
+ pNormalBitmap->Construct(normalCanvas, normalCanvas.GetBounds());
+ }
+ delete pBitmap;
+ }
+
+ if (pNormalBitmap != null)
+ {
+ pBgItemLbl->SetBackgroundBitmap(*pNormalBitmap);
+ delete pNormalBitmap;
+ pNormalBitmap = null;
+ }
+
+ //Add background label to table item
+ pTableItem->AddControl(pBgItemLbl);
+ pTableItem->SetControlAlwaysAtBottom(*pBgItemLbl, true);
+}
+
+void
+AppUtility::SetExpandIconToTableItem(TableViewItem* pTableItem, bool isExpanded)
+{
+ Bitmap* pNormalIcon = null;
+ Bitmap* pPressIcon = null;
+
+ if (!isExpanded)
+ {
+ pNormalIcon = GetBitmapFromResourcesN(IDB_LIST_EXPAND_CLOSE, W_EXPAND_ICON, H_EXPAND_ICON);
+ pPressIcon = GetBitmapFromResourcesN(IDB_LIST_EXPAND_CLOSE_PRESSED, W_EXPAND_ICON, H_EXPAND_ICON);
+ }
+ else
+ {
+ pNormalIcon = GetBitmapFromResourcesN(IDB_LIST_EXPAND_OPENED, W_EXPAND_ICON, H_EXPAND_ICON);
+ pPressIcon = GetBitmapFromResourcesN(IDB_LIST_EXPAND_OPENED_PRESSED, W_EXPAND_ICON, H_EXPAND_ICON);
+ }
+
+ int itemWidth = pTableItem->GetWidth();
+ Rectangle iconRect((itemWidth - W_EXPAND_ICON - X_LIST_MENU_TEXT_ITEM - 16),
+ ((H_LIST_DROPDOWN_MENU_ITEM - H_EXPAND_ICON) / 2), W_EXPAND_ICON, H_EXPAND_ICON);
+
+ //normal canvas
+ Canvas* pBgCanvas = new (std::nothrow) Canvas();
+ pBgCanvas->Construct(Rectangle(0,0, pTableItem->GetWidth(), pTableItem->GetHeight()));
+ pBgCanvas->DrawBitmap(iconRect, *pNormalIcon);
+ Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
+ pActualBgBmp->Construct(*pBgCanvas,pBgCanvas->GetBounds());
+ pTableItem->SetBackgroundBitmap(pActualBgBmp, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ delete pBgCanvas;
+ delete pActualBgBmp;
+
+ //pressed canvas
+ pBgCanvas = new (std::nothrow) Canvas();
+ pBgCanvas->Construct(Rectangle(0,0, pTableItem->GetWidth(), pTableItem->GetHeight()));
+ pBgCanvas->SetBackgroundColor(COLOR_PRESS_ITEM_BG);
+ pBgCanvas->Clear();
+ pBgCanvas->DrawBitmap(iconRect, *pPressIcon);
+ pActualBgBmp = new (std::nothrow) Bitmap();
+ pActualBgBmp->Construct(*pBgCanvas,pBgCanvas->GetBounds());
+ pTableItem->SetBackgroundBitmap(pActualBgBmp, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ delete pBgCanvas;
+ delete pActualBgBmp;
+
+ delete pNormalIcon;
+ pNormalIcon = null;
+ delete pPressIcon;
+ pPressIcon = null;
+}
+
+
+int
+AppUtility::GetSettingsMainItemSize(void)
+{
+ int itemSize = NORMAL_MAINTEXTRECT_SIZE;
+ String fontSizeValue;
+ //TODO: un-comment this, once it is finalized to support system font size.
+ if (SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, fontSizeValue) == E_SUCCESS)
+ {
+ if (fontSizeValue.Equals(L"giant", false))
+ {
+ itemSize = GIANT_MAINTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"huge", false))
+ {
+ itemSize = HUGE_MAINTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"large", false))
+ {
+ itemSize = LARGE_MAINTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"small", false))
+ {
+ itemSize = SMALL_MAINTEXTRECT_SIZE;
+ }
+ }
+ return itemSize;
+}
+
+
+int
+AppUtility::GetSettingsSubItemSize(void)
+{
+ int itemSize = NORMAL_SUBTEXTRECT_SIZE;
+ String fontSizeValue;
+ //TODO: un-comment this, once it is finalized to support system font size.
+ if (SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, fontSizeValue) == E_SUCCESS)
+ {
+ if (fontSizeValue.Equals(L"giant", false))
+ {
+ itemSize = GIANT_SUBTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"huge", false))
+ {
+ itemSize = HUGE_SUBTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"large", false))
+ {
+ itemSize = LARGE_SUBTEXTRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"small", false))
+ {
+ itemSize = SMALL_SUBTEXTRECT_SIZE;
+ }
+ }
+ return itemSize;
+}
+
+
+
+int
+AppUtility::GetSettingsItemRectSize(void)
+{
+ int itemSize = NORMAL_ITEMRECT_SIZE;
+ String fontSizeValue;
+ //TODO: un-comment this, once it is finalized to support system font size.
+ if (SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, fontSizeValue) == E_SUCCESS)
+ {
+ if (fontSizeValue.Equals(L"giant", false))
+ {
+ itemSize = GIANT_ITEMRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"huge", false))
+ {
+ itemSize = HUGE_ITEMRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"large", false))
+ {
+ itemSize = LARGE_ITEMRECT_SIZE;
+ }
+ else if (fontSizeValue.Equals(L"small", false))
+ {
+ itemSize = SMALL_ITEMRECT_SIZE;
+ }
+ }
+ return itemSize;
+}
+
+
+int
+AppUtility::GetSettingsItemFontSize(void)
+{
+ int fontSize = NORMAL_FONT_SIZE_MAIN_TXT;
+ String fontSizeValue;
+
+
+ //TODO: un-comment this, once it is finalized to support system font size.
+ if (SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, fontSizeValue) == E_SUCCESS)
+ {
+ if (fontSizeValue.Equals(L"giant", false))
+ {
+ fontSize = GIANT_FONT_SIZE_MAIN_TXT;
+ }
+ else if (fontSizeValue.Equals(L"huge", false))
+ {
+ fontSize = HUGE_FONT_SIZE_MAIN_TXT;
+ }
+ else if (fontSizeValue.Equals(L"large", false))
+ {
+ fontSize = LARGE_FONT_SIZE_MAIN_TXT;
+ }
+ else if (fontSizeValue.Equals(L"small", false))
+ {
+ fontSize = SMALL_FONT_SIZE_MAIN_TXT;
+ }
+ }
+ return fontSize;
+}
+
+void
+AppUtility::GetGlobalFontAndItemHeight(float *fontSize, float *itemHeight)
+{
+ String fontSizeString;
+ SettingInfo::GetValue(L"http://tizen.org/setting/font.size", fontSizeString);
+ AppLogDebug("fontSize: %ls", fontSizeString.GetPointer());
+ if (fontSizeString == L"small")
+ {
+ *fontSize = 36.f;
+ *itemHeight = 140.f;
+ }
+ else if (fontSizeString == L"medium")
+ {
+ *fontSize = 44.f;
+ *itemHeight = 140.f;
+ }
+ else if (fontSizeString == L"large")
+ {
+ *fontSize = 64.f;
+ *itemHeight = 157.f;
+ }
+ else if (fontSizeString == L"huge")
+ {
+ *fontSize = 81.f;
+ *itemHeight = 176.f;
+ }
+ else if (fontSizeString == L"giant")
+ {
+ *fontSize = 106.f;
+ *itemHeight = 205.f;
+ }
+}
+
+char*
+AppUtility::ConvertStringToPointerCharArrayN(const String& strToConvert)
+{
+ AppLogDebug("ENTER");
+ int length = strToConvert.GetLength() * 4 + 1; // For null terminated.
+ char* pChar = new (std::nothrow) char[length];
+ if (pChar)
+ {
+ const wchar_t* pWchar = strToConvert.GetPointer();
+ wcstombs(pChar, pWchar, (size_t) length);
+ }
+ AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
+ return pChar;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallInfo.cpp
+ * @brief Call Information class
+ */
+#include "PhnAppUtility.h"
+#include "PhnCallInfo.h"
+#include <FMedia.h>
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+
+CallInfo::CallInfo(void)
+{
+ //by Default, neither a conference call nor emergency call
+ __isConfCall = false;
+ __isEmergency = false;
+ __callType = VOICE_CALL;
+ __isOnHold = false;
+ __callConnectTime = 0;
+ __callNotificationTime = 0;
+ __pCallHandle = null;
+ __pEndCallCause = null;
+ __pParticipantCallHandles = null;
+ __pContact = null;
+}
+
+CallInfo::~CallInfo(void)
+{
+ if (__pCallHandle)
+ {
+ delete __pCallHandle;
+ }
+
+ if (__pEndCallCause)
+ {
+ delete __pEndCallCause;
+ }
+
+ if (__pParticipantCallHandles)
+ {
+ delete __pParticipantCallHandles;
+ __pParticipantCallHandles = null;
+ }
+ if (__pContact != null)
+ {
+ delete __pContact;
+ }
+}
+
+Long*
+CallInfo::GetCallHandle(void)
+{
+ return __pCallHandle;
+}
+
+void
+CallInfo::SetCallHandle(unsigned int handle)
+{
+ if (__pCallHandle != null)
+ {
+ delete __pCallHandle;
+ }
+ __pCallHandle = new (std::nothrow) Long(handle);
+}
+
+bool
+CallInfo::IsConferenceCall(void)
+{
+ return __isConfCall;
+}
+
+void
+CallInfo::SetConference(bool isConferenceCall)
+{
+ __isConfCall = isConferenceCall;
+}
+
+bool
+CallInfo::IsEmergency(void)
+{
+ return __isEmergency;
+}
+
+void
+CallInfo::SetEmergency(bool isEmergency)
+{
+ __isEmergency = isEmergency;
+}
+
+String&
+CallInfo::GetContactNumber(void)
+{
+ return __contactNumber;
+}
+
+void
+CallInfo::SetContactNumber(String& contactNumber)
+{
+ if (__isConfCall == false)
+ {
+ __contactNumber = contactNumber;
+ }
+}
+
+void
+CallInfo::SetContactInfo(const Contact& contact)
+{
+ if (__pContact != null)
+ {
+ delete __pContact;
+ __pContact = null;
+ }
+ __pContact = new (std::nothrow) Contact(contact);
+}
+
+bool
+CallInfo::IsOnHold(void)
+{
+ return __isOnHold;
+}
+
+void
+CallInfo::SetOnHold(bool onHold)
+{
+ __isOnHold = onHold;
+}
+
+long long
+CallInfo::GetCallConnectTime(void)
+{
+ return __callConnectTime;
+}
+
+void
+CallInfo::SetCallConnectTime(long long connectTime)
+{
+ __callConnectTime = connectTime;
+}
+
+long long
+CallInfo::GetCallNotificationTime(void)
+{
+ return __callNotificationTime;
+}
+
+void
+CallInfo::SetCallNotificationTime(long long callNotificationTime)
+{
+ __callNotificationTime = callNotificationTime;
+}
+
+String&
+CallInfo::GetEndCallCause(void)
+{
+ return *(__pEndCallCause);
+}
+
+void
+CallInfo::SetEndCallCause(String& pEndCause)
+{
+ if (__pEndCallCause != null)
+ {
+ delete __pEndCallCause;
+ }
+ __pEndCallCause = new (std::nothrow) String(pEndCause);
+}
+
+IListT<CallInfo>*
+CallInfo::GetCallerList(void)
+{
+ return __pParticipantCallHandles;
+}
+
+int
+CallInfo::GetCallerListCount(void)
+{
+ if (__pParticipantCallHandles != null)
+ {
+ return __pParticipantCallHandles->GetCount();
+ }
+ return -1;
+}
+
+result
+CallInfo::AddCallToCallerList(CallInfo& callInfo)
+{
+ if (__pParticipantCallHandles == NULL)
+ {
+ __pParticipantCallHandles = new (std::nothrow) ArrayListT<CallInfo>();
+ }
+ result r = E_FAILURE;
+ CallInfo* pNewCallInfo = new (std::nothrow) CallInfo();
+ *pNewCallInfo = callInfo;
+ r = __pParticipantCallHandles->Add(*pNewCallInfo);
+ pNewCallInfo = NULL;
+ return r;
+}
+
+result
+CallInfo::RemoveCallFromCallerList(int index)
+{
+ result r = E_FAILURE;
+ if (__pParticipantCallHandles == NULL)
+ {
+ return r;
+ }
+ r = __pParticipantCallHandles->RemoveAt(index);
+ return r;
+}
+
+void
+CallInfo::SetCalllogType(CallLogType callLogType)
+{
+ __calllogType = callLogType;
+}
+
+CallLogType
+CallInfo::GetCalllogType(void)
+{
+ return __calllogType;
+}
+
+bool
+CallInfo::operator ==(const CallInfo& rhs) const
+{
+ return (this->__pCallHandle->Equals(*(rhs.__pCallHandle)));
+}
+
+bool
+CallInfo::operator !=(const CallInfo& rhs) const
+{
+ return (!(this->__pCallHandle->Equals(*(rhs.__pCallHandle))));
+}
+
+CallInfo&
+CallInfo::operator =(const CallInfo& rhs)
+{
+ if (this != null)
+ {
+ this->__isConfCall = rhs.__isConfCall;
+ this->__callType = rhs.__callType;
+ this->__isEmergency = rhs.__isEmergency;
+ this->__contactNumber = rhs.__contactNumber;
+ this->__isOnHold = rhs.__isOnHold;
+ //call connected time
+ this->__callConnectTime = rhs.__callConnectTime;
+ //call notification time
+ this->__callNotificationTime = rhs.__callNotificationTime;
+ this->__calllogType = rhs.__calllogType;
+ //copy call handle, if exist
+ if (this->__pCallHandle != null)
+ {
+ delete this->__pCallHandle;
+ this->__pCallHandle = null;
+ }
+ if (rhs.__pCallHandle != null)
+ {
+ this->__pCallHandle = new (std::nothrow) Long(*(rhs.__pCallHandle));
+ }
+
+ //copy end call cause, if any exist
+ if (this->__pEndCallCause != null)
+ {
+ delete this->__pEndCallCause;
+ this->__pEndCallCause = null;
+ }
+ if (rhs.__pEndCallCause)
+ {
+ this->__pEndCallCause = new (std::nothrow) String(*(rhs.__pEndCallCause));
+ }
+
+ //Add participant call list
+ if (this->__pParticipantCallHandles != null)
+ {
+ delete this->__pParticipantCallHandles;
+ this->__pParticipantCallHandles = null;
+ }
+ if (rhs.__pParticipantCallHandles != null)
+ {
+ this->__pParticipantCallHandles = new (std::nothrow) ArrayListT<CallInfo>();
+ this->__pParticipantCallHandles->Construct(*(rhs.__pParticipantCallHandles));
+ }
+ if (this->__pContact != null)
+ {
+ delete this->__pContact;
+ this->__pContact = null;
+ }
+ if (rhs.__pContact != null)
+ {
+ this->__pContact = new (std::nothrow) Contact(*(rhs.__pContact));
+ }
+ }
+
+ return *this;
+}
+
+String*
+CallInfo::FetchCallerNameN(void)
+{
+ String displayName(L"");
+
+ //get caller name from already fetched contact info
+ if (__pContact != null)
+ {
+ //fetch name to be displayed
+ __pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ if (displayName.IsEmpty())
+ {
+ String firstName(L"");
+ String lastName(L"");
+ __pContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
+ __pContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
+ displayName.Append(firstName + " " + lastName);
+ }
+ }
+
+ return new (std::nothrow) String(displayName);
+}
+
+Bitmap*
+CallInfo::FetchCallerPhotoN(void)
+{
+ if (__pContact != null)
+ {
+ return __pContact->GetThumbnailN();
+ }
+ return null;
+}
+
+const Contact*
+CallInfo::GetContactInfo(void)
+{
+ return __pContact;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallLogPresentationModel.cpp
+ * @brief The Call Logs Presentation Model
+ */
+
+#include <FApp.h>
+#include <FTelephony.h>
+#include "PhnCallLogPresentationModel.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Telephony;
+using namespace Tizen::Base::Collection;
+
+CalLogPresentationModel* CalLogPresentationModel::__pInstance = null;
+
+CalLogPresentationModel::CalLogPresentationModel()
+ : __pCallMgr(null), __isCallAppControlRunning(false)
+{
+}
+
+CalLogPresentationModel::~CalLogPresentationModel()
+{
+ AppControl::StopAppControlResponseListener(this);
+ __pCallMgr = null;
+}
+
+void
+CalLogPresentationModel::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) CalLogPresentationModel();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+
+ std::atexit(DestroyInstance);
+}
+
+result
+CalLogPresentationModel::Construct(void)
+{
+ __pCallMgr = CallLogManager::GetInstance();
+ return E_SUCCESS;
+}
+
+CalLogPresentationModel*
+CalLogPresentationModel::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+CalLogPresentationModel::DestroyInstance(void)
+{
+ if (__pInstance != null)
+ {
+ delete __pInstance;
+ __pInstance = null;
+ }
+}
+
+void
+CalLogPresentationModel::AddCalllogChangeListener(ICalllogChangeListener& listner )
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->AddCalllogChangeListener(listner);
+}
+
+void
+CalLogPresentationModel::RemoveCalllogChangeListner(ICalllogChangeListener& listner)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->RemoveCalllogChangeListner(listner);
+}
+
+int
+CalLogPresentationModel::GetAllCallLogCount(void)\r
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ return __pCallMgr->GetAllCallLogCount();\r
+}\r
+\r
+int\r
+CalLogPresentationModel::GetCallLogsViewedCount()\r
+{\r
+ if(__pCallMgr == null)\r
+ {\r
+ __pCallMgr = CallLogManager::GetInstance();\r
+ }\r
+ return __pCallMgr->GetCallLogsViewedCount();\r
+}
+
+void
+CalLogPresentationModel::DeleteCalllogByDbId(int dbId)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->DeleteCalllogByDbId(dbId);
+}\r
+\r
+void\r
+CalLogPresentationModel::DeleteItemAtGroupIndex(int groupIndex, int itemIndex)\r
+{\r
+ if(__pCallMgr == null)\r
+ {\r
+ __pCallMgr = CallLogManager::GetInstance();\r
+ }\r
+ __pCallMgr->DeleteItemAtGroupIndex(groupIndex, itemIndex);\r
+}
+
+void
+CalLogPresentationModel::ResetAndNotifyCalllogData(void)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->ResetAndNotifyCalllogData();
+}
+
+void
+CalLogPresentationModel::UpdateCallLogList()
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->UpdateCallLogList();
+}
+
+int
+CalLogPresentationModel::GetUnknownLogCount(int dbId)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ return __pCallMgr->GetUnknownLogCount(dbId);
+}
+
+Tizen::Base::Collection::ArrayListT<CallLogDetails>*
+CalLogPresentationModel::GetCallogListByNumberFromDatabaseN(char* pNumber)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ return __pCallMgr->GetCallogListByNumberFromDatabaseN(pNumber);
+}
+
+ErrorCodes
+CalLogPresentationModel::DialCall(const String& contactNumber)
+{
+ AppLogDebug("ENTER");
+ result r = E_FAILURE;
+
+/* if (__isCallAppControlRunning == true)
+ {
+ AppLogDebug("__isCallAppControlRunning == true");
+ //AppControl is already running, ignore this event.
+ return ERROR_NONE;
+ }*/
+ r = LaunchCallAppControl(contactNumber);
+ if (r == E_SUCCESS)
+ {
+ __isCallAppControlRunning = true;
+ return ERROR_NONE;
+ }
+ else
+ {
+ return ERROR_DIAL_FAILED;
+ }
+}
+
+result
+CalLogPresentationModel::LaunchCallAppControl(const String& contactNumber)
+{
+ result r = E_FAILURE;
+
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(contactNumber));
+ extraData.Add(new (std::nothrow) String(PARAM_CALL_TYPE), new (std::nothrow) String(PARAM_CALL_VALUE_VOICE));
+
+ AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CALL, OPERATION_ID_CALL);
+ if (pAppControl != null)
+ {
+ r = pAppControl->Start(null, null, &extraData, null);
+ delete pAppControl;
+ }
+
+ extraData.RemoveAll(true);
+ return r;
+}
+
+void
+CalLogPresentationModel::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ //reset 'isAppControlLaunched'
+ __isCallAppControlRunning = false;
+}
+
+int
+CalLogPresentationModel::GetCalllogCountByNumber(void)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ return __pCallMgr->GetCalllogCountByNumber();
+}
+
+Tizen::Base::Collection::IListT<CallLogDetails>*
+CalLogPresentationModel::GetCalllogListByNumValues(void)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ return __pCallMgr->GetCalllogListByNumValues();
+}
+
+void
+CalLogPresentationModel::GetCalllogContactName(String phoneNumber,String& contactName)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->GetCalllogContactName(phoneNumber,contactName);
+}
+
+result
+CalLogPresentationModel::LaunchAddContactsAppControl(String& contactNumber)
+{
+ result r = E_FAILURE;
+ HashMap extraData;
+ extraData.Construct();
+ bool isEmail(contactNumber.Contains(L"@"));
+
+ if(isEmail == true)
+ {
+ extraData.Add(new (std::nothrow) String(INPUT_TYPE_MAIL), new (std::nothrow) String(contactNumber));
+ }
+ else
+ {
+ extraData.Add(new (std::nothrow) String(INPUT_TYPE_PHONE), new (std::nothrow) String(contactNumber));
+ }
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_CONTACT));
+ AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_ADD);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ delete pAc;
+ }
+
+ extraData.RemoveAll(true);
+ return r;
+}
+
+void
+CalLogPresentationModel::SetMissedCallSeenStatus(CallLogDetails* pDetails)
+{
+ if(__pCallMgr == null)
+ {
+ __pCallMgr = CallLogManager::GetInstance();
+ }
+ __pCallMgr->UpDateMissedCallSeenStatus(pDetails);
+}
+
+ArrayList*\r
+CalLogPresentationModel::GetCallLogGroups(void)\r
+{\r
+ if(__pCallMgr == null)\r
+ {\r
+ __pCallMgr = CallLogManager::GetInstance();\r
+ }\r
+ return __pCallMgr->GetCallLogGroups();\r
+}\r
+
+void\r
+CalLogPresentationModel::setCallLogViewbyID(CallLogType id)\r
+{\r
+ CallLogManager::setCallLogViewbyID(id);\r
+}\r
+\r
+int\r
+CalLogPresentationModel::getCallLogViewbyID()\r
+{\r
+ return CallLogManager::getCallLogViewbyID();\r
+}
+
+bool
+CalLogPresentationModel::IsDataUpdated(void)
+{
+ return __pCallMgr->GetDirtyFlag();
+}
+\r
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallLogViewByPopup.cpp
+ * @brief The Logs Tab
+ */
+
+#include <FApp.h>
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include <FGraphics.h>
+#include "PhnAppUtility.h"
+#include "PhnCallLogViewByPopup.h"
+#include "PhnCallLogPresentationModel.h"\r
+#include "PhnTabLogs.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDC_VIEWBY_LISTVIEW = L"IDC_VIEWBY_LISTVIEW";
+static const wchar_t* IDC_VIEWBY_CANCEL = L"IDC_BUTTON_CANCEL";
+static const wchar_t* IDC_BLOCK_CALL = L"IDC_BLOCK_CALL";
+static const wchar_t* IDC_BLOCK_MESSAGE = L"IDC_BLOCK_MESSAGE";
+static const wchar_t* IDC_BLOCK_OK = L"IDC_BLOCK_OK";
+static const wchar_t* IDC_BLOCK_CANCEL = L"IDC_BLOCK_CANCEL";
+static const wchar_t* IDC_BLOCK_INFO = L"IDC_BLOCK_INFO";
+static const wchar_t* IDL_CALL_LOG_VIEWBY_POPUP = L"IDL_CALL_LOG_VIEWBY_POPUP";
+static const wchar_t* IDL_CALL_BLOCK_POPUP = L"IDL_CALL_BLOCK_POPUP";
+
+const int W_POPUP = 600;
+const int H_POPUP = 520;
+const int H_POPUP_TITLE = 72;
+const int POPUP_TITLE_PADDING = 20;
+const int W_CANCEL_BUTTON = 350;
+const int H_CANCEL_BUTTON = 72;
+const int CANCEL_BUTTON_PADDING = 30;
+const int H_LIST = 300;
+const int H_LIST_ITEM = 112;
+const int H_VIEW_BY_LIST_ITEM = 127;
+const int W_LIST_ITEM = 112;
+const int HORIZONTAL_PADDING = 16;
+const int VERTICAL_PADDING = 85;
+
+int CallLogViewByPopup::__selectedViewByIndex = IDA_ALL_LOGS;
+
+CallLogViewByPopup::CallLogViewByPopup(ICallLogViewByPopupListener& listener)
+ : __popupListener(listener)
+{
+ __pButtonAllLogs = null;
+ __pButtonMissedCalls = null;
+ __pButtonDialedCalls = null;
+ __pButtonReceivedCalls = null;
+ __pButtonRejectedCalls = null;
+ __pButtonBlockCall = null;
+ __pButtonBlockMessage = null;
+ __pButtonCancel = null;
+ __pButtonBlockOk = null;
+ __pButtonBlockCancel = null;
+ __pBlockInfo = null;
+ __isBlockCallSelected = false;
+ __isBlockMessageSelected = false;
+ __pListView = null;
+ __pOptionsList = null;
+}
+
+CallLogViewByPopup::~CallLogViewByPopup()
+{
+ if(__pOptionsList != null)
+ {
+ delete __pOptionsList;
+ __pOptionsList = null;
+ }
+}
+
+result
+CallLogViewByPopup::ConstructViewbyPopup()
+{
+ result r = E_SUCCESS;
+ r = Construct(IDL_CALL_LOG_VIEWBY_POPUP);
+ if(r == E_FAILURE)
+ {
+ AppLogException("CallLogViewbyPopup construction failed");
+ return r;
+ }
+ SetPropagatedKeyEventListener(this);
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+
+ AddOptionsToList();
+
+ __pListView = static_cast<ListView*>(GetControl(IDC_VIEWBY_LISTVIEW));
+ __pListView->AddListViewItemEventListener(*this);
+ __pListView->SetItemProvider(*this);
+
+ Button* pCancelButton = static_cast<Button*>(GetControl(IDC_VIEWBY_CANCEL));;
+ pCancelButton->SetActionId(IDA_CANCEL);
+ pCancelButton->AddActionEventListener(*this);
+
+ TryReturn(r == E_SUCCESS, r, "CallOptionPopup::AddControl() failed");
+
+ __pListView->UpdateList();
+ __pListView->SetItemChecked(0, true);
+ __pListView->Invalidate(true);
+ return r;
+}
+
+void
+CallLogViewByPopup::AddOptionsToList()
+{
+ __pOptionsList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pOptionsList->Construct();
+ String cmdString;
+
+ //show options. Selected option should be on top of the list view
+ switch(__selectedViewByIndex)
+ {
+ case IDA_ALL_LOGS:
+ {
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ }
+ break;
+
+ case IDA_MISSED_CALLS:
+ {
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ }
+ break;
+
+ case IDA_DIALED_CALLS:
+ {
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ }
+ break;
+
+ case IDA_RECEIVED_CALLS:
+ {
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ }
+ break;
+
+ case IDA_REJECTED_CALLS:
+ {
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ cmdString = AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING);
+ __pOptionsList->Add(new String(cmdString));
+ }
+ break;
+
+
+ }
+
+}
+
+int
+CallLogViewByPopup::GetItemCount(void)
+{
+ if (__pOptionsList != null)
+ {
+ return __pOptionsList->GetCount();
+ }
+ return 0;
+}
+
+ListItemBase*
+CallLogViewByPopup::CreateItem(int index, int itemWidth)
+{
+ String* strText = static_cast<String*>(__pOptionsList->GetAt(index));
+ ListAnnexStyle style = LIST_ANNEX_STYLE_RADIO;
+ CustomItem* pItem = new CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_VIEW_BY_LIST_ITEM), style);
+ pItem->AddElement(Rectangle(HORIZONTAL_PADDING, 0, W_POPUP - HORIZONTAL_PADDING - 105, H_VIEW_BY_LIST_ITEM), index, *strText,__fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+
+ return pItem;
+}
+
+void
+CallLogViewByPopup::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+ String* strText = static_cast<String*>(__pOptionsList->GetAt(index));
+ if(strText->CompareTo(AppUtility::GetResourceString(IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING)) == 0)
+ {
+ Popup::SetShowState(false);
+ CalLogPresentationModel::setCallLogViewbyID(CALL_LOG_TYPE_ALL);
+ __selectedViewByIndex = IDA_ALL_LOGS;
+ __popupListener.OnItemSelected();
+ }
+ else if(strText->CompareTo(AppUtility::GetResourceString(IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING)) == 0)
+ {
+ Popup::SetShowState(false);
+ CalLogPresentationModel::setCallLogViewbyID(CALL_LOG_TYPE_VOICE_MISSED);
+ __selectedViewByIndex = IDA_MISSED_CALLS;
+ __popupListener.OnItemSelected();
+ }
+ else if(strText->CompareTo(AppUtility::GetResourceString(IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING)) == 0)
+ {
+ Popup::SetShowState(false);
+ CalLogPresentationModel::setCallLogViewbyID(CALL_LOG_TYPE_VOICE_OUTGOING);
+ __selectedViewByIndex = IDA_DIALED_CALLS;
+ __popupListener.OnItemSelected();
+ }
+ else if(strText->CompareTo(AppUtility::GetResourceString(IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING)) == 0)
+ {
+ Popup::SetShowState(false);
+ CalLogPresentationModel::setCallLogViewbyID(CALL_LOG_TYPE_VOICE_INCOMING);
+ __selectedViewByIndex = IDA_RECEIVED_CALLS;
+ __popupListener.OnItemSelected();
+ }
+ else if(strText->CompareTo(AppUtility::GetResourceString(IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING)) == 0)
+ {
+ Popup::SetShowState(false);
+ CalLogPresentationModel::setCallLogViewbyID(CALL_LOG_TYPE_VOICE_REJECTED);
+ __selectedViewByIndex = IDA_REJECTED_CALLS;
+ __popupListener.OnItemSelected();
+ }
+ else
+ {
+ Popup::SetShowState(false);
+ }
+
+ return;
+}
+
+bool
+CallLogViewByPopup::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+CallLogViewByPopup::UpdateViewByPopupList()
+{
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ __pListView->UpdateList();
+ __pListView->Invalidate(true);
+}
+
+result
+CallLogViewByPopup::ConstructBlockPopup(Tizen::Base::String& phoneNumber, bool isCallRejected, bool isMsgBeRejected)
+{
+ result r = E_SUCCESS;
+ r = Construct(IDL_CALL_BLOCK_POPUP);
+ if(r == E_FAILURE)
+ {
+ AppLogException("CallBlockPopup construction failed");
+ return r;
+ }
+ SetPropagatedKeyEventListener(this);
+ __pButtonBlockCall = static_cast<CheckButton*>(GetControl(IDC_BLOCK_CALL));
+ __pButtonBlockMessage = static_cast<CheckButton*>(GetControl(IDC_BLOCK_MESSAGE));
+ __pBlockInfo = static_cast<Label*>(GetControl(IDC_BLOCK_INFO));
+ __pButtonBlockOk = static_cast<Button*>(GetControl(IDC_BLOCK_OK));
+ __pButtonBlockCancel = static_cast<Button*>(GetControl(IDC_BLOCK_CANCEL));
+
+ String cmdString;
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_POPUP_TITLE_STRING);
+ cmdString.Append(" ");
+ cmdString.Append(phoneNumber);
+ SetTitleText(cmdString);
+
+ if(__pBlockInfo != null)
+ {
+ __pBlockInfo->SetShowState(false);
+ }
+ if(__pButtonBlockCall != null)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_CALL_CHKBTN_STRING);
+ __pButtonBlockCall->SetText(cmdString);
+ __pButtonBlockCall->SetActionId(IDA_BLOCK_CALL, IDA_BLOCK_CALL);
+ __pButtonBlockCall->AddActionEventListener(*this);
+ }
+ if(__pButtonBlockMessage != null)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_MESSAGE_CHKBTN_STRING);
+ __pButtonBlockMessage->SetText(cmdString);
+ __pButtonBlockMessage->SetActionId(IDA_BLOCK_MESSAGE, IDA_BLOCK_MESSAGE);
+ __pButtonBlockMessage->AddActionEventListener(*this);
+ }
+ if(__pButtonBlockOk != null)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_OK_BTN_STRING);
+ __pButtonBlockOk->SetText(cmdString);
+ __pButtonBlockOk->SetActionId(IDA_BLOCK_OK);
+ __pButtonBlockOk->AddActionEventListener(*this);
+ __pButtonBlockOk->SetEnabled(false);
+ }
+ if(__pButtonBlockCancel != null)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_CANCEL_BTN_STRING);
+ __pButtonBlockCancel->SetText(cmdString);
+ __pButtonBlockCancel->SetActionId(IDA_BLOCK_CANCEL);
+ __pButtonBlockCancel->AddActionEventListener(*this);
+ }
+ if(__pButtonBlockCall == null || __pButtonBlockOk == null || __pButtonBlockCancel == null)
+ {
+ return r;
+ }
+ if((isCallRejected == true || isMsgBeRejected ==true) && __pBlockInfo != null)
+ {
+ if(isCallRejected == true && isMsgBeRejected ==true)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_CALL_MSG_INFO_STRING);
+ }
+ else if(isCallRejected == true)
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_CALL_INFO_STRING);
+ }
+ else
+ {
+ cmdString = AppUtility::GetResourceString(IDS_BLOCK_MSG_INFO_STRING);
+ }
+
+ __pBlockInfo->SetText(cmdString);
+ __pBlockInfo->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+ __pBlockInfo->SetShowState(isCallRejected || isMsgBeRejected);
+
+ __pButtonBlockCall->SetSelected(isCallRejected);
+ __pButtonBlockCall->SetEnabled(!isCallRejected);
+ __pButtonBlockCall->SetPosition(__pButtonBlockCall->GetX(), __pButtonBlockCall->GetY() + H_LIST_ITEM);
+ __pButtonBlockCall->SetBounds(__pButtonBlockCall->GetX(), __pButtonBlockCall->GetY(), __pButtonBlockCall->GetWidth(), __pButtonBlockCall->GetHeight());
+ __pButtonBlockMessage->SetSelected(isMsgBeRejected);
+ __pButtonBlockMessage->SetEnabled(!isMsgBeRejected);
+ __pButtonBlockMessage->SetPosition(__pButtonBlockMessage->GetX(), __pButtonBlockMessage->GetY() + H_LIST_ITEM);
+ __pButtonBlockMessage->SetBounds(__pButtonBlockMessage->GetX(), __pButtonBlockMessage->GetY(), __pButtonBlockMessage->GetWidth(), __pButtonBlockMessage->GetHeight());
+ __pButtonBlockOk->SetPosition(__pButtonBlockOk->GetX(), __pButtonBlockOk->GetY() + H_LIST_ITEM);
+ __pButtonBlockCancel->SetPosition(__pButtonBlockCancel->GetX(), __pButtonBlockCancel->GetY() + H_LIST_ITEM);
+ SetBounds(GetX(), GetY(), GetWidth(), GetHeight() + H_LIST_ITEM);
+ }
+ else
+ {
+ __pButtonBlockOk->SetBounds(__pButtonBlockOk->GetX(), __pButtonBlockOk->GetY(), __pButtonBlockOk->GetWidth(), __pButtonBlockOk->GetHeight());
+ __pButtonBlockCancel->SetBounds(__pButtonBlockCancel->GetX(), __pButtonBlockCancel->GetY(), __pButtonBlockCancel->GetWidth(), __pButtonBlockCancel->GetHeight());
+ }
+
+ return r;
+}
+
+void
+CallLogViewByPopup::OnActionPerformed(const Control& source, int actionId)
+{
+ switch(actionId)
+ {
+ case IDA_BLOCK_CALL:
+ {
+ __isBlockCallSelected = !__isBlockCallSelected;
+ __pButtonBlockOk->SetEnabled(__isBlockCallSelected || __isBlockMessageSelected);
+ __pButtonBlockOk->Invalidate(__isBlockCallSelected || __isBlockMessageSelected);
+ }
+ break;
+
+ case IDA_BLOCK_MESSAGE:
+ {
+ __isBlockMessageSelected = !__isBlockMessageSelected;
+ __pButtonBlockOk->SetEnabled(__isBlockCallSelected || __isBlockMessageSelected);
+ __pButtonBlockOk->Invalidate(__isBlockCallSelected || __isBlockMessageSelected);
+ }
+ break;
+
+ case IDA_CANCEL:
+ {
+ Popup::SetShowState(false);
+ }
+ break;
+
+ case IDA_BLOCK_OK:
+ {
+ Popup::SetShowState(false);
+ __popupListener.OnItemSelected();
+ }
+ break;
+
+ case IDA_BLOCK_CANCEL:
+ {
+ Popup::SetShowState(false);
+ }
+ break;
+
+ default:break;
+
+ }
+}
+
+bool
+CallLogViewByPopup::GetCallBlock()
+{
+ return __isBlockCallSelected;
+}
+
+bool
+CallLogViewByPopup::GetMessageBlock()
+{
+ return __isBlockMessageSelected;
+}
+
+bool
+CallLogViewByPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ Popup::SetShowState(false);
+ return true;
+ }
+ return false;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallRejectInfo.cpp
+ * @brief Call Reject info class
+ */
+#include "PhnCallRejectInfo.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+CallRejectInfo::CallRejectInfo(void)
+{
+}
+
+CallRejectInfo::~CallRejectInfo(void)
+{
+}
+
+bool
+CallRejectInfo::operator ==(const CallRejectInfo& rhs) const
+{
+ /*return (this->rowId == rhs.rowId);*/
+ if ((this->phoneNumber == rhs.phoneNumber)
+ && (this->rejectCondition == rhs.rejectCondition))
+ {
+ return true;
+ }
+ return false;
+}
+
+bool
+CallRejectInfo::operator !=(const CallRejectInfo& rhs) const
+{
+ /*return (!(this->rowId == rhs.rowId));*/
+ if ((this->phoneNumber == rhs.phoneNumber)
+ && (this->rejectCondition == rhs.rejectCondition))
+ {
+ return false;
+ }
+ return true;
+}
+
+CallRejectInfo&
+CallRejectInfo::operator =(const CallRejectInfo& rhs)
+{
+ if (this != null)
+ {
+ this->rowId = rhs.rowId;
+ this->phoneNumber.Append(rhs.phoneNumber);
+ this->rejectCondition = rhs.rejectCondition;
+ this->isActivated = rhs.isActivated;
+ }
+ return *this;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallSettingDataService.cpp
+ * @brief Call Database class
+ */
+
+#include <FApp.h>
+#include <FSocial.h>
+#include <FIo.h>
+#include "PhnCallSettingDataService.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+using namespace Tizen::App;
+using namespace Tizen::Social;
+
+CallSettingDataService* CallSettingDataService::__pCallSettingDataService = null;
+Database* CallSettingDataService::__pDatabase = null;
+
+CallSettingDataService::CallSettingDataService(void)
+: __strDbName(App::GetInstance()->GetAppSharedPath() + L"trusted/CallRejectInfoListDataBase")
+{
+ __pStmt = null;
+ __pEnum = null;
+
+ return;
+}
+
+CallSettingDataService::~CallSettingDataService(void)
+{
+ if (__pDatabase != null)
+ {
+ delete __pDatabase;
+ __pDatabase = null;
+ }
+ __pCallSettingDataService = null;
+ return;
+}
+
+CallSettingDataService*
+CallSettingDataService::CreateInstance(void)
+{
+ if (__pCallSettingDataService == null)
+ {
+ __pCallSettingDataService = new (std::nothrow) CallSettingDataService();
+ }
+ return __pCallSettingDataService;
+}
+result
+CallSettingDataService::OpenDatabase(void)
+{
+ result r = E_SUCCESS;
+
+ // create the database if it doesn't exist
+ if (__pDatabase != null)
+ {
+ return E_OBJ_ALREADY_EXIST;
+ }
+ __pDatabase = new (std::nothrow) Database();
+ r = __pDatabase->Construct(__strDbName, "a+");
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() database construct failed");
+
+ r = CreateCallRejectTableDatabase();
+ // TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() call reject Create Table failed");
+ r = CreateSpeedDialTableDatabase();
+ // TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() speed dial Create Table failed");
+
+ return r;
+
+ CATCH:
+ delete __pDatabase;
+ __pDatabase = null;
+ return r;
+}
+
+result
+CallSettingDataService::CreateCallRejectTableDatabase(void)
+{
+ String sqlQuery;
+ result r = E_SUCCESS;
+
+ sqlQuery.Append(L"CREATE TABLE IF NOT EXISTS CallRejectInfoTable(id INTEGER PRIMARY KEY AUTOINCREMENT,phonenumber TEXT,rejectcondition INT,activated INT)");
+
+ r = __pDatabase->ExecuteSql(sqlQuery, true);
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::CreateCallRejectInfoTableDatabase() Create Table failed");
+
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::CreateSpeedDialTableDatabase(void)
+{
+ String sqlQuery;
+ result r = E_SUCCESS;
+
+ sqlQuery.Append(L"CREATE TABLE IF NOT EXISTS SpeedDialTable(id INTEGER PRIMARY KEY AUTOINCREMENT,contactInfo TEXT,keyMappedTo INT)");
+
+ r = __pDatabase->ExecuteSql(sqlQuery, true);
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::CreateCallRejectInfoTableDatabase() Create Table failed");
+
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::CloseDatabase(void)
+{
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pDatabase != null)
+ {
+ delete __pDatabase;
+ __pDatabase = null;
+ }
+
+ return E_SUCCESS;
+}
+
+result
+CallSettingDataService::AddCallRejectInfoToDatabase(CallRejectInfo* pNewItem)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_FAILURE;
+
+ TryCatch(pNewItem != null, , "CallSettingDataService::AddCallRejectInfoToDatabase() no item to add");
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"INSERT INTO CallRejectInfoTable(phonenumber,rejectcondition,activated) VALUES (?,?,?)");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddCallRejectInfoToDatabase() CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ r = __pStmt->BindString(0, pNewItem->phoneNumber);
+ __pStmt->BindInt(1, pNewItem->rejectCondition);
+ __pStmt->BindInt(2, pNewItem->isActivated);
+
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddCallRejectInfoToDatabase() Add CallRejectInfo to DB failed");
+
+ r = __pDatabase->CommitTransaction();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddCallRejectInfoToDatabase() CommitTransaction to DB failed");
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::DeleteCallRejectInfoListFromDatabase(ArrayList* pIndexArray)
+{
+ result r = E_SUCCESS;
+ IEnumerator* pEnum = null;
+ Integer* index;
+
+ TryCatch(pIndexArray != null, , "CallSettingDataService::DeleteCallRejectInfoListFromDatabase() no item to delete");
+
+ pEnum = pIndexArray->GetEnumeratorN();
+ index = null;
+ if (pEnum != null)
+ {
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ index = static_cast<Integer*>(pEnum->GetCurrent());
+ r = DeleteCallRejectInfoFromDatabase(index->ToInt());
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddCallRejectInfoToDatabase() Add CallRejectInfo to DB failed");
+ }
+ delete pEnum;
+ pEnum = null;
+ }
+
+ if (pIndexArray != null)
+ {
+ pIndexArray->RemoveAll(true);
+ delete pIndexArray;
+ pIndexArray = null;
+ }
+ return r;
+
+ CATCH:
+ if (pEnum != null)
+ {
+ delete pEnum;
+ pEnum = null;
+ }
+ if (pIndexArray != null)
+ {
+ pIndexArray->RemoveAll(true);
+ delete pIndexArray;
+ pIndexArray = null;
+ }
+ return r;
+}
+
+result
+CallSettingDataService::DeleteCallRejectInfoFromDatabase(int aIndex)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"DELETE FROM CallRejectInfoTable WHERE id = ?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::DeleteCallRejectInfoFromDatabase CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ __pStmt->BindInt(0, aIndex);
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::DeleteCallRejectInfoFromDatabase Delete CallRejectInfo from DB failed");
+
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::UpdateCallRejectInfoDatabase(int aIndex, CallRejectInfo* pCallInfoItem)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+
+ TryCatch(pCallInfoItem != null, , "CallSettingDataService::UpdateCallRejectInfoDatabase() no item to update");
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"UPDATE CallRejectInfoTable SET phonenumber=?,rejectcondition=?,activated=? WHERE id=?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::UpdateCallRejectInfoDatabase CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ r = __pStmt->BindString(0, pCallInfoItem->phoneNumber);
+ __pStmt->BindInt(1, pCallInfoItem->rejectCondition);
+ __pStmt->BindInt(2, pCallInfoItem->isActivated);
+ __pStmt->BindInt(3, aIndex);
+
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::UpdateCallRejectInfoDatabase Update CallRejectInfo in DB failed");
+
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::GetCallRejectInfoFromDatabase(int aIndex, CallRejectInfo& dbItem)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+ __pDatabase->BeginTransaction();
+ statement.Append(L"SELECT id,phonenumber,rejectcondition,activated FROM CallRejectInfoTable WHERE id=?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetCallRejectInfoFromDatabase CreateStatementN failed");
+
+ __pStmt->BindInt(0, aIndex);
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetCallRejectInfoFromDatabase Get CallRejectInfo from DB failed");
+
+ if (__pEnum != null)
+ {
+ int activateflag;
+ int rejectCondition;
+ __pEnum->GetIntAt(0, dbItem.rowId);
+ __pEnum->GetStringAt(1, dbItem.phoneNumber);
+ __pEnum->GetIntAt(2, rejectCondition);
+ __pEnum->GetIntAt(3, activateflag);
+ dbItem.rejectCondition = (CallRejectMatchCondition)rejectCondition;
+ dbItem.isActivated = (bool)activateflag;
+ }
+ __pDatabase->CommitTransaction();
+
+
+ delete __pStmt;
+ __pStmt = NULL;
+
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::GetAllCallRejectInfoFromDatabaseN(ArrayListT<CallRejectInfo>& callRejectInfoList)
+{
+ String sql;
+ __pEnum = null;
+ result r = E_SUCCESS;
+ __pDatabase->BeginTransaction();
+
+ sql.Append(L"SELECT id,phonenumber,rejectcondition,activated from CallRejectInfoTable");
+ __pEnum = __pDatabase->QueryN(sql);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetAllCallRejectInfoFromDatabase Get CallRejectInfo from DB failed");
+
+ //check if the query returned any result and then iterate through the results
+ if (__pEnum != null)
+ {
+ while (__pEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo* pCallRejectInfoItem = new (std::nothrow) CallRejectInfo;
+ int activateflag;
+ int rejectCondition;
+ __pEnum->GetIntAt(0, pCallRejectInfoItem->rowId);
+ __pEnum->GetStringAt(1, pCallRejectInfoItem->phoneNumber);
+ __pEnum->GetIntAt(2, rejectCondition);
+ __pEnum->GetIntAt(3, activateflag);
+ pCallRejectInfoItem->rejectCondition = (CallRejectMatchCondition)rejectCondition;
+ pCallRejectInfoItem->isActivated = (bool)activateflag;
+ callRejectInfoList.Add(*pCallRejectInfoItem);
+ }
+ }
+ __pDatabase->CommitTransaction();
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::GetCallRejectCount(int& count)
+{
+ String statement;
+ result r = E_SUCCESS;
+ __pStmt = null;
+ __pEnum = null;
+
+ __pDatabase->BeginTransaction();
+ statement.Append(L"SELECT COUNT (*) FROM CallRejectInfoTable");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetCount CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetCount Count from DB failed");
+
+ if (__pEnum != null)
+ {
+ r = __pEnum->MoveNext();
+ __pEnum->GetIntAt(0, count);
+ }
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = NULL;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+bool
+CallSettingDataService::IsCallToBeRejected(String& phoneNumber)
+{
+ bool isCallToBeRejected = false;
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+ __pDatabase->BeginTransaction();
+
+ //statement.Append(L"SELECT * FROM CallRejectInfoTable WHERE phonenumber LIKE ?");
+ statement.Append(L"SELECT * FROM CallRejectInfoTable WHERE activated=?");
+
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::SearchFromDataBase CreateStatementN failed");
+
+ //__pStmt->BindString(0, phoneNumber);
+ if (__pStmt != null)
+ {
+ __pStmt->BindInt(0,(int)true);
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::SearchFromDataBaseN search failed");
+
+ //check if the query returned any result and then iterate through the results
+ if (__pEnum != null)
+ {
+ while (__pEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo* pCallRejectInfoItem = new (std::nothrow) CallRejectInfo;
+ int activateflag;
+ int rejectCondition;
+ __pEnum->GetIntAt(0, pCallRejectInfoItem->rowId);
+ __pEnum->GetStringAt(1, pCallRejectInfoItem->phoneNumber);
+ __pEnum->GetIntAt(2, rejectCondition);
+ __pEnum->GetIntAt(3, activateflag);
+ pCallRejectInfoItem->rejectCondition = (CallRejectMatchCondition)rejectCondition;
+ pCallRejectInfoItem->isActivated = (bool)activateflag;
+ if (CheckRejectCondition(phoneNumber, *pCallRejectInfoItem) == true)
+ {
+ delete pCallRejectInfoItem;
+ isCallToBeRejected = true;
+ break;
+ }
+ delete pCallRejectInfoItem;
+ }
+ }
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = NULL;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ return isCallToBeRejected;
+
+ CATCH:
+ return isCallToBeRejected;
+}
+
+bool
+CallSettingDataService::CheckRejectCondition(String& phoneNumber, CallRejectInfo& callRejectInfo)
+{
+ bool isCallToBeRejected = false;
+ switch (callRejectInfo.rejectCondition)
+ {
+ case CALL_REJECT_MATCH_EXACTLY:
+ {
+ if (callRejectInfo.phoneNumber.CompareTo(phoneNumber) == 0)
+ {
+ isCallToBeRejected = true;
+ }
+ }
+ break;
+ case CALL_REJECT_MATCH_START:
+ {
+ isCallToBeRejected = phoneNumber.StartsWith(callRejectInfo.phoneNumber, 0);
+ }
+ break;
+ case CALL_REJECT_MATCH_END:
+ {
+ isCallToBeRejected = phoneNumber.EndsWith(callRejectInfo.phoneNumber);
+ }
+ break;
+ case CALL_REJECT_MATCH_INCLUDE:
+ {
+ isCallToBeRejected = phoneNumber.Contains(callRejectInfo.phoneNumber);
+ }
+ break;
+ default:
+ break;
+ }
+
+ return isCallToBeRejected;
+}
+result
+CallSettingDataService::AddSpeedDialInfoToDatabase(SpeedDialInfo* pNewItem)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_FAILURE;
+
+ TryCatch(pNewItem != null, , "CallSettingDataService::AddSpeedDialInfoToDatabase() no item to add");
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"INSERT INTO SpeedDialTable(contactInfo,keyMappedTo) VALUES (?,?)");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddSpeedDialInfoToDatabase() CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ r = __pStmt->BindString(0, pNewItem->contactId);
+ __pStmt->BindInt(1, pNewItem->keyMapping);
+
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddSpeedDialInfoToDatabase() Add SpeedDialInfo to DB failed");
+
+ r = __pDatabase->CommitTransaction();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::AddSpeedDialInfoToDatabase() CommitTransaction to DB failed");
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::DeleteSpeedDialInfoFromDatabase(int aIndex)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"DELETE FROM SpeedDialTable WHERE id = ?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::DeleteSpeedDialInfoFromDatabase CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ __pStmt->BindInt(0, aIndex);
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::DeleteSpeedDialInfoFromDatabase Delete SpeedDialInfo from DB failed");
+
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::UpdateSpeedDialInfoDatabase(int aIndex, SpeedDialInfo* pSpeedDialInfoItem)
+{
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+
+ TryCatch(pSpeedDialInfoItem != null, , "CallSettingDataService::UpdateSpeedDialInfoDatabase() no item to update");
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"UPDATE SpeedDialTable SET contactInfo=?,keyMappedTo=? WHERE id=?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::UpdateSpeedDialInfoDatabase CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ r = __pStmt->BindString(0, pSpeedDialInfoItem->contactId);
+ __pStmt->BindInt(1, pSpeedDialInfoItem->keyMapping);
+ __pStmt->BindInt(2, aIndex);
+
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::UpdateSpeedDialInfoDatabase Update SpeedDialInfo in DB failed");
+
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return r;
+
+ CATCH:
+ return r;
+}
+
+IMapT<int,SpeedDialInfo>*
+CallSettingDataService::GetAllSpeedDialInfoMapFromDatabaseN(void)
+{
+ String sql;
+ __pEnum = null;
+ result r = E_SUCCESS;
+ HashMapT<int,SpeedDialInfo>* pSpeedDialInfoList = null;
+ r = __pDatabase->BeginTransaction();
+
+ sql.Append(L"SELECT id,contactInfo,keyMappedTo from SpeedDialTable");
+ __pEnum = __pDatabase->QueryN(sql);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::GetAllSpeedDialInfoFromDatabase Get SpeedDialInfo from DB failed");
+
+ //check if the query returned any result and then iterate through the results
+ if (__pEnum != null)
+ {
+ pSpeedDialInfoList = new (std::nothrow) HashMapT<int,SpeedDialInfo>();
+ pSpeedDialInfoList->Construct(10);
+ while (__pEnum->MoveNext() == E_SUCCESS)
+ {
+ SpeedDialInfo* pSpeedDialInfoItem = new (std::nothrow) SpeedDialInfo();
+ int keyMappedTo;;
+ __pEnum->GetIntAt(0, pSpeedDialInfoItem->rowId);
+ __pEnum->GetStringAt(1, pSpeedDialInfoItem->contactId);
+ __pEnum->GetIntAt(2, keyMappedTo);
+ pSpeedDialInfoItem->keyMapping = keyMappedTo;
+ pSpeedDialInfoList->Add(keyMappedTo ,*pSpeedDialInfoItem);
+ }
+ }
+
+ __pDatabase->CommitTransaction();
+
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ SyncWithCurrentAddressbookStatus(pSpeedDialInfoList);
+ return pSpeedDialInfoList;
+
+ CATCH:
+ return pSpeedDialInfoList;
+}
+
+void
+CallSettingDataService::SyncWithCurrentAddressbookStatus(HashMapT<int,SpeedDialInfo>* pSpeedDialInfoList)
+{
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+
+ if(pAddressbook == null || pSpeedDialInfoList == null)
+ {
+ return;
+ }
+
+ IListT<SpeedDialInfo>* pSpeedDialList = pSpeedDialInfoList->GetValuesN();
+ IEnumeratorT<SpeedDialInfo> *pSpeedDialListEnum = pSpeedDialList->GetEnumeratorN();
+ while(pSpeedDialListEnum->MoveNext() == E_SUCCESS)
+ {
+ SpeedDialInfo speeDialInfo;
+ RecordId recordId = INVALID_RECORD_ID;
+ pSpeedDialListEnum->GetCurrent(speeDialInfo);
+ Integer::Parse(speeDialInfo.contactId, recordId);
+
+ Contact* pMappedContact = pAddressbook->GetContactN(recordId);
+ if(pMappedContact == null)
+ {
+ DeleteSpeedDialInfoFromDatabase(speeDialInfo.rowId);
+ pSpeedDialInfoList->Remove(speeDialInfo.keyMapping);
+ }
+ else
+ {
+ delete pMappedContact;
+ }
+ }
+ delete pAddressbook;
+ delete pSpeedDialListEnum;
+ delete pSpeedDialList;
+
+}
+
+String*
+CallSettingDataService::GetSpeedDialContactN(int aIndex)
+{
+ result r = E_SUCCESS;
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ String* fetchedInfo = null;
+
+ __pDatabase->BeginTransaction();
+
+ statement.Append(L"SELECT contactInfo from SpeedDialTable WHERE keyMappedTo=?");
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "GetSpeedDialInfoN - CreateStatementN failed");
+ if (__pStmt != null)
+ {
+ __pStmt->BindInt(0, aIndex);
+
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "GetSpeedDialInfoN - ExecuteStatementN failed");
+
+ //check if the query returned any result and then iterate through the results
+ if (__pEnum != null && __pEnum->MoveNext() == E_SUCCESS)
+ {
+ String contact;
+ __pEnum->GetStringAt(0, contact);
+ fetchedInfo = new (std::nothrow) String(contact);
+ }
+
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ return fetchedInfo;
+
+ CATCH:
+ return fetchedInfo;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCalllogManager.cpp
+ * @brief This class provides call log APIs
+ */
+#include "PhnAppUtility.h"\r
+#include "PhnCalllogManager.h"
+#include <FLocales.h>
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+using namespace Tizen::Locales;
+using namespace Tizen::Ui::Controls;
+
+CallLogManager* CallLogManager::__pCallogManager = null;
+CallLogType CallLogManager::__callLogViewbyID = CALL_LOG_TYPE_ALL;\r
+\r
+static int TOTAL_CALL_LOGS_TO_FETCH = 500;\r
+
+result
+LogListByNumberComparer::Compare(const CallLogDetails& obj1, const CallLogDetails& obj2, int& cmp) const
+{
+ CallLogDetails* log1 = const_cast<CallLogDetails*>((&obj1));
+ CallLogDetails* log2 = const_cast<CallLogDetails*>((&obj2));
+ if(log1 == null || log2 == null)
+ {
+ return E_FAILURE;
+ }
+ log1->ConvertTimetoDateTime();
+ DateTime date1 = log1->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log1->GetCalllogDbId(), log1->GetCalllogType(), log1->GetPhoneNumber(), date1.GetDay(), date1.GetMonth(), date1.GetYear());
+ log2->ConvertTimetoDateTime();
+ DateTime date2 = log2->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log2->GetCalllogDbId(), log2->GetCalllogType(), log2->GetPhoneNumber(), date2.GetDay(), date2.GetMonth(), date2.GetYear());
+ cmp = date2.CompareTo(date1);
+ return E_SUCCESS;
+}
+
+result
+LogListComparer::Compare(const Object& obj1, const Object& obj2, int& cmp) const
+{
+ CallLogDetails* log1 = dynamic_cast<CallLogDetails*>(const_cast<Object*>(&obj1));
+ CallLogDetails* log2 = dynamic_cast<CallLogDetails*>(const_cast<Object*>(&obj2));
+ if(log1 == null || log2 == null)
+ {
+ return E_FAILURE;
+ }
+ log1->ConvertTimetoDateTime();
+ DateTime date1 = log1->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log1->GetCalllogDbId(), log1->GetCalllogType(), log1->GetPhoneNumber(), date1.GetDay(), date1.GetMonth(), date1.GetYear());
+ log2->ConvertTimetoDateTime();
+ DateTime date2 = log2->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log2->GetCalllogDbId(), log2->GetCalllogType(), log2->GetPhoneNumber(), date2.GetDay(), date2.GetMonth(), date2.GetYear());
+ cmp = date2.CompareTo(date1);
+ return E_SUCCESS;
+}
+
+result
+LogGroupListComparer::Compare(const Object& obj1, const Object& obj2, int& cmp) const
+{
+ GroupItemClass* grp1 = dynamic_cast<GroupItemClass*>(const_cast<Object*>(&obj1));
+ GroupItemClass* grp2 = dynamic_cast<GroupItemClass*>(const_cast<Object*>(&obj2));
+ if(grp1 == null || grp2 == null)
+ {
+ return E_FAILURE;
+ }
+ CallLogDetails* log1 = static_cast<CallLogDetails*>(grp1->GetLogData()->GetAt(0));
+ CallLogDetails* log2 = static_cast<CallLogDetails*>(grp2->GetLogData()->GetAt(0));
+ if(log1 == null || log2 == null)
+ {
+ return E_FAILURE;
+ }
+ log1->ConvertTimetoDateTime();
+ DateTime date1 = log1->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log1->GetCalllogDbId(), log1->GetCalllogType(), log1->GetPhoneNumber(), date1.GetDay(), date1.GetMonth(), date1.GetYear());
+ log2->ConvertTimetoDateTime();
+ DateTime date2 = log2->GetDateTime();
+ //AppLog(" %d %d %s %d:%d:%d", log2->GetCalllogDbId(), log2->GetCalllogType(), log2->GetPhoneNumber(), date2.GetDay(), date2.GetMonth(), date2.GetYear());
+ cmp = date2.CompareTo(date1);
+ return E_SUCCESS;
+}
+
+CallLogDetails::CallLogDetails(void)
+{
+ dateTime.SetValue(0,0,0);
+ first_name = null;
+ last_name = null;
+ display_name = null;
+ contact_image_path = null;
+ phone_number = null;
+ short_message = null;
+ contact_db_id = -1;
+ __consecutiveNoCounter = 1;\r
+ __pDBIds = null;\r
+}
+
+CallLogDetails::~CallLogDetails(void)
+{
+ //NOTE: none of the fields are owned. Free() them will lead to crash.
+}
+
+bool
+CallLogDetails::operator ==(const CallLogDetails& rhs) const
+{
+ if(this->calllog_db_id == rhs.calllog_db_id)
+ {
+ return true;
+ }
+ return false;
+}
+
+bool
+CallLogDetails::operator !=(const CallLogDetails& rhs) const
+{
+ if(this->calllog_db_id != rhs.calllog_db_id)
+ {
+ return true;
+ }
+ return false;
+}
+
+CallLogDetails&
+CallLogDetails::operator =(const CallLogDetails& rhs)
+{
+ this->calllog_db_id = rhs.calllog_db_id;
+ this->contact_db_id = rhs.contact_db_id;
+ this->calllog_type = rhs.calllog_type;
+ this->duration_sec = rhs.duration_sec;
+ if(rhs.first_name != null)
+ {
+ this->first_name = strdup(rhs.first_name);
+ }
+ if(rhs.last_name != null)
+ {
+ this->last_name = strdup(rhs.last_name);
+ }
+ if(rhs.display_name != null)
+ {
+ this->display_name = strdup(rhs.display_name);
+ }
+ if(rhs.contact_image_path != null)
+ {
+ this->contact_image_path = strdup(rhs.contact_image_path);
+ }
+ if(rhs.short_message != null)
+ {
+ this->short_message = strdup(rhs.short_message);
+ }
+ this->duration_sec = rhs.duration_sec;
+ this->dateTime = rhs.dateTime;
+ this->__consecutiveNoCounter = rhs.__consecutiveNoCounter;
+ if(rhs.__pDBIds != null )
+ {
+ this->__pDBIds = new (std::nothrow) ArrayList();
+ this->__pDBIds->Construct();
+ for(int index = 0; index < rhs.__pDBIds->GetCount(); index++)
+ {
+ Integer dbid = *(static_cast<Integer*>(rhs.__pDBIds->GetAt(index)));
+ this->__pDBIds->Add(new (std::nothrow) Integer(dbid));
+ }
+
+ }
+ if(rhs.phone_number != null)
+ {
+ this->phone_number = strdup(rhs.phone_number);
+ }
+ this->startTime = rhs.startTime;
+ return *this;
+}
+
+
+void
+CallLogDetails::SetCalllogDbId(int id)
+{
+ calllog_db_id = id;
+}
+
+
+int
+CallLogDetails::GetCalllogDbId(void)
+{
+ return calllog_db_id;
+}
+
+void
+CallLogDetails::SetCalllogType(contacts_phone_log_type_e type)
+{
+ switch (type)
+ {
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING:
+ calllog_type = CALL_LOG_TYPE_VOICE_INCOMING;
+ break;
+ case CONTACTS_PLOG_TYPE_VOICE_OUTGOING:
+ calllog_type = CALL_LOG_TYPE_VOICE_OUTGOING;
+ break;
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN:
+ calllog_type = CALL_LOG_TYPE_VOICE_MISSED_UNSEEN;
+ break;
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN:
+ calllog_type = CALL_LOG_TYPE_VOICE_MISSED;
+ break;
+ case CONTACTS_PLOG_TYPE_VOICE_REJECT:
+ calllog_type = CALL_LOG_TYPE_VOICE_REJECTED;
+ break;
+ case CONTACTS_PLOG_TYPE_VOICE_BLOCKED:
+ calllog_type = CALL_LOG_TYPE_VOICE_BLOCKED;
+ break;
+
+
+ case CONTACTS_PLOG_TYPE_VIDEO_INCOMMING:
+ calllog_type = CALL_LOG_TYPE_VIDEO_INCOMING;
+ break;
+ case CONTACTS_PLOG_TYPE_VIDEO_OUTGOING:
+ calllog_type = CALL_LOG_TYPE_VIDEO_OUTGOING;
+ break;
+ case CONTACTS_PLOG_TYPE_VIDEO_INCOMMING_UNSEEN:
+ case CONTACTS_PLOG_TYPE_VIDEO_INCOMMING_SEEN:
+ calllog_type = CALL_LOG_TYPE_VIDEO_MISSED;
+ break;
+ case CONTACTS_PLOG_TYPE_VIDEO_REJECT:
+ calllog_type = CALL_LOG_TYPE_VIDEO_REJECTED;
+ break;
+ case CONTACTS_PLOG_TYPE_VIDEO_BLOCKED:
+ calllog_type = CALL_LOG_TYPE_VIDEO_BLOCKED;
+ break;
+
+ case CONTACTS_PLOG_TYPE_MMS_INCOMMING:
+ calllog_type = CALL_LOG_TYPE_MMS_INCOMING;
+ break;
+ case CONTACTS_PLOG_TYPE_MMS_OUTGOING:
+ calllog_type = CALL_LOG_TYPE_MMS_OUTGOING;
+ break;
+ case CONTACTS_PLOG_TYPE_MMS_BLOCKED:
+ calllog_type = CALL_LOG_TYPE_SMS_BLOCKED;
+ break;
+
+ case CONTACTS_PLOG_TYPE_SMS_INCOMMING:
+ calllog_type = CALL_LOG_TYPE_SMS_INCOMING;
+ break;
+ case CONTACTS_PLOG_TYPE_SMS_OUTGOING:
+ calllog_type = CALL_LOG_TYPE_SMS_OUTGOING;
+ break;
+ case CONTACTS_PLOG_TYPE_SMS_BLOCKED:
+ calllog_type = CALL_LOG_TYPE_SMS_BLOCKED;
+ break;
+
+ case CONTACTS_PLOG_TYPE_EMAIL_RECEIVED:
+ calllog_type = CALL_LOG_TYPE_EMAIL_INCOMING;
+ break;
+ case CONTACTS_PLOG_TYPE_EMAIL_SENT:
+ calllog_type = CALL_LOG_TYPE_EMAIL_OUTGOING;
+ break;
+
+ default:
+ break;
+ }
+}
+
+CallLogType
+CallLogDetails::GetCalllogType(void)
+{
+ return calllog_type;
+}
+
+void
+CallLogDetails::SetContactDbId(int id)
+{
+ contact_db_id = id;
+}
+
+int
+CallLogDetails::GetContactDbId(void)
+{
+ return contact_db_id;
+}
+
+void
+CallLogDetails::SetFirstName(char* name)
+{
+ first_name = strdup(name);
+}
+
+char*
+CallLogDetails::GetFirstName(void)
+{
+ return first_name;
+}
+
+void
+CallLogDetails::SetLastName(char* name)
+{
+ last_name = strdup(name);
+}
+
+char*
+CallLogDetails::GetLastName(void)
+{
+ return last_name;
+}
+
+void
+CallLogDetails::SetDisplayName(char* name)
+{
+ display_name = strdup(name);
+}
+
+char*
+CallLogDetails::GetDisplayName(void)
+{
+ return display_name;
+}
+
+void
+CallLogDetails::SetContactImagePath(char* name)
+{
+ contact_image_path = strdup(name);
+}
+
+char*
+CallLogDetails::GetContactImagePath(void)
+{
+ return contact_image_path;
+}
+
+void
+CallLogDetails::SetPhoneNumber(char* name)
+{
+ phone_number = strdup(name);
+}
+
+char*
+CallLogDetails::GetPhoneNumber(void)
+{
+ return phone_number;
+}
+
+void
+CallLogDetails::SetShortMessage(char* name)
+{
+ short_message = strdup(name);
+}
+
+char*
+CallLogDetails::GetShortMessage(void)
+{
+ return short_message;
+}
+
+void
+CallLogDetails::ConvertTimetoDateTime(void)
+{
+ DateTime dtNow;
+ struct tm* time = null;
+ time = gmtime(&startTime);
+ LocaleManager localManager;
+ TimeZone tz;
+ if(time != null)
+ {
+ dtNow.SetValue(time->tm_year+1900,time->tm_mon+1, time->tm_mday,time->tm_hour, time->tm_min, time->tm_sec);
+
+ }
+ localManager.Construct();
+ tz = localManager.GetSystemTimeZone();
+ dateTime = tz.UtcTimeToWallTime(dtNow);
+
+
+}
+
+void
+CallLogDetails::SetStartTime(time_t time)
+{
+ startTime = time;
+ ConvertTimetoDateTime();
+}
+
+time_t
+CallLogDetails::GetStartTime(void)
+{
+ return startTime;
+}
+
+DateTime
+CallLogDetails::GetDateTime(void)
+{
+ return dateTime;
+}
+
+void
+CallLogDetails::SetDuration(int duration)
+{
+ duration_sec = duration;
+}
+
+int
+CallLogDetails::GetDuration(void)
+{
+ return duration_sec;
+}
+
+int\r
+CallLogDetails::GetConsecutiveNoCounter()\r
+{\r
+ return __consecutiveNoCounter;\r
+}\r
+\r
+void\r
+CallLogDetails::SetConsecutiveNoCounter(int consecutiveNoCounter)\r
+{\r
+ __consecutiveNoCounter = consecutiveNoCounter;\r
+}\r
+\r
+Tizen::Base::Collection::ArrayList*\r
+CallLogDetails::GetCallLogDbIds()\r
+{\r
+ return __pDBIds;\r
+}\r
+\r
+void\r
+CallLogDetails::SetCallLogDbIds(Tizen::Base::Collection::ArrayList* dbIds)\r
+{\r
+ __pDBIds = dbIds;\r
+}\r
+\r
+CallLogManager*
+CallLogManager::GetInstance(void)
+{
+ if(__pCallogManager == null)
+ {
+ CreateInstance();
+ }
+ return __pCallogManager;
+}
+
+void
+CallLogManager::CreateInstance(void)
+{
+ __pCallogManager = new CallLogManager();
+ result r = __pCallogManager->Construct();
+ if(IsFailed(r))
+ {
+ delete __pCallogManager;
+ __pCallogManager = null;
+ return;
+ }
+ std::atexit(DestroyInstance);
+}
+void
+CallLogManager::DestroyInstance(void)
+{
+ contacts_disconnect2();
+ delete __pCallogManager;
+}
+result
+CallLogManager::Construct(void)
+{
+ int ret = contacts_connect2();
+ if(ret != 0)
+ {
+ return E_FAILURE;
+ }
+ \r
+ __callLogViewbyID = CALL_LOG_TYPE_ALL;\r
+ __callLogsViewedCount = 0;\r
+
+ __pCalllogGroupList = new (std::nothrow) ArrayList();\r
+ __pCalllogGroupList->Construct();\r
+ __pCalllogChangeListerners = new (std::nothrow) ArrayListT<ICalllogChangeListener*>;
+ __pCalllogChangeListerners->Construct(10);
+ __pCalllogDBIds = new (std::nothrow) HashMapT<int,int>();
+ __pCalllogDBIds->Construct(100);
+
+ //GetAllCallogDataFromDatabseCB();
+ contacts_db_add_changed_cb(_contacts_phone_log._uri,CallLogManager::ContactsDbchangedcb,this);
+ SortCalllogList();
+ //TODO
+ //calllog_add_calllog_db_changed_cb(changed_db_cb, this);
+ return E_SUCCESS;
+
+}
+///////////////////////////////////////Calllog Manager////////////////////////////////////////////////////////////////////////////////
+CallLogManager::CallLogManager(void)
+{
+ __pCalllogGroupList = null;\r
+ __pCalllogListByNumber = null;
+ __pNumber = null;
+ __pCalllogChangeListerners = null;
+ __bDbDirty = true;
+}
+
+CallLogManager::~CallLogManager(void)
+{
+ AppLogDebug("Enter");
+ contacts_db_remove_changed_cb(_contacts_phone_log._uri,CallLogManager::ContactsDbchangedcb,null);
+ DeleteAllCallLogCacheEntries();\r
+ if(__pCalllogListByNumber != null)
+ {
+ __pCalllogListByNumber = null;
+ }
+ if(__pNumber != null)
+ {
+ delete __pNumber;
+ __pNumber = null;
+ }
+ if(__pCalllogDBIds != null)
+ {
+ __pCalllogDBIds->RemoveAll();
+ delete __pCalllogDBIds;
+ }
+ if(__pCalllogChangeListerners != null)
+ {
+ delete __pCalllogChangeListerners;
+ }
+ __pCallogManager = null;
+}
+
+void\r
+CallLogManager::DeleteAllCallLogCacheEntries(void)\r
+{\r
+ if(__pCalllogGroupList != null)\r
+ {\r
+ ArrayList* pCalllogList = null;\r
+ GroupItemClass* pGroupInfo = null;\r
+ for(int index = 0; index < __pCalllogGroupList->GetCount(); index++)\r
+ {\r
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(index));\r
+ if(pGroupInfo != null)\r
+ {\r
+ pCalllogList = pGroupInfo->GetLogData();\r
+ if(pCalllogList != null)\r
+ {\r
+ pCalllogList->RemoveAll();\r
+ delete pCalllogList;\r
+ pCalllogList = null;\r
+ }\r
+ delete pGroupInfo;\r
+ pGroupInfo = null;\r
+ }\r
+ }\r
+ __pCalllogGroupList->RemoveAll();\r
+ delete __pCalllogGroupList;\r
+ __pCalllogGroupList = null;\r
+ }\r
+}\r
+unsigned long
+CallLogManager::GetDuration(long long start_time)
+{
+ time_t curr_time;
+ unsigned long call_duration_in_sec = 50;
+ curr_time = time(0);
+ call_duration_in_sec = curr_time - start_time;
+ return call_duration_in_sec;
+}
+
+void
+CallLogManager::CopyDataToCallLogDetails(CallLogDetails* calllogInfo , contacts_record_h getrec)
+{
+ int logid=0;
+ contacts_record_get_int(getrec,_contacts_phone_log.id,&logid);
+ calllogInfo->SetCalllogDbId(logid);
+
+ contacts_phone_log_type_e logType=CONTACTS_PLOG_TYPE_NONE;
+ contacts_record_get_int(getrec,_contacts_phone_log.log_type,(int*)&logType);
+ calllogInfo->SetCalllogType(logType);
+
+ int log_time=0;
+ contacts_record_get_int(getrec,_contacts_phone_log.log_time,&log_time);
+ calllogInfo->SetStartTime((time_t)log_time);
+
+ char* address = null;
+ int ret = contacts_record_get_str(getrec,_contacts_phone_log.address,&address);
+ if(ret == 0 && address != null)
+ {
+ calllogInfo->SetPhoneNumber(address);
+ free(address);
+ }
+
+ int duration=0;
+ contacts_record_get_int(getrec,_contacts_phone_log.extra_data1,&duration);
+ calllogInfo->SetDuration(duration);
+
+ char* shortMsg=0;
+ contacts_record_get_str(getrec,_contacts_phone_log.extra_data2,&shortMsg);
+ if(shortMsg)
+ calllogInfo->SetShortMessage(shortMsg);
+
+}
+
+bool
+CallLogManager::GetAllCallogDataFromDatabseCB()
+{
+ contacts_list_h list=NULL;\r
+ unsigned int count = 0;\r
+ int ret = 0;\r
+ __callLogsViewedCount = 0;\r
+
+ if(QueryCallogDatabse(&list) == false)\r
+ {
+ AppLogDebug("Getting records from callLog database is failed!");\r
+ return false;
+ }
+ ret = contacts_list_get_count(list,&count);\r
+ contacts_list_first(list);\r
+
+ DateTime today, yesterday, tomorrow;\r
+ TimeSpan oneDay(1,0,0,0);\r
+ GetCurrentDateTime(today);\r
+ today.Subtract(today.GetTimeOfDay());\r
+
+ yesterday = today;\r
+ yesterday.Subtract(oneDay);\r
+ tomorrow = today;\r
+ tomorrow.Add(oneDay);\r
+\r
+ String title;\r
+ DateTime calllogDate;\r
+\r
+ for (unsigned int i = 0; i < count; i++)
+ {
+ contacts_record_h getrec=0;
+ ret = contacts_list_get_current_record_p(list,&getrec);
+ if(ret == 0)
+ {
+ contacts_phone_log_type_e logType=CONTACTS_PLOG_TYPE_NONE;
+ contacts_record_get_int(getrec,_contacts_phone_log.log_type,(int*)&logType);
+
+ if(logType != CONTACTS_PLOG_TYPE_EMAIL_RECEIVED && logType !=CONTACTS_PLOG_TYPE_EMAIL_SENT)
+ {
+ CallLogDetails* pCalllogInfo = new CallLogDetails();
+ CopyDataToCallLogDetails(pCalllogInfo, getrec);\r
+\r
+ if(__pCalllogDBIds->Add(pCalllogInfo->GetCalllogDbId(),pCalllogInfo->GetCalllogDbId()) == E_SUCCESS)\r
+ {
+ __callLogsViewedCount++;\r
+ //find title\r
+ pCalllogInfo->ConvertTimetoDateTime();\r
+ calllogDate = pCalllogInfo->GetDateTime();\r
+ title.Clear();\r
+ if(calllogDate >= today && calllogDate < tomorrow)\r
+ {\r
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_TODAY));\r
+ }\r
+ else if(calllogDate >= yesterday && calllogDate < today)\r
+ {\r
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_YESTERDAY));\r
+ }\r
+ else\r
+ {\r
+ title.Format(30,L"%d/%d/%d",calllogDate.GetDay(), calllogDate.GetMonth(), calllogDate.GetYear());\r
+ }\r
+ CreateCallLogGroup(pCalllogInfo, title);\r
+ }
+ else
+ {
+ delete pCalllogInfo;
+ }
+ }
+ }
+ //move to next record
+ ret = contacts_list_next(list);
+ if (ret != 0)
+ {
+ continue;
+ }
+ contacts_record_destroy(getrec,true);
+ }
+ contacts_list_destroy(list,false);
+ return true;\r
+}\r
+\r
+int
+CallLogManager::GetUnknownLogCount(int dbId)
+{
+ int calLogCount = 0;
+ int ret = 0;
+ contacts_filter_h filter=NULL;
+ contacts_query_h query = NULL;
+
+ contacts_filter_create(_contacts_phone_log._uri,&filter);
+ contacts_filter_add_int(filter,_contacts_phone_log.id, CONTACTS_MATCH_EQUAL, dbId);
+ contacts_query_create(_contacts_phone_log._uri,&query);
+ contacts_query_set_filter(query,filter);
+ ret = contacts_db_get_count_with_query(query,&calLogCount);
+ if(ret != CONTACTS_ERROR_NONE)
+ {
+ AppLogDebug("contacts_db_get_count_with_query failed %d",ret);
+ }
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+
+ return calLogCount;
+}
+\r
+bool\r
+CallLogManager::QueryCallogDatabse(contacts_list_h* list)\r
+{\r
+ contacts_filter_h filter=NULL;\r
+ contacts_query_h query = NULL;\r
+ int ret = 0;\r
+ //get all logs\r
+ if(getCallLogViewbyID() == CALL_LOG_TYPE_ALL)\r
+ {\r
+ int calLogCount = 0;\r
+ contacts_db_get_count(_contacts_phone_log._uri,&calLogCount);
+ if(calLogCount > TOTAL_CALL_LOGS_TO_FETCH)
+ {\r
+ ret = contacts_db_get_all_records(_contacts_phone_log._uri,calLogCount - TOTAL_CALL_LOGS_TO_FETCH,calLogCount,list);
+ }
+ else
+ {
+ ret = contacts_db_get_all_records(_contacts_phone_log._uri,0,TOTAL_CALL_LOGS_TO_FETCH,list);
+ }\r
+ if (ret != 0)\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ contacts_filter_create(_contacts_phone_log._uri,&filter);\r
+ //get Received/Dialed call logs only\r
+ if (getCallLogViewbyID() == CALL_LOG_TYPE_VOICE_INCOMING || getCallLogViewbyID() == CALL_LOG_TYPE_VOICE_OUTGOING)\r
+ {\r
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, GetCallLogType(getCallLogViewbyID()));\r
+ }\r
+ else\r
+ {\r
+ //get Missed/Missed Unseen call logs only or rejected/blocked call logs only\r
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, GetCallLogType(getCallLogViewbyID()));\r
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);\r
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, GetCallLogType((CallLogType)(getCallLogViewbyID()+1)));\r
+ }\r
+ contacts_query_create(_contacts_phone_log._uri,&query);\r
+ contacts_query_set_filter(query,filter);\r
+ ret = contacts_db_get_records_with_query(query,0,TOTAL_CALL_LOGS_TO_FETCH,list);\r
+ if (ret != 0)\r
+ {\r
+ contacts_filter_destroy(filter);\r
+ contacts_query_destroy(query);\r
+ return false;\r
+ }\r
+ contacts_filter_destroy(filter);\r
+ contacts_query_destroy(query);\r
+ }\r
+ return true;
+}
+
+void\r
+CallLogManager::CreateCallLogGroup(CallLogDetails* pCalllogInfo, String title)\r
+{\r
+ GroupItemClass* pGroupItemClass;\r
+ ArrayList* pData = null;\r
+ //find if group with this title is already found\r
+ pGroupItemClass = GetGroupWithTitle(title);\r
+ if (pGroupItemClass != null)\r
+ {\r
+ pData = pGroupItemClass->GetLogData();\r
+\r
+ String today = AppUtility::GetResourceString(IDS_LOGS_TODAY);\r
+ String yesterday = AppUtility::GetResourceString(IDS_LOGS_YESTERDAY);\r
+\r
+ //In case of Today or Yesterday logs group, if logs with same number present consecutively we will show the count instead of multiple entries.\r
+ if((today.CompareTo(pGroupItemClass->GetTitleText()) == 0) || (yesterday.CompareTo(pGroupItemClass->GetTitleText()) == 0))\r
+ {\r
+ CallLogDetails* pCurrCalllogInf = static_cast<CallLogDetails*>(pData->GetAt(0));\r
+ //Club the logs if they have same contact number and present consecutively.
+ //But do not club if the log are hidden and present consecutively.\r
+ if((String::Compare(String(pCurrCalllogInf->GetPhoneNumber()), String(pCalllogInfo->GetPhoneNumber())) == 0) &&
+ (pCurrCalllogInf->GetPhoneNumber() != null || pCalllogInfo->GetPhoneNumber() != null))\r
+ {\r
+ Tizen::Base::Collection::ArrayList* dbIds = pCurrCalllogInf->GetCallLogDbIds();\r
+ if(dbIds == null)\r
+ {\r
+ dbIds = new ArrayList();\r
+ dbIds->Construct();\r
+ dbIds->Add(new Integer(pCalllogInfo->GetCalllogDbId()));\r
+ dbIds->Add(new Integer(pCurrCalllogInf->GetCalllogDbId()));\r
+ }\r
+ else\r
+ {\r
+ dbIds->InsertAt(new Integer(pCalllogInfo->GetCalllogDbId()), 0);\r
+ }\r
+ pCalllogInfo->SetConsecutiveNoCounter(pCurrCalllogInf->GetConsecutiveNoCounter() + 1);\r
+ pCalllogInfo->SetCallLogDbIds(dbIds);\r
+ pData->RemoveAt(0, true);\r
+ __callLogsViewedCount--;\r
+ }\r
+ }\r
+ pData->InsertAt(pCalllogInfo,0);\r
+ pGroupItemClass->SetLogData(pData);\r
+ }\r
+ else\r
+ {\r
+ //Create a new group\r
+ pGroupItemClass = new(std::nothrow) GroupItemClass();\r
+ pGroupItemClass->SetTitleText(title);\r
+\r
+ __pCalllogGroupList->InsertAt(pGroupItemClass, 0);\r
+ pData = pGroupItemClass->GetLogData();\r
+ if(pData == null)\r
+ {\r
+ pData = new ArrayList();\r
+ }\r
+ pData->InsertAt(pCalllogInfo,0);\r
+ pGroupItemClass->SetLogData(pData);\r
+ }\r
+}\r
+\r
+GroupItemClass*\r
+CallLogManager::GetGroupWithTitle(String title)\r
+{\r
+ GroupItemClass* pGroupInfo = null;\r
+ int count = __pCalllogGroupList->GetCount();\r
+ for(int index = 0; index < count; index++)\r
+ {\r
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(index));\r
+ if(pGroupInfo == null)\r
+ {\r
+ return null;\r
+ }\r
+ String title1 = pGroupInfo->GetTitleText();\r
+ if( title.CompareTo(title1) == 0)\r
+ {\r
+ return pGroupInfo;\r
+ }\r
+ }\r
+ return null;\r
+}\r
+\r
+void\r
+CallLogManager::DeleteItemAtGroupIndex(int groupIndex, int itemIndex)\r
+{\r
+ if(__pCalllogGroupList != null)\r
+ {\r
+ GroupItemClass* pGroupInfo = null;\r
+ ArrayList* list = null;\r
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(groupIndex));\r
+ if(pGroupInfo != null)\r
+ {\r
+ list = pGroupInfo->GetLogData();\r
+ list->RemoveAt(itemIndex,true);\r
+ }\r
+ }\r
+}\r
+\r
+bool\r
+CallLogManager::GetCurrentDateTime(DateTime& dt)\r
+{\r
+ DateTime dtNow;\r
+ LocaleManager localManager;\r
+ result r = E_FAILURE;\r
+ TimeZone tz;\r
+\r
+ r = SystemTime::GetCurrentTime(UTC_TIME, dtNow);\r
+ if (IsFailed(r))\r
+ {\r
+ return false;\r
+ }\r
+ localManager.Construct();\r
+ tz = localManager.GetSystemTimeZone();\r
+ dt = tz.UtcTimeToWallTime(dtNow);\r
+\r
+ return true;\r
+}\r
+
+void
+CallLogManager::ResetAndNotifyCalllogData(void)
+{
+ __bDbDirty = true;
+ IEnumeratorT<ICalllogChangeListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pCalllogChangeListerners != null)
+ {
+ pListenerEnum = __pCalllogChangeListerners->GetEnumeratorN();
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ICalllogChangeListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ pListener->OnCalllogChanged();
+
+ }
+ }
+
+}
+
+void
+CallLogManager::UpdateCallLogList()
+{
+ DeleteAllCallLogCacheEntries();\r
+ if(__pCalllogDBIds != null)
+ {
+ __pCalllogDBIds->RemoveAll();
+ delete __pCalllogDBIds;
+ __pCalllogDBIds = null;
+ }
+
+ __pCalllogGroupList = new (std::nothrow) ArrayList();\r
+ __pCalllogGroupList->Construct();\r
+ __pCalllogDBIds = new (std::nothrow) HashMapT<int,int>;
+ __pCalllogDBIds->Construct(100);
+ GetAllCallogDataFromDatabseCB();
+ SortCalllogList();
+ __bDbDirty = false;
+}
+
+
+
+IListT<CallLogDetails>*
+CallLogManager::GetCalllogListByNumValues(void)
+{
+ if(__pCalllogListByNumber != null)
+ {
+ return __pCalllogListByNumber->GetItemsN(0, __pCalllogListByNumber->GetCount());
+ }
+ return null;
+}
+
+bool
+CallLogManager::GetCallogListByNumberFromDatabaseCB(char* number)
+{
+
+ contacts_filter_h filter=NULL;
+ contacts_list_h list=NULL;
+ contacts_query_h query = NULL;
+ unsigned int count = 0;
+ int ret = 0;
+
+ contacts_filter_create(_contacts_phone_log._uri,&filter);
+ contacts_filter_add_str(filter,_contacts_phone_log.address,CONTACTS_MATCH_EXACTLY,number);
+ contacts_query_create(_contacts_phone_log._uri,&query);
+ contacts_query_set_filter(query,filter);
+
+ ret = contacts_db_get_records_with_query(query,0,0,&list);
+ if (ret != 0)
+ {
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+ return false;
+ }
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+
+
+ contacts_list_get_count(list,&count);
+ contacts_list_first(list);
+ for(unsigned int i=0;i<count;i++)
+ {
+ CallLogDetails* calllogInfo = new CallLogDetails();
+ contacts_record_h getrec=0;
+ result ret = contacts_list_get_current_record_p(list,&getrec);
+ if(ret == 0)
+ {
+ contacts_phone_log_type_e logType=CONTACTS_PLOG_TYPE_NONE;
+ contacts_record_get_int(getrec,_contacts_phone_log.log_type,(int*)&logType);
+ if(logType != CONTACTS_PLOG_TYPE_EMAIL_RECEIVED && logType !=CONTACTS_PLOG_TYPE_EMAIL_SENT)
+ {
+ CopyDataToCallLogDetails(calllogInfo, getrec);
+ __pCalllogListByNumber->InsertAt(*calllogInfo, 0);\r
+ }
+
+ }
+
+ delete calllogInfo;
+ ret = contacts_list_next(list);
+ if (ret != 0)
+ {
+ continue;
+ }
+ contacts_record_destroy(getrec,true);
+ }
+
+ return true;
+}
+
+Tizen::Base::Collection::ArrayListT<CallLogDetails>*
+CallLogManager::GetCallogListByNumberFromDatabaseN(char* number)
+{
+ __pCalllogListByNumber = new (std::nothrow) Tizen::Base::Collection::ArrayListT<CallLogDetails>();
+ __pCalllogListByNumber->Construct(100);
+ if(__pNumber != null)
+ {
+ delete __pNumber;
+ }
+ int len = strlen(number) + 1;
+ __pNumber = new (std::nothrow) char[len];
+ strcpy(__pNumber,number);
+
+ GetCallogListByNumberFromDatabaseCB(number);
+
+ if (__pCalllogListByNumber->GetCount() > 0)
+ {
+ SortCalllogListByNumber();\r
+ return __pCalllogListByNumber;
+ }
+ delete __pCalllogListByNumber;
+ __pCalllogListByNumber = null;
+ return null;
+}
+
+HashMapT<int, CallLogDetails>*
+CallLogManager::GetCallogListByUnknownNumberFromDatabaseN(char* number)
+{
+ //Used to fetch list of call from unknown numbers from logs.
+ __pCalllogUnkownListByNumber = new (std::nothrow) HashMapT<int, CallLogDetails>();
+ __pCalllogUnkownListByNumber->Construct(100);
+ if(__pNumber != null)
+ {
+ delete __pNumber;
+ }
+ int len = strlen(number) + 1;
+ __pNumber = new (std::nothrow) char[len];
+ strcpy(__pNumber,number);
+
+ GetCallogListByNumberFromDatabaseCB(number);
+ if (__pCalllogUnkownListByNumber->GetCount() > 0)
+ {
+ return __pCalllogUnkownListByNumber;
+ }
+ delete __pCalllogUnkownListByNumber;
+ __pCalllogUnkownListByNumber = null;
+ return null;
+}
+
+void
+CallLogManager::DeleteCalllogByDbId(int dbId)
+{
+ contacts_db_delete_record(_contacts_phone_log._uri,dbId);
+}
+
+void
+CallLogManager::DeleteAllCalllog(void)
+{
+ if(__pCalllogGroupList != null)\r
+ {\r
+ ArrayList* pCalllogList = null;\r
+ GroupItemClass* pGroupInfo = null;\r
+ CallLogDetails* pLatestCallLog;\r
+ int count =0;\r
+
+ for(int index = 0; index < __pCalllogGroupList->GetCount(); index++)\r
+ {\r
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(index));\r
+
+ if(pGroupInfo != null)\r
+ {\r
+ pCalllogList = pGroupInfo->GetLogData();\r
+ if(pCalllogList != null)\r
+ {\r
+ count = pCalllogList->GetCount();\r
+ for(int i=0; i< count; i++)\r
+ {\r
+ pLatestCallLog = static_cast<CallLogDetails*>(pCalllogList->GetAt(i));\r
+ contacts_db_delete_record(_contacts_phone_log._uri,pLatestCallLog->GetCalllogDbId());\r
+ }\r
+ pCalllogList->RemoveAll();\r
+ delete pCalllogList;\r
+ pCalllogList = null;\r
+ }\r
+ delete pGroupInfo;\r
+ pGroupInfo = null;\r
+ }\r
+ }
+ __pCalllogGroupList->RemoveAll();\r
+ delete __pCalllogGroupList;\r
+ __pCalllogGroupList = null;\r
+ }
+\r
+ contacts_phone_log_reset_statistics();\r
+ AppLogDebug("Exit");
+}
+
+int
+CallLogManager::GetAllCallLogCount(void)\r
+{
+ int calLogCount = 0;\r
+ contacts_filter_h filter=NULL;
+ contacts_query_h query = NULL;
+ int ret = 0;
+
+ contacts_filter_create(_contacts_phone_log._uri,&filter);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_INCOMMING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_OUTGOING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_INCOMMING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_OUTGOING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_INCOMMING_UNSEEN);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_INCOMMING_SEEN);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_REJECT);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_REJECT);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VOICE_BLOCKED);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_VIDEO_BLOCKED);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_MMS_INCOMMING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_MMS_OUTGOING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_SMS_INCOMMING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_SMS_OUTGOING);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_SMS_BLOCKED);
+ contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
+
+ contacts_filter_add_int(filter,_contacts_phone_log.log_type, CONTACTS_MATCH_EQUAL, CONTACTS_PLOG_TYPE_MMS_BLOCKED);
+
+ contacts_query_create(_contacts_phone_log._uri,&query);
+ contacts_query_set_filter(query,filter);
+
+ ret = contacts_db_get_count_with_query(query,&calLogCount);
+ if(ret != CONTACTS_ERROR_NONE)
+ {
+ AppLogDebug("contacts_db_get_count_with_query failed %d",ret);
+ }
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+
+ AppLogDebug("contacts_db_get_count_with_query %d",calLogCount);\r
+ return calLogCount;\r
+}\r
+\r
+int\r
+CallLogManager::GetCallLogsViewedCount()\r
+{
+ AppLogDebug("%d",__callLogsViewedCount);\r
+ return __callLogsViewedCount;\r
+}
+
+int
+CallLogManager::GetCalllogCountByNumber(void)
+{
+ if(__pCalllogListByNumber != null)
+ {
+ return __pCalllogListByNumber->GetCount();
+ }
+ return 0;
+}
+
+void
+CallLogManager::SortCalllogList(void)
+{
+ LogGroupListComparer grpCmparer;
+ LogListComparer cmp;
+ if(__pCalllogGroupList != null)
+ {
+ __pCalllogGroupList->Sort(grpCmparer);
+ ArrayList* pCalllogList = null;
+ GroupItemClass* pGroupInfo = null;
+ for(int index = 0; index < __pCalllogGroupList->GetCount(); index++)
+ {
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(index));
+ if(pGroupInfo != null)
+ {
+ pCalllogList = pGroupInfo->GetLogData();
+ if(pCalllogList != null)
+ {
+ pCalllogList->Sort(cmp);
+ }
+
+ }
+ }
+
+ }
+\r
+}
+
+void
+CallLogManager::SortCalllogListByNumber(void)
+{
+ LogListByNumberComparer cmp;
+ __pCalllogListByNumber->Sort(cmp);
+}
+
+String*
+CallLogManager::GetLatestCallLogFromDbN(void)
+{
+ String* latestNumber = null;
+ bool found = false;
+ if(__bDbDirty == true)
+ {
+ AppLogDebug("__bDbDirty == true");
+ UpdateCallLogList();
+ }
+ if (__pCalllogGroupList != null)\r
+ {
+ GroupItemClass* pGroupInfo;\r
+ CallLogDetails* pLatestCallLog;\r
+ ArrayList* callLogList;\r
+ int groupCount = __pCalllogGroupList->GetCount();\r
+ int count;\r
+ for(int index = 0; index < groupCount; index++)\r
+ {
+ found = false;
+ pGroupInfo = static_cast<GroupItemClass*>(__pCalllogGroupList->GetAt(index));\r
+ callLogList = pGroupInfo->GetLogData();\r
+ count = callLogList->GetCount();\r
+ for(int i = 0; i < count; i++)\r
+ {
+ pLatestCallLog = static_cast<CallLogDetails*>(callLogList->GetAt(i));
+ if(pLatestCallLog->GetPhoneNumber() == null)
+ {
+ continue;
+ }
+ if(!(IsVoiceCall(pLatestCallLog)))
+ {
+ continue;
+ }\r
+ latestNumber = new String(pLatestCallLog->GetPhoneNumber());\r
+ if(CheckNumberIsValid(*latestNumber))
+ {
+ found = true;
+ break;
+ }
+ else
+ {
+ latestNumber = null;
+ }
+ }
+ if(found == true)
+ {
+ break;
+ }
+ }
+ }
+
+ return latestNumber;
+}
+
+bool
+CallLogManager::IsVoiceCall(CallLogDetails* pLatestCallLog)
+{
+ contacts_record_h record;
+
+ Tizen::Base::Collection::ArrayList* dbIds = pLatestCallLog->GetCallLogDbIds();
+ if(dbIds == null)
+ {
+ switch(pLatestCallLog->GetCalllogType())
+ {
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ case CALL_LOG_TYPE_VOICE_MISSED_UNSEEN:
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ {
+ return true;
+ }
+ break;
+
+ default:
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ int dbIdCount = dbIds->GetCount();
+ for(int index = 0; index < dbIdCount; ++index)
+ {
+ Integer* in = (Integer*)dbIds->GetAt(index);
+ int recordId = in->ToInt();
+ int res = contacts_db_get_record(_contacts_phone_log._uri, recordId, &record);
+ if(res == CONTACTS_ERROR_NONE)
+ {
+ contacts_phone_log_type_e logType = CONTACTS_PLOG_TYPE_NONE;
+ contacts_record_get_int(record,_contacts_phone_log.log_type,(int*)&logType);
+
+ switch(logType)
+ {
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING:
+ case CONTACTS_PLOG_TYPE_VOICE_OUTGOING:
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN:
+ case CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN:
+ case CONTACTS_PLOG_TYPE_VOICE_REJECT:
+ case CONTACTS_PLOG_TYPE_VOICE_BLOCKED:
+ {
+ return true;
+ }
+ break;
+
+ default:
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+bool
+CallLogManager::CheckNumberIsValid(String phoneNumber)
+{
+ //Pattern to compare all characters except 0-9 * # P ; , +
+ String phoneNumberPattern(L"[^0-9*#P,p+;]");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(phoneNumber,false);
+ //return false for patterns other than 0-9 * # P ; , +
+ if(resultMatch == true)
+ {
+ //return phone number is invalid
+ return false;
+ }
+
+ return true;
+
+}
+
+ArrayList* CallLogManager::GetCallLogGroups()\r
+{
+ return __pCalllogGroupList;\r
+}
+
+void CallLogManager::AddCalllogChangeListener(ICalllogChangeListener& listner )
+{
+ if(!__pCalllogChangeListerners->Contains(&listner))
+ __pCalllogChangeListerners->Add(&listner);
+
+}
+
+void CallLogManager::RemoveCalllogChangeListner(ICalllogChangeListener& listner)
+{
+ __pCalllogChangeListerners->Remove(&listner);
+}
+
+void CallLogManager::GetCalllogContactName(String number,String& name)
+{
+
+ ByteBuffer* pByteBuffer;
+ char * charname=NULL;
+ pByteBuffer = StringUtil::StringToUtf8N(number);
+
+ contacts_filter_h filter=NULL;
+ contacts_list_h list=NULL;
+ contacts_query_h query = NULL;
+ unsigned int count = 0;
+
+ if(number.Contains(L"@"))
+ {
+ contacts_filter_create(_contacts_contact_email._uri,&filter);
+ contacts_filter_add_str(filter,_contacts_contact_email.email,CONTACTS_MATCH_EXACTLY,(const char*)pByteBuffer->GetPointer());
+ contacts_query_create(_contacts_contact_email._uri,&query);
+ contacts_query_set_filter(query,filter);
+ }
+ else
+ {
+ contacts_filter_create(_contacts_contact_number._uri,&filter);
+ contacts_filter_add_str(filter,_contacts_contact_number.number,CONTACTS_MATCH_EXACTLY,(const char*)pByteBuffer->GetPointer());
+ contacts_query_create(_contacts_contact_number._uri,&query);
+ contacts_query_set_filter(query,filter);
+ }
+
+ int ret = contacts_db_get_records_with_query(query,0,0,&list);
+ if (ret != 0)
+ {
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+ return ;
+ }
+
+ contacts_filter_destroy(filter);
+ contacts_query_destroy(query);
+
+
+ contacts_list_get_count(list,&count);
+ AppLogDebug("%d",count);
+ if(count > 0)
+ {
+ contacts_record_h getrec=0;
+ contacts_list_first(list);
+ contacts_list_get_current_record_p(list,&getrec);
+
+ contacts_record_get_str(getrec,_contacts_contact_number.display_name,&charname);
+ AppLogDebug("%s",charname);
+ if(charname)
+ {
+ String buffer(charname);
+ name.Clear();
+ name.Append(buffer);
+
+ }
+ contacts_record_destroy(getrec,true);
+ }
+ delete pByteBuffer;
+}
+
+void CallLogManager::ContactsDbchangedcb(const char* view_uri, void* user_data)
+{
+ AppLogDebug("Enter");
+ CallLogManager* pCallLogMgr = (CallLogManager*) user_data;
+ if(pCallLogMgr == null || view_uri == null)
+ {
+ AppLogDebug("return");
+ return;
+ }
+
+ if(String(view_uri).Equals(String(_contacts_phone_log._uri)) == true)
+ {
+ pCallLogMgr->ResetAndNotifyCalllogData();
+ }
+}
+
+void
+CallLogManager::UpDateMissedCallSeenStatus(CallLogDetails* pDetails)
+{
+ contacts_record_h record;
+ int res = contacts_db_get_record(_contacts_phone_log._uri, pDetails->GetCalllogDbId(), &record);
+ if(res == CONTACTS_ERROR_NONE)
+ {
+ if(pDetails->GetCalllogType() == CALL_LOG_TYPE_VOICE_MISSED_UNSEEN)
+ {
+ contacts_record_set_int(record,_contacts_phone_log.log_type,CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN);
+ pDetails->SetCalllogType(CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN);
+ res = contacts_db_update_record(record);
+ AppLogDebug("contacts_db_update_record %d",res);
+ }
+ }
+}\r
+
+void\r
+CallLogManager::setCallLogViewbyID(CallLogType id)\r
+{\r
+ __callLogViewbyID = id;\r
+}\r
+
+CallLogType\r
+CallLogManager::getCallLogViewbyID()\r
+{\r
+ return __callLogViewbyID;\r
+}
+
+
+bool
+CallLogManager::GetDirtyFlag(void)
+{
+ return __bDbDirty;
+}
+
+\r
+contacts_phone_log_type_e\r
+CallLogManager::GetCallLogType(CallLogType type)\r
+{\r
+ contacts_phone_log_type_e callLogType = CONTACTS_PLOG_TYPE_MAX;\r
+ switch (type)\r
+ {\r
+ case CALL_LOG_TYPE_VOICE_INCOMING:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING;\r
+ break;\r
+\r
+ case CALL_LOG_TYPE_VOICE_OUTGOING:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_OUTGOING;\r
+ break;\r
+\r
+ case CALL_LOG_TYPE_VOICE_MISSED:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING_SEEN;\r
+ break;\r
+\r
+ case CALL_LOG_TYPE_VOICE_MISSED_UNSEEN:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN;\r
+ break;\r
+\r
+ case CALL_LOG_TYPE_VOICE_REJECTED:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_REJECT;\r
+ break;\r
+\r
+ case CALL_LOG_TYPE_VOICE_BLOCKED:\r
+ callLogType = CONTACTS_PLOG_TYPE_VOICE_BLOCKED;\r
+ break;\r
+\r
+ default:\r
+ break;\r
+ }\r
+\r
+ return callLogType;\r
+}
+
+\r
+\r
+GroupItemClass::GroupItemClass()\r
+{\r
+ __pData = null;\r
+}\r
+\r
+GroupItemClass::~GroupItemClass()\r
+{
+\r
+/* if(__pData)\r
+ {
+ delete __pData;\r
+ }*/\r
+}\r
+\r
+void\r
+GroupItemClass::SetTitleText(String titleText)\r
+{\r
+ __titleText = titleText;\r
+}\r
+\r
+void\r
+GroupItemClass::SetLogData(ArrayList* pData)\r
+{\r
+ __pData = pData;\r
+}\r
+\r
+String\r
+GroupItemClass::GetTitleText(void)\r
+{\r
+ return __titleText;\r
+}\r
+\r
+ArrayList*\r
+GroupItemClass::GetLogData(void)\r
+{\r
+ return __pData;\r
+}\r
+\r
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CommonUtils.cpp
+ * @brief commonly used functions
+ */
+
+#include <FApp.h>
+#include <FMedia.h>
+#include <FGraphics.h>
+#include "PhnAppUtility.h"
+#include "PhnCommonUtils.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Base::Collection;
+
+const int ID_NAME_STRING = 100;
+const int ID_NUMBER_STRING = 101;
+const int ID_TIME_STRING = 102;
+const int ID_CONTACT_BITMAP = 103;
+const int ID_CALLTYPE_BITMAP = 104;
+const int ID_NAME_STRING_COUNTER = 105;
+const int ID_LOGCALL_BITMAP = 50;
+const int ID_NAME_STRING_FONT_SIZE = 44;
+static const int X_LIST_DISPNAME = 26;
+static const int Y_LIST_DISPNAME = 22;
+static const int X_LIST_NUMBER = 26;
+static const int Y_LIST_NUMBER = 76;//22+54;
+
+const int X_TEXT_LINE1_ITEM = 16;
+const int Y_TEXT_LINE1_ITEM = 10;
+const int H_TEXT_LINE1_ITEM = 60;
+const int W_TEXT_LINE1_ITEM = 560;
+const int W_TEXT_LINE1_ITEM_RIGHT_MARGIN = 170;
+const int W_TEXT_LINE1_ITEM_COUNTER = 80;
+
+const int X_TEXT_LINE2_ITEM = 64;
+const int Y_TEXT_LINE2_ITEM = 70;
+const int H_TEXT_LINE2_ITEM = 48;
+const int W_TEXT_LINE2_ITEM = 256;
+const int W_TEXT_LINE2_ITEM_RIGHT_MARGIN = 230;
+const int W_TEXT_LINE2_ITEM_RIGHT_MARGIN_DELETE = 96;
+
+const int X_TEXT_TIME_ITEM = 440;
+const int Y_TEXT_TIME_ITEM = 70;
+const int H_TEXT_TIME_ITEM = 48;
+const int W_TEXT_TIME_ITEM = 256;
+const int X_TEXT_TIME_ITEM_RIGHT_MARGIN = 280;
+
+const int X_CONTACT_BITMAP_ITEM = 592;
+const int Y_CONTACT_BITMAP_ITEM = 0;
+const int H_CONTACT_BITMAP_ITEM = 177;
+const int W_CONTACT_BITMAP_ITEM = 177;
+
+const int X_CALLTYPE_BITMAP_ITEM = 16;
+const int Y_CALLTYPE_BITMAP_ITEM = 70 + 8;
+const int H_CALLTYPE_BITMAP_ITEM = 32;
+const int W_CALLTYPE_BITMAP_ITEM = 32;
+
+//New Keypad Button Images for numbers
+const int X_DIALER_BTN_IMG = 0;
+const int Y_DIALER_BTN_IMG = 10;
+
+//Call Patch Coordinates
+const int X_CALL_PATCH = 36;
+const int Y_CALL_PATCH = 18;
+const int W_CALL_PATCH = 444;
+const int H_CALL_PATCH = 104;
+
+//Clear Button Patch Coordinates
+const int X_CLEAR_PATCH = 0;
+const int Y_CLEAR_PATCH = 18;
+const int W_CLEAR_PATCH = 180;
+const int H_CLEAR_PATCH = 104;
+
+const int X_LOGCALL_BITMAP_ITEM = 660;
+const int Y_LOGCALL_BITMAP_ITEM = 10;
+const int W_LOGCALL_BITMAP_ITEM = 38;
+const int H_LOGCALL_BITMAP_ITEM = 38;
+const int X_LOGCALL_BITMAP_RIGHT_MARGIN = 60;
+
+const int X_DIALER_BTN_TXT = 13;
+const int W_DIALER_BTN_NUM_TXT = 77;
+const int W_DIALER_BTN_ALPHA_TXT = 121;
+
+const int W_ENRICHED_TEXT = 190;
+const int X_ENRICHED_TEXT = 143;
+const int IDI_RIGHT_MARGIN_USE_CONTACT_BTN = 160;
+const int H_USE_CONTACT_BTN = 60;
+
+Font*
+DialUtil::GetTextFontN(int textFontStyle)
+{
+ Font* font = new (std::nothrow) Font();
+
+ switch (textFontStyle)
+ {
+ case FONT_CALLING_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 94);
+ }
+ break;
+
+ case FONT_SEARCH_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 36);
+ }
+ break;
+
+ case FONT_KEYPAD_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 116);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 28);
+ }
+ break;
+
+ case FONT_KEYPAD_P:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 28);
+ }
+ break;
+
+ case FONT_KEYPAD_PLUS:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 40);
+ }
+ break;
+
+ case FONT_KEYPAD_CANCEL:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 34);
+ }
+ break;
+
+ case FONT_SUGGESTION_NAME:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 44);
+ }
+ break;
+
+ case FONT_SUGGESTION_MOBILE:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 35);
+ }
+ break;
+
+ case FONT_SUGGESTION_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 32);
+ }
+ break;
+
+ case FONT_SUGGESTION_LIST_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 40);
+ }
+ break;
+ case FONT_EXPAND_BUTTON_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 30);
+ }
+ break;
+ case FONT_SPEEDDIAL_BTN_NUMBER:
+ {
+ font->Construct(FONT_STYLE_BOLD, 86);
+ }
+ break;
+ }
+ return font;
+}
+
+Color*
+DialUtil::GetTextColorN(int textColor, int buttonStatus)
+{
+ Color* color = new (std::nothrow) Color();
+
+ if (buttonStatus == BUTTON_STATUS_PRESSED)
+ {
+ //color->SetColorComponents(249, 249, 249);
+ color->SetColorComponents(145, 135, 114);
+ return color;
+ }
+
+ switch (textColor)
+ {
+ case FONT_CALLING_TEXT:
+ {
+ color->SetColorComponents(0, 0, 0);
+ }
+ break;
+
+ case FONT_SEARCH_TEXT:
+ {
+ color->SetColorComponents(156, 159, 162);
+ }
+ break;
+
+ case FONT_SPEEDDIAL_BTN_NUMBER:
+ case FONT_KEYPAD_NUMBER:
+ {
+ color->SetColorComponents(255, 255, 255);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ case FONT_KEYPAD_P:
+ case FONT_KEYPAD_PLUS:
+ {
+ color->SetColorComponents(145, 135, 114);
+ }
+ break;
+
+ case FONT_KEYPAD_CANCEL:
+ {
+ color->SetColorComponents(255, 255, 255);
+ }
+ break;
+
+ case FONT_SUGGESTION_NAME:
+ {
+ color->SetColorComponents(0, 0, 0);
+ }
+ break;
+
+ case FONT_SUGGESTION_MOBILE:
+ {
+ color->SetColorComponents(153, 153, 153);
+ }
+ break;
+
+ case FONT_HIGHLIGHT_SEARCH_KEYWORD:
+ {
+ color->SetColorComponents(59, 115, 182);
+ }
+ break;
+ case FONT_SUGGESTION_NUMBER:
+ {
+ color->SetColorComponents(153, 153, 153);
+ }
+ break;
+
+ case FONT_SUGGESTION_LIST_NUMBER:
+ {
+ color->SetColorComponents(50, 50, 50);
+ }
+ break;
+ case FONT_EXPAND_BUTTON_TEXT:
+ {
+ color->SetColorComponents(50, 50, 50);
+ }
+ break;
+ }
+ return color;
+}
+
+bool
+DialUtil::IsNumericString(Tizen::Base::String& keyWord)
+{
+ bool isDigit = false;
+ String digitStr(L"");
+ if(keyWord.SubString(0,1,digitStr) == E_SUCCESS)
+ {
+ int digit;
+ if(Integer::Parse(digitStr,digit) == E_SUCCESS)
+ {
+ isDigit = true;
+ }
+ }
+ return isDigit;
+}
+void
+DialUtil::DrawBitmapToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg)
+{
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+ if(pBitmap != null)
+ {
+ pCanvas.DrawBitmap(pCanvas.GetBounds(),*pBitmap);
+ delete pBitmap;
+ }
+}
+
+void
+DialUtil::DrawClear9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg)
+{
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas.DrawNinePatchedBitmap(Rectangle(X_CLEAR_PATCH,Y_CLEAR_PATCH,W_CLEAR_PATCH,H_CLEAR_PATCH), *pBitmap);
+ }
+ pCanvas.DrawBitmap(Rectangle(X_CLEAR_PATCH,Y_CLEAR_PATCH, W_CLEAR_PATCH, H_CLEAR_PATCH), *pBitmap);
+ delete pBitmap;
+
+}
+
+void
+DialUtil::DrawCall9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg)
+{
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas.DrawNinePatchedBitmap(Rectangle(X_CALL_PATCH,Y_CALL_PATCH,W_CALL_PATCH,H_CALL_PATCH), *pBitmap);
+ }
+ pCanvas.DrawBitmap(Rectangle(X_CALL_PATCH,Y_CALL_PATCH, W_CALL_PATCH, H_CALL_PATCH), *pBitmap);
+ delete pBitmap;
+
+}
+
+void
+DialUtil::Draw9PatchToCanvas(Canvas& pCanvas, const String& bgImg)
+{
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+
+ pBitmap->GetWidth();
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas.DrawNinePatchedBitmap(pCanvas.GetBounds(), *pBitmap);
+ }
+ else
+ {
+ pCanvas.DrawBitmap(pCanvas.GetBounds(),*pBitmap);
+ }
+ delete pBitmap;
+
+ return;
+}
+
+
+void
+DialUtil::DrawKeypadImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos)
+{
+ //create and scale bitmap
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(image, imageDimention.width, imageDimention.height);
+ //Find position to draw bitmap
+ Point bitmapPos(0, 0);
+
+ switch(pos)
+ {
+ case POSITION_TOP_CENTER:
+ {
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2,Y_DIALER_BTN_IMG);
+ }
+ break;
+ case POSITION_BOTTOM_CENTER:
+ {
+ //bitmapPos.SetPosition(X_DIALER_BTN_IMG,Y_DIALER_BTN_IMG);
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2, 20 + pCanvas.GetBounds().height / 2 + (pCanvas.GetBounds().height / 2 - pBitmap->GetHeight()) / 2);
+ }
+ break;
+ }
+
+ pCanvas.DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ return;
+
+}
+
+
+
+
+void
+DialUtil::DrawImageToCanvas(const String& image, Dimension imageDimention, Canvas& pCanvas, int pos)
+{
+ //create and scale bitmap
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(image, imageDimention.width, imageDimention.height);
+
+ //Find position to draw bitmap
+ Point bitmapPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ bitmapPos.SetPosition(X_DIALER_BTN_TXT + (W_DIALER_BTN_NUM_TXT - pBitmap->GetWidth()) / 2, (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ bitmapPos.SetPosition(X_DIALER_BTN_TXT + W_DIALER_BTN_NUM_TXT + ((W_DIALER_BTN_ALPHA_TXT - pBitmap->GetWidth()) / 2), (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2, (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_BOTTOM_CENTER:
+ {
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2, pCanvas.GetBounds().height / 2 + (pCanvas.GetBounds().height / 2 - pBitmap->GetHeight()) / 2);
+ }
+ break;
+ }
+
+ //draw bitmap
+ pCanvas.DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ return;
+}
+
+void
+DialUtil::DrawKeypadTextToCanvas(const String& buttonText, int textFontStyle, Canvas& pCanvas, int pos, int buttonStatus)
+{
+ AppLogDebug("ENTER");
+ if (buttonText == null)
+ {
+ return;
+ }
+
+ //get text font
+ Font* font = GetTextFontN(textFontStyle);
+
+ //get text color
+ Color* textColor = GetTextColorN(textFontStyle, buttonStatus);
+
+ //create text element
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(buttonText);
+ pTextElement->SetTextColor(*textColor);
+ pTextElement->SetFont(*font);
+ delete textColor;
+
+ //get dimensions of the text
+ FloatDimension textDimension;
+ font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension);
+ if(textFontStyle != FONT_KEYPAD_NUMBER)
+ {
+ textDimension.height += font->GetDescender();
+ }
+
+ //create enriched text
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+
+ //set the position of the text in canvas
+ Point textPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_BOTTOM_CENTER:
+ {
+ textPos.SetPosition(((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2),
+ 20 + pCanvas.GetBounds().height / 2
+ + ((pCanvas.GetBounds().height / 2
+ - pEnrichedText->GetHeight()) / 2));
+ }
+ break;
+ }
+
+ //Draw EnrichedText to canvas
+ pCanvas.DrawText(textPos, *pEnrichedText);
+
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ delete font;
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialUtil::DrawTextToCanvas(const String& buttonText, int textFontStyle, Canvas& pCanvas, int pos, int buttonStatus)
+{
+ if (buttonText == null)
+ {
+ return;
+ }
+
+ //get text font
+ Font* font = GetTextFontN(textFontStyle);
+
+ //get text color
+ Color* textColor = GetTextColorN(textFontStyle, buttonStatus);
+
+ //create text element
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(buttonText);
+ pTextElement->SetTextColor(*textColor);
+ pTextElement->SetFont(*font);
+ delete textColor;
+
+ //get dimensions of the text
+ FloatDimension textDimension;
+ font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension);
+ if(textFontStyle != FONT_KEYPAD_NUMBER)
+ {
+ textDimension.height += font->GetDescender();
+ }
+
+ //create enriched text
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+
+ //set the position of the text in canvas
+ Point textPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ //Margin 13, rectangle for left text (13,0,77, height of canvas), center aligned
+ textPos.SetPosition(X_DIALER_BTN_TXT + ((W_DIALER_BTN_NUM_TXT - pEnrichedText->GetWidth()) / 2), (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ //rectangle for right text (13+77,0, 121, height of canvas), center aligned
+ textPos.SetPosition(X_DIALER_BTN_TXT + W_DIALER_BTN_NUM_TXT + ((121 - pEnrichedText->GetWidth()) / 2), (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ //rectangle for image : entire canvas, center aligned
+ textPos.SetPosition((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2, (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_TOP_LEFT:
+ {
+ textPos.SetPosition(10, (pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_TOP_CENTER:
+ {
+ textPos.SetPosition((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2, (pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_BOTTOM_LEFT:
+ {
+ textPos.SetPosition(10, pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+ break;
+
+ case POSITION_BOTTOM_CENTER:
+ {
+ int width = pEnrichedText->GetWidth();
+ if(width > W_ENRICHED_TEXT)
+ {
+ textPos.SetPosition(X_ENRICHED_TEXT, pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+ else
+ {
+ textPos.SetPosition(10 + ((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2), pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+
+ }
+ break;
+ case POSITION_SUGGESTION_NAME:
+ {
+ textPos.SetPosition(X_LIST_DISPNAME,Y_LIST_DISPNAME);
+ }
+ break;
+ case POSITION_SUGGESTION_NUMBER:
+ {
+ textPos.SetPosition(X_LIST_NUMBER,Y_LIST_NUMBER);
+ }
+ break;
+ }
+
+
+ //Draw EnrichedText to canvas
+ pCanvas.DrawText(textPos, *pEnrichedText);
+
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ delete font;
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialUtil::DrawCanvasToButton(Canvas* pCanvasNormal, Canvas* pCanvasPressed, Button* pButton)
+{
+ Bitmap* pNormalBgBmp = new (std::nothrow) Bitmap();
+ pNormalBgBmp->Construct(*pCanvasNormal, pCanvasNormal->GetBounds());
+
+ pButton->SetNormalBackgroundBitmap(*pNormalBgBmp);
+
+ if (pCanvasPressed != null)
+ {
+ Bitmap* pPressedBgBmp = new (std::nothrow) Bitmap();
+ pPressedBgBmp->Construct(*pCanvasPressed, pCanvasPressed->GetBounds());
+ pButton->SetPressedBackgroundBitmap(*pPressedBgBmp);
+ delete pPressedBgBmp;
+ pPressedBgBmp = null;
+ }
+ else
+ {
+ pButton->SetPressedBackgroundBitmap(*pNormalBgBmp);
+ }
+
+ pButton->SetDisabledBitmap(Point(0, 0), *pNormalBgBmp);
+ pButton->Invalidate(true);
+ delete pNormalBgBmp;
+ pNormalBgBmp = null;
+
+ return;
+}
+
+String
+DialUtil::ConvertDialedNumberToString(int dialNumber)
+{
+ switch (dialNumber)
+ {
+ case NUM_KEY1:
+ {
+ return L"1";
+ }
+ case NUM_KEY2:
+ {
+ return L"2";
+ }
+ case NUM_KEY3:
+ {
+ return L"3";
+ }
+ case NUM_KEY4:
+ {
+ return L"4";
+ }
+ case NUM_KEY5:
+ {
+ return L"5";
+ }
+ case NUM_KEY6:
+ {
+ return L"6";
+ }
+ case NUM_KEY7:
+ {
+ return L"7";
+ }
+ case NUM_KEY8:
+ {
+ return L"8";
+ }
+ case NUM_KEY9:
+ {
+ return L"9";
+ }
+ break;
+ case NUM_KEY0:
+ {
+ return L"0";
+ }
+ break;
+ case HASH_KEY:
+ {
+ return L"#";
+ }
+ break;
+ case PAUSE_KEY:
+ {
+ return L";";
+ }
+ break;
+ case WAIT_KEY:
+ {
+ return L",";
+ }
+ break;
+ case STAR_KEY:
+ {
+ return L"*";
+ }
+ break;
+ case PLUS_KEY:
+ {
+ return L"+";
+ }
+ break;
+ }
+ return null;
+}
+
+IList*
+DialUtil::FetchPossibleNamesListN(const String& prevSearchStr, int nextDigit)
+{
+ //Fetch matching names for mapping char for digit, e.g. 2->ABC, 3->DEF.
+ ArrayList* pNamesList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pNamesList->Construct(8);
+
+ if(nextDigit >=2 && nextDigit <= 9)
+ {
+ switch(nextDigit)
+ {
+ case 2:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"a")));
+ pNamesList->Add((new String(prevSearchStr+L"b")));
+ pNamesList->Add((new String(prevSearchStr+L"c")));
+ pNamesList->Add((new String(prevSearchStr+L"A")));
+ pNamesList->Add((new String(prevSearchStr+L"B")));
+ pNamesList->Add((new String(prevSearchStr+L"C")));
+ }
+ break;
+
+ case 3:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"d")));
+ pNamesList->Add((new String(prevSearchStr+L"e")));
+ pNamesList->Add((new String(prevSearchStr+L"f")));
+ pNamesList->Add((new String(prevSearchStr+L"D")));
+ pNamesList->Add((new String(prevSearchStr+L"E")));
+ pNamesList->Add((new String(prevSearchStr+L"F")));
+ }
+ break;
+
+ case 4:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"g")));
+ pNamesList->Add((new String(prevSearchStr+L"h")));
+ pNamesList->Add((new String(prevSearchStr+L"i")));
+ pNamesList->Add((new String(prevSearchStr+L"G")));
+ pNamesList->Add((new String(prevSearchStr+L"H")));
+ pNamesList->Add((new String(prevSearchStr+L"I")));
+ }
+ break;
+
+ case 5:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"j")));
+ pNamesList->Add((new String(prevSearchStr+L"k")));
+ pNamesList->Add((new String(prevSearchStr+L"l")));
+ pNamesList->Add((new String(prevSearchStr+L"J")));
+ pNamesList->Add((new String(prevSearchStr+L"K")));
+ pNamesList->Add((new String(prevSearchStr+L"L")));
+ }
+ break;
+
+ case 6:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"m")));
+ pNamesList->Add((new String(prevSearchStr+L"n")));
+ pNamesList->Add((new String(prevSearchStr+L"o")));
+ pNamesList->Add((new String(prevSearchStr+L"M")));
+ pNamesList->Add((new String(prevSearchStr+L"N")));
+ pNamesList->Add((new String(prevSearchStr+L"O")));
+ }
+ break;
+
+ case 7:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"p")));
+ pNamesList->Add((new String(prevSearchStr+L"q")));
+ pNamesList->Add((new String(prevSearchStr+L"r")));
+ pNamesList->Add((new String(prevSearchStr+L"s")));
+ pNamesList->Add((new String(prevSearchStr+L"P")));
+ pNamesList->Add((new String(prevSearchStr+L"Q")));
+ pNamesList->Add((new String(prevSearchStr+L"R")));
+ pNamesList->Add((new String(prevSearchStr+L"S")));
+ }
+ break;
+
+ case 8:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"t")));
+ pNamesList->Add((new String(prevSearchStr+L"u")));
+ pNamesList->Add((new String(prevSearchStr+L"v")));
+ pNamesList->Add((new String(prevSearchStr+L"T")));
+ pNamesList->Add((new String(prevSearchStr+L"U")));
+ pNamesList->Add((new String(prevSearchStr+L"V")));
+ }
+ break;
+
+ case 9:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"w")));
+ pNamesList->Add((new String(prevSearchStr+L"x")));
+ pNamesList->Add((new String(prevSearchStr+L"y")));
+ pNamesList->Add((new String(prevSearchStr+L"z")));
+ pNamesList->Add((new String(prevSearchStr+L"W")));
+ pNamesList->Add((new String(prevSearchStr+L"X")));
+ pNamesList->Add((new String(prevSearchStr+L"Y")));
+ pNamesList->Add((new String(prevSearchStr+L"Z")));
+ }
+ break;
+
+ }
+ }
+ return pNamesList;
+}
+
+void
+DialUtil::ConvertNameToNumericKeys(String& subContactName, String& possibleKeysTyped)
+{
+ for(int charPos=0;charPos < subContactName.GetLength();charPos++)
+ {
+ wchar_t nextChar;
+ subContactName.GetCharAt(charPos,nextChar);
+ switch(nextChar)
+ {
+ case 'a':case 'A':
+ case 'b':case 'B':
+ case 'c':case 'C':
+ possibleKeysTyped.Append(2);
+ break;
+
+ case 'd':case 'D':
+ case 'e':case 'E':
+ case 'f':case 'F':
+ possibleKeysTyped.Append(3);
+ break;
+
+ case 'g':case 'G':
+ case 'h':case 'H':
+ case 'i':case 'I':
+ possibleKeysTyped.Append(4);
+ break;
+
+ case 'j':case 'J':
+ case 'k':case 'K':
+ case 'l':case 'L':
+ possibleKeysTyped.Append(5);
+ break;
+
+ case 'm':case 'M':
+ case 'n':case 'N':
+ case 'o':case 'O':
+ possibleKeysTyped.Append(6);
+ break;
+
+ case 'p':case 'P':
+ case 'q':case 'Q':
+ case 'r':case 'R':
+ case 's':case 'S':
+ possibleKeysTyped.Append(7);
+ break;
+
+ case 't':case 'T':
+ case 'u':case 'U':
+ case 'v':case 'V':
+ possibleKeysTyped.Append(8);
+ break;
+
+ case 'w':case 'W':
+ case 'x':case 'X':
+ case 'y':case 'Y':
+ case 'z':case 'Z':
+ possibleKeysTyped.Append(9);
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+EnrichedText*
+DialUtil::ConstructEnrichedTextN(String& text, String& matchedKeyword, int textFontStyle, Dimension txtDimension)
+{
+ //get text font
+ Font* fontName = DialUtil::GetTextFontN(textFontStyle);
+ //get text color
+ Color* textColor = DialUtil::GetTextColorN(textFontStyle, BUTTON_STATUS_NORMAL);
+ //highlighted text Color
+ Color* highlightedTxtColor = DialUtil::GetTextColorN(FONT_HIGHLIGHT_SEARCH_KEYWORD, BUTTON_STATUS_NORMAL);
+
+ EnrichedText* pEnrichedName = new (std::nothrow) EnrichedText();
+ pEnrichedName->Construct(txtDimension);
+ pEnrichedName->SetTextWrapStyle(TEXT_WRAP_NONE);
+ //Text is divided in 3 parts - pre-text, highlighted matchedKeyword, post-text.
+ String preTxt(L"");
+ String highlightTxt(L"");
+ String postTxt(L"");
+ if(matchedKeyword.IsEmpty() == false)
+ {
+ int searchIndex;
+ result r = text.IndexOf(matchedKeyword,0,searchIndex);
+ if(r == E_SUCCESS)
+ {
+ if(searchIndex > 0)
+ {
+ text.SubString(0,searchIndex,preTxt);
+ }
+ text.SubString(searchIndex, matchedKeyword.GetLength(),highlightTxt);
+ text.SubString((searchIndex + matchedKeyword.GetLength()),postTxt);
+ }
+ else
+ {
+ preTxt = text;
+ }
+ }
+
+ TextElement* pTextName = null;
+ if(preTxt.IsEmpty() == false)
+ {
+ //create text element
+ pTextName = new (std::nothrow) TextElement();
+ pTextName->Construct(preTxt);
+ pTextName->SetFont(*fontName);
+ pTextName->SetTextColor(*textColor);
+ //ownership of 'pTextName' transferred to 'pEnrichedName'
+ pEnrichedName->Add(*pTextName);
+ }
+
+ if(highlightTxt.IsEmpty() == false)
+ {
+ //create text element
+ pTextName = new (std::nothrow) TextElement();
+ pTextName->Construct(highlightTxt);
+ pTextName->SetFont(*fontName);
+ // Highlighted search text
+ pTextName->SetTextColor(*highlightedTxtColor);
+ pEnrichedName->Add(*pTextName);
+ }
+
+ if(postTxt.IsEmpty() == false)
+ {
+ //create text element
+ pTextName = new (std::nothrow) TextElement();
+ pTextName->Construct(postTxt);
+ pTextName->SetFont(*fontName);
+ pTextName->SetTextColor(*textColor);
+ pEnrichedName->Add(*pTextName);
+ }
+
+ delete fontName;
+ delete textColor;
+ delete highlightedTxtColor;
+
+ return pEnrichedName;
+}
+
+void
+DialUtil::DrawTextAndHighlightedKeywordToCanvas(String& buttonText, String& matchedKeyword, int textFontStyle, Canvas& pCanvas, int pos)
+{
+ if (buttonText == null)
+ {
+ return;
+ }
+
+ //Convert to enriched text with highlighted keyword
+ Dimension txtDimension (pCanvas.GetBounds().width - IDI_RIGHT_MARGIN_USE_CONTACT_BTN, H_USE_CONTACT_BTN);
+ EnrichedText* pEnrichedText = ConstructEnrichedTextN(buttonText, matchedKeyword, textFontStyle, txtDimension);
+
+ //set the position of the text in canvas
+ Point textPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_SUGGESTION_NAME:
+ {
+ textPos.SetPosition(X_LIST_DISPNAME,Y_LIST_DISPNAME);
+ }
+ break;
+
+ case POSITION_SUGGESTION_NUMBER:
+ {
+ textPos.SetPosition(X_LIST_NUMBER,Y_LIST_NUMBER);
+ }
+ break;
+ }
+
+ //Draw EnrichedText to canvas
+ pCanvas.DrawText(textPos, *pEnrichedText);
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+
+ AppLogDebug("EXIT");
+ return;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file DlAppForm.cpp
+ * @brief The Dial application form
+ */
+
+#include <FApp.h>
+#include "PhnCommonUtils.h"
+#include "PhnDialAppForm.h"
+#include "PhnPhoneApp.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+#include "PhnTabDialer.h"
+#include "PhnTabLogs.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+const int DialAppForm::ID_HEADER_DIALER = 101;
+const int DialAppForm::ID_HEADER_LOGS = 103;
+static const wchar_t* IDL_DIAL_FORM = L"IDL_DIAL_FORM";
+
+DialAppForm::DialAppForm(void)
+{
+}
+
+DialAppForm::~DialAppForm(void)
+{
+}
+
+bool
+DialAppForm::Initialize(void)
+{
+ Construct(IDL_DIAL_FORM);
+
+ return true;
+}
+
+result
+DialAppForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ Header* pHeader = GetHeader();
+ pHeader->SetTabEditModeEnabled(false);
+ pHeader->AddActionEventListener(*this);
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ SetFormMenuEventListener(this);
+ return r;
+}
+
+result
+DialAppForm::OnTerminating(void)
+{
+ SetFormBackEventListener(null);
+ return E_SUCCESS;
+}
+
+void
+DialAppForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ switch (actionId)
+ {
+ case ID_HEADER_DIALER:
+ {
+ pSceneManager->GoForward( ForwardSceneTransition(IDSCN_DIALER, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ pPhoneApp->SetInitialScene(IDSCN_DIALER);
+ }
+ break;
+
+ case ID_HEADER_LOGS:
+ {
+ pSceneManager->GoForward( ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ pPhoneApp->SetInitialScene(IDSCN_CALL_LOG);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+DialAppForm::OnFormBackRequested(Form& source)
+{
+ //if this is launched as normal application, then exit.
+ AppLog("Enter");
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ if(pSceneManager == null)
+ {
+ return;
+ }
+ DialTabDialer *tabDialer = null;
+ DialTabLogs *tabLogs = null;
+
+ if(pSceneManager->GetCurrentSceneId() == IDSCN_DIALER)
+ {
+ tabDialer = dynamic_cast<DialTabDialer*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if(tabDialer != null)
+ {
+ tabDialer->HandleFormBackRequest();
+ }
+ }
+ else if(pSceneManager->GetCurrentSceneId() == IDSCN_CALL_LOG)
+ {
+ tabLogs = dynamic_cast<DialTabLogs*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if(tabLogs != null)
+ {
+ tabLogs->HandleFormBackRequest();
+ }
+ }
+}
+
+void
+DialAppForm::OnFormMenuRequested(Controls::Form& source)
+{
+ AppLog("Enter");
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ if(pSceneManager == null)
+ {
+ return;
+ }
+ DialTabDialer *tabDialer = null;
+ DialTabLogs *tabLogs = null;
+
+ if(pSceneManager->GetCurrentSceneId() == IDSCN_DIALER)
+ {
+ AppLogDebug("GetCurrentSceneId() == IDSCN_DIALER");
+ tabDialer = dynamic_cast<DialTabDialer*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if(tabDialer != null)
+ {
+ tabDialer->ShowOptionsMenu();
+ }
+ }
+ else if(pSceneManager->GetCurrentSceneId() == IDSCN_CALL_LOG)
+ {
+ AppLogDebug("GetCurrentSceneId() == IDSCN_CALL_LOG");
+ tabLogs = dynamic_cast<DialTabLogs*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if(tabLogs != null)
+ {
+ tabLogs->ShowOptionsMenu();
+ }
+ }
+ AppLog("Exit");
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialContactInfo.cpp
+ * @brief Dial Contact Info class
+ */
+#include "PhnDialContactInfo.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Base::Collection;
+
+DialContactInfo::DialContactInfo(void) {
+ __pDisplayName = null;
+ __pPhoneNumber = null;
+ __pThumbnail = null;
+ __pSearchKeyList = null;
+ //By default, value is '0' - indicates it is not fetched from call logs
+ __callLogDbId = 0;
+}
+
+DialContactInfo*
+DialContactInfo::CloneN(void)
+{
+ //Used to create new 'DialContactInfo' object which is clone of 'this' object.
+ //We cant use Copy Contructor, since we will need 2-phase constructor in this case.
+
+ result r = E_SUCCESS;
+ DialContactInfo* cloneObj = new (std::nothrow) DialContactInfo();
+ cloneObj->__pDisplayName = new (std::nothrow) String(*this->__pDisplayName);
+ cloneObj->__pPhoneNumber = new (std::nothrow) String(*this->__pPhoneNumber);
+
+ //Thumbnail
+ if(this->__pThumbnail != null)
+ {
+ Bitmap& pSrcTn = *(this->__pThumbnail);
+ cloneObj->__pThumbnail = new (std::nothrow) Bitmap();
+ r = cloneObj->__pThumbnail->Construct( pSrcTn, Rectangle(0, 0, pSrcTn.GetWidth(), pSrcTn.GetHeight()));
+ }
+ TryCatch(r == E_SUCCESS,,"Object Cloning failed");
+
+ //list of search key.
+ if(this->__pSearchKeyList != null && this->__pSearchKeyList->GetCount() > 0)
+ {
+ cloneObj->__pSearchKeyList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ r = cloneObj->__pSearchKeyList->Construct();
+ TryCatch(r == E_SUCCESS,,"Object Cloning failed");
+
+ for (int index = 0; index < this->__pSearchKeyList->GetCount(); index++)
+ {
+ String* key = static_cast<String*>(this->__pSearchKeyList->GetAt(index));
+ r = cloneObj->__pSearchKeyList->Add(new (std::nothrow) String(*key));
+ TryCatch(r == E_SUCCESS,,"Object Cloning failed");
+ }
+ }
+
+ return cloneObj;
+ CATCH:
+ //failed
+ delete cloneObj;
+ cloneObj = null;
+ return cloneObj;
+}
+
+DialContactInfo::~DialContactInfo(void) {
+ if(__pDisplayName != null)
+ {
+ delete __pDisplayName;
+ }
+ if(__pPhoneNumber != null)
+ {
+ delete __pPhoneNumber;
+ }
+ if(__pSearchKeyList != null)
+ {
+ __pSearchKeyList->RemoveAll();
+ delete __pSearchKeyList;
+ }
+ if(__pThumbnail != null)
+ {
+ delete __pThumbnail;
+ }
+}
+
+bool
+DialContactInfo::Equals(const Object& obj) const
+{
+ DialContactInfo* objInfo = dynamic_cast<DialContactInfo*>(const_cast<Object*>(&obj));
+ if(objInfo != null && __recordID == objInfo->GetRecodrdId())
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ /*if(objInfo != null && __pPhoneNumber->Equals(objInfo->GetPhoneNumber()))
+ {
+ return true;
+ }
+ return false;*/
+
+
+}
+
+void
+DialContactInfo::AddSearchKey(String& pSearchString)
+{
+ if(__pSearchKeyList == null)
+ {
+ __pSearchKeyList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pSearchKeyList->Construct();
+ }
+ __pSearchKeyList->Add(new (std::nothrow) String(pSearchString));
+}
+
+void
+DialContactInfo::RemoveSearchKey(int index)
+{
+ if(__pSearchKeyList != null && index >= 0 && index < __pSearchKeyList->GetCount())
+ {
+ __pSearchKeyList->RemoveAt(index);
+ }
+}
+
+void
+DialContactInfo::ReplaceSearchKey(int index, String& pSearchString)
+{
+ if(__pSearchKeyList != null && (index >= 0 && index < __pSearchKeyList->GetCount()))
+ {
+ __pSearchKeyList->RemoveAt(index);
+ __pSearchKeyList->InsertAt(new String(pSearchString),index);
+ }
+}
+
+IList*
+DialContactInfo::GetSearchKeyList(void)
+{
+ return __pSearchKeyList;
+}
+
+String*
+DialContactInfo::GetSearchKey(void)
+{
+ if(__pSearchKeyList != null && __pSearchKeyList->GetCount() > 0)
+ {
+ return (static_cast<String*>(__pSearchKeyList->GetAt(0)));
+ }
+ return null;
+}
+
+void
+DialContactInfo::SetDisplayName(String& pDisplayName)
+{
+ if(__pDisplayName != null)
+ {
+ delete __pDisplayName;
+ }
+ __pDisplayName = new (std::nothrow) String(pDisplayName);
+}
+
+String&
+DialContactInfo::GetDisplayName(void) const
+{
+ return *__pDisplayName;
+}
+
+void
+DialContactInfo::SetPhoneNumber(String& pPhoneNumber)
+{
+ if(__pPhoneNumber != null)
+ {
+ delete __pPhoneNumber;
+ }
+ __pPhoneNumber = new (std::nothrow) String(pPhoneNumber);
+}
+
+String&
+DialContactInfo::GetPhoneNumber(void) const
+{
+ return *__pPhoneNumber;
+}
+
+void
+DialContactInfo::SetThumbnail(Bitmap* pBitmap)
+{
+ if(__pThumbnail != null)
+ {
+ delete __pThumbnail;
+ __pThumbnail = null;
+ }
+
+ if(pBitmap != null)
+ {
+ __pThumbnail = pBitmap;
+ __pThumbnail->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ __pThumbnail->Scale(Dimension(96, 96));
+ }
+}
+
+Bitmap*
+DialContactInfo::GetThumbnailN(void) const
+{
+ Bitmap* pThumbnail = null;
+ result r = E_FAILURE;
+ if(__pThumbnail != null)
+ {
+ pThumbnail = new (std::nothrow) Bitmap();
+ r = pThumbnail->Construct( *__pThumbnail, Rectangle(0, 0, __pThumbnail->GetWidth(),
+ __pThumbnail->GetHeight()));
+ TryCatch(r == E_SUCCESS,,"[%s] Thumbnail contruction failed", GetErrorMessage(r));
+ }
+ return pThumbnail;
+
+CATCH:
+ delete pThumbnail;
+ return null;
+}
+
+void
+DialContactInfo::SetCallLogDbId(int callLogDbId)
+{
+ __callLogDbId = callLogDbId;
+}
+
+int
+DialContactInfo::GetCallLogDbId(void)
+{
+ return __callLogDbId;
+}
+
+void
+DialContactInfo::SetRecordId(Tizen::Social::RecordId recordID)
+{
+ __recordID = recordID;
+}
+
+RecordId
+DialContactInfo::GetRecodrdId(void)
+{
+ return __recordID;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialPresentationModel.cpp
+ * @brief Dial presentation model class
+ */
+#include <FSocial.h>
+#include <FTelephony.h>
+#include "PhnAppUtility.h"
+#include "PhnCalllogManager.h"
+#include "PhnCommonUtils.h"
+#include "PhnDialContactInfo.h"
+#include "PhnDialPresentationModel.h"
+#include "PhnPhoneApp.h"
+#include "PhnSettingsManager.h"
+#include "PhnTabDialer.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Social;
+using namespace Tizen::Telephony;
+
+DialPresentationModel::DialPresentationModel(DialTabDialer& parentPanel) : __parentDialerPanel(parentPanel)
+{
+ AppLogDebug("ENTER");
+ __pNumberSuggestionList = null;
+ __pSearchString = null;
+ __pSettingsManager = null;
+ __pAsyncSearchTask = null;
+ __pSearchThread = null;
+ __mutex.Create();
+ AppLogDebug("EXIT");
+}
+
+DialPresentationModel::~DialPresentationModel()
+{
+ AppLogDebug("ENTER");
+ AppControl::StopAppControlResponseListener(this);
+ ClearSearchResults();
+ if (__pSearchThread != null)
+ {
+ AppLogDebug("__pSearchThread != null");
+ //Wait until the previous thread finished execution.
+ //otherwise "start_thread()" crashes.
+ __pSearchThread->Join();
+ delete __pSearchThread;
+ __pSearchThread = null;
+ delete __pAsyncSearchTask;
+ __pAsyncSearchTask = null;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+DialPresentationModel::ClearSearchResults(void)
+{
+ if(__pNumberSuggestionList != null)
+ {
+ __mutex.Acquire();
+ __pNumberSuggestionList->RemoveAll();
+ delete __pNumberSuggestionList;
+ __pNumberSuggestionList = null;
+ __mutex.Release();
+ }
+ if(__pSearchString != null)
+ {
+ delete __pSearchString;
+ __pSearchString = null;
+ }
+}
+
+bool
+DialPresentationModel::FetchSuggestionList(const String& searchString)
+{
+ bool newSearch = false;
+ if (__pSearchThread != null)
+ {
+ //Wait until the previous thread finished execution.
+ //otherwise "start_thread()" crashes.
+ __pSearchThread->Join();
+ delete __pSearchThread;
+ __pSearchThread = null;
+ delete __pAsyncSearchTask;
+ __pAsyncSearchTask = null;
+ }
+
+ result r = E_SUCCESS;
+ __pAsyncSearchTask = new (std::nothrow) RetrieveContactsListTask( *this);
+ //check if this search string is subset of previous search string
+ if(__pSearchString != null && searchString.StartsWith(*__pSearchString,0))
+ {
+ newSearch = false;
+ __pSearchString->Clear();
+ __pSearchString->Append(searchString);
+ __mutex.Acquire();
+ r = __pAsyncSearchTask->Construct(*__pSearchString, __pNumberSuggestionList);
+ __mutex.Release();
+ }
+ else
+ {
+ newSearch = true;
+ __pSearchString = new (std::nothrow) String(searchString);
+ r = __pAsyncSearchTask->Construct(*__pSearchString, null);
+ }
+ TryCatch(r == E_SUCCESS,,"Async Task construction failed");
+
+ //Start Async Task to search for contacts, call logs, Speed dial.
+ __pSearchThread = new (std::nothrow) Thread();
+ r = __pSearchThread->Construct(*__pAsyncSearchTask);
+ TryCatch(r == E_SUCCESS,,"Thread construction failed");
+ r = __pSearchThread->Start();
+ TryCatch(r == E_SUCCESS,,"Failed to start Thread");
+
+ return newSearch;
+
+CATCH:
+ //clear previous search results
+ ClearSearchResults();
+ delete __pAsyncSearchTask;
+ __pAsyncSearchTask = null;
+ delete __pSearchThread;
+ __pSearchThread = null;
+ return true;
+}
+
+void
+DialPresentationModel::HandleContactsRetrievalCompleted(IList* pContactsList)
+{
+ __mutex.Acquire();
+ if(__pNumberSuggestionList != null)
+ {
+ __pNumberSuggestionList->RemoveAll();
+ delete __pNumberSuggestionList;
+ __pNumberSuggestionList = null;
+ }
+
+ if(pContactsList != null && pContactsList->GetCount() > 0)
+ {
+ //Taking Ownership of List.
+ __pNumberSuggestionList = static_cast<ArrayList*>(pContactsList);
+
+ //inform Tab Dialer to update view.
+ DialContactInfo* pDialInfo = null;
+ //Fetch the contact's info at a given index
+ if (__pNumberSuggestionList != null && __pNumberSuggestionList->GetCount() > 0)
+ {
+ pDialInfo = static_cast<DialContactInfo*>(__pNumberSuggestionList->GetAt(0));
+ }
+
+ if(pDialInfo != null)
+ {
+ //send first search result
+ ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgs->Construct();
+
+ //Send display name, mobile number, matched search string and result count.
+ String* argDisplayName = new (std::nothrow) String();
+ argDisplayName->Append(pDialInfo->GetDisplayName());
+ pArgs->Add(argDisplayName);
+
+ String* argMobilNum = new (std::nothrow) String();
+ argMobilNum->Append(pDialInfo->GetPhoneNumber());
+ pArgs->Add(argMobilNum);
+
+ String* argSearchString = new (std::nothrow) String();
+ argSearchString->Append(*(pDialInfo->GetSearchKey()));
+ pArgs->Add(argSearchString);
+
+ //fetch total no. of results
+ String* argResCount = new (std::nothrow) String();
+ argResCount->Append(__pNumberSuggestionList->GetCount());
+ pArgs->Add(argResCount);
+ __parentDialerPanel.SendUserEvent(REQUEST_SHOW_SUGGESTION,pArgs);
+ }
+ }
+ else
+ {
+ //remove old search key
+ if(__pSearchString != null)
+ {
+ delete __pSearchString;
+ __pSearchString = null;
+ }
+ //Show "Add to contact"
+ __parentDialerPanel.SendUserEvent(REQUEST_SHOW_ADD_TO_CONTACTS,null);
+ //empty list
+ delete pContactsList;
+ pContactsList = null;
+ }
+ __mutex.Release();
+}
+
+DialContactInfo*
+DialPresentationModel::GetSuggestionAtIndex(int index)
+{
+ DialContactInfo* pDialInfo = null;
+ __mutex.Acquire();
+ //Fetch the contact's info at a given index
+ if (__pNumberSuggestionList != null
+ && __pNumberSuggestionList->GetCount() > 0
+ && (index >= 0 && index < __pNumberSuggestionList->GetCount()))
+ {
+ pDialInfo = static_cast<DialContactInfo*>(__pNumberSuggestionList->GetAt(index));
+ }
+ __mutex.Release();
+ return pDialInfo;
+}
+
+int
+DialPresentationModel::GetNumberOfSuggestions(void)
+{
+ int resultCount = 0;
+ if(__pNumberSuggestionList != null)
+ {
+ __mutex.Acquire();
+ resultCount = __pNumberSuggestionList->GetCount();
+ __mutex.Release();
+ }
+ return resultCount;
+}
+
+String*
+DialPresentationModel::FetchSpeedDialNumberN(int rowId)
+{
+ if(__pSettingsManager == null)
+ {
+ __pSettingsManager = SettingsManager::GetInstance();
+ }
+ return __pSettingsManager->GetMappedSpeedDialNumberN(rowId);
+}
+
+String*
+DialPresentationModel::FetchLatestNumberFromLogsN(void)
+{
+ String* pRetString = CallLogManager::GetInstance()->GetLatestCallLogFromDbN();
+ return pRetString;
+}
+
+result
+DialPresentationModel::LaunchAddContactsAppControl(String& contactNumber)
+{
+ result r = E_FAILURE;
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(INPUT_TYPE_PHONE), new (std::nothrow) String(contactNumber));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_CONTACT));
+ AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_ADD);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ delete pAc;
+ }
+
+ extraData.RemoveAll(true);
+ return r;
+}
+
+ErrorCodes
+DialPresentationModel::DialCall(const String& contactNumber)
+{
+ AppLogDebug("ENTER");
+ result r = E_FAILURE;
+ r = LaunchCallAppControl(contactNumber);
+ if (r == E_SUCCESS)
+ {
+ return ERROR_NONE;
+ }
+ else
+ {
+ return ERROR_DIAL_FAILED;
+ }
+}
+
+result
+DialPresentationModel::LaunchCallAppControl(const String& contactNumber)
+{
+ result r = E_FAILURE;
+
+ AppLogDebug("Enter");
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(contactNumber));
+ extraData.Add(new (std::nothrow) String(PARAM_CALL_TYPE), new (std::nothrow) String(PARAM_CALL_VALUE_VOICE));
+
+ AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CALL, OPERATION_ID_CALL);
+ if (pAppControl != null)
+ {
+ r = pAppControl->Start(null, null, &extraData, null);
+ delete pAppControl;
+ }
+
+ extraData.RemoveAll(true);
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+DialPresentationModel::OpenMessagingAppControl(String& contactNumber)
+{
+ //launch message
+ result r = E_SUCCESS;
+ String uri = L"sms:";
+ uri.Append(contactNumber);
+ r = AppControl::FindAndStart(OPERATION_ID_COMPOSE,&uri,null,null,null,this);
+ /*HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(MESSAGE_TYPE), new (std::nothrow) String(MESSAGE_SMS_TYPE));
+ extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(contactNumber));*/
+
+ /*AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ delete pAc;
+ }
+ extraData.RemoveAll(true);*/
+
+ return r;
+}
+
+void
+DialPresentationModel::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ //reset 'isAppControlLaunched'
+ AppLogDebug("Enter");
+// __parentDialerPanel.SetAppControlLaunched(false);
+
+ if (appId.Equals(String(PROVIDER_ID_CONTACTS)) && operationId.Equals(String(OPERATION_ID_ADD)))
+ {
+ if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+ {
+ //delete search string to start new search
+ if(__pSearchString != null)
+ {
+ delete __pSearchString;
+ __pSearchString = null;
+ }
+ //Fetch latest added contact and show in suggestion list.
+ __parentDialerPanel.UpdateSearchResults();
+ }
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnDialerKeypad.cpp
+ * @brief Dial Contact Info class
+ */
+#include "PhnDialerKeypad.h"
+#include "PhnAppUtility.h"
+#include "PhnCommonUtils.h"
+#include "PhnPhoneApp.h"
+#include "PhnTabDialer.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Base::Collection;
+
+//Constants
+const wchar_t* IDC_BUTTON_KEYPADCALL = L"IDC_BUTTON_CALL";
+const wchar_t* IDC_BUTTON_KEYPADCLEAR = L"IDC_BUTTON_CLEAR";
+const wchar_t* IDC_BUTTON_NAME = L"IDC_BUTTON";
+const int W_VOICEMAIL_ICON = 50;
+const int H_VOICEMAIL_ICON = 40;
+const int W_STAR_ICON = 218;
+const int H_STAR_ICON = 90;
+const int W_MUTE_ICON = 50;
+const int H_MUTE_ICON = 40;
+const int W_VIDEOCALL_ICON = 76;
+const int H_VIDEOCALL_ICON = 76;
+const int W_CALL_ICON = 76;
+const int H_CALL_ICON = 76;
+const int W_CLEAR_ICON = 76;
+const int H_CLEAR_ICON = 44;
+const int X_CALL_KEY = 12;
+const int MAX_SLIDEDOWN_PIXELS = 110;
+
+//Button Image width and height
+const int W_KEYPAD_BUTTON = 218;
+const int H_KEYPAD_BUTTON = 90;
+const int TOP_MARGIN = 33;
+
+DialerKeypad::DialerKeypad(DialerState openedState) : Panel()
+{
+ __openedState = openedState;
+ __pParentActionListener = null;
+ __pParentLongTapListener = null;
+ __pLongPressDetectors = null;
+ __pParentTouchListner = null;
+}
+
+DialerKeypad::~DialerKeypad(void)
+{
+ if(__pLongPressDetectors != null)
+ {
+ __pLongPressDetectors->RemoveAll();
+ delete __pLongPressDetectors;
+ }
+}
+
+result
+DialerKeypad::OnDraw(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+DialerKeypad::AddListenersToLastRowButtons()
+{
+ //Get Control of the buttons
+ Button* pCallButton = static_cast<Button*>(GetParent()->GetControl(IDC_BUTTON_KEYPADCALL, true));
+ Button* pClearButton = static_cast<Button*>(GetParent()->GetControl(IDC_BUTTON_KEYPADCLEAR, true));
+
+ //Set Action ID for each of the buttons
+ pCallButton->SetActionId(CALL_KEY);
+ pClearButton->SetActionId(CLEAR_KEY);
+
+ //Add Action Listeners to control the action events
+ if(__pParentActionListener != null)
+ {
+ pCallButton->AddActionEventListener(*__pParentActionListener);
+ pClearButton->AddActionEventListener(*__pParentActionListener);
+ }
+
+ //Add Long Press detector for the clear key
+ TouchLongPressGestureDetector* pLongPressDetector = new (std::nothrow) TouchLongPressGestureDetector();
+ pLongPressDetector->Construct();
+ pLongPressDetector->SetCancelTouchEventOnSuccessEnabled(true);
+ pLongPressDetector->AddLongPressGestureEventListener(*__pParentLongTapListener);
+ pClearButton->AddGestureDetector(pLongPressDetector);
+ __pLongPressDetectors->Add(pLongPressDetector);
+
+ //Add Long Press detector for the Call key
+ TouchLongPressGestureDetector* pLongPressCallDetector = new (std::nothrow) TouchLongPressGestureDetector();
+ pLongPressCallDetector->Construct();
+ pLongPressCallDetector->SetCancelTouchEventOnSuccessEnabled(true);
+ pLongPressCallDetector->AddLongPressGestureEventListener(*__pParentLongTapListener);
+ pCallButton->AddGestureDetector(pLongPressCallDetector);
+ __pLongPressDetectors->Add(pLongPressCallDetector);
+
+}
+
+bool
+DialerKeypad::ConstructPanel(IActionEventListener* pActionListener,
+ ITouchLongPressGestureEventListener* pLongTapListener,ITouchEventListener* pTouchListner)
+{
+ result r = E_FAILURE;
+
+ TryCatch(pActionListener != null,,"pActionListener is null");
+ TryCatch(pLongTapListener != null,,"pLongTapListener is null");
+
+ //set parent panel which acts as action listener
+ __pParentActionListener = pActionListener;
+ __pParentLongTapListener = pLongTapListener;
+ __pParentTouchListner = pTouchListner;
+
+ r = Construct(IDL_DIALER_KEYPAD_PANEL);
+ TryCatch(r == E_SUCCESS, , "Panel::Construct() failed");
+
+ //Add action listener and long press gesture listeners.
+ AddListenersToButtons();
+ return true;
+CATCH:
+ return false;
+}
+
+result
+DialerKeypad::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ if(__openedState == DIALER_STATE_EMERGENCY_APPCONTROL)
+ {
+ //reset size and position for emergency dial form
+ Rectangle rect = GetBounds();
+ rect.y = rect.y + MAX_SLIDEDOWN_PIXELS;
+ r = SetBounds(rect);
+ }
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetLandscapeLayoutN());
+ Label* pKeypadBgLbl = static_cast<Label*>(GetParent()->GetControl(L"IDC_LABEL_KEYPAD", true));
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*this, pKeypadBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*this, pKeypadBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->SetRelation(*this, pKeypadBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
+ pRelativeLayout->SetRelation(*this, pKeypadBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ delete pRelativeLayout;
+ }
+
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetHorizontalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetRelation(*this, pKeypadBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
+ pRelativeLayout->SetMargin(*this,0,0,TOP_MARGIN,0);
+
+ Panel* pLastRowPanel = static_cast<Panel*>(GetParent()->GetControl(IDC_PANEL_LASTROW, true));
+ pRelativeLayout->SetRelation(*this, pLastRowPanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+ delete pRelativeLayout;
+ }
+
+ return r;
+}
+
+void
+DialerKeypad::SetKeypadTone(bool enable)
+{
+ for (int i = 1; i <= 12; i++)
+ {
+ //initialize buttons and add action listener
+ String buttonName(IDC_BUTTON_NAME);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName, true));
+ if(pButton == null)
+ {
+ continue;
+ }
+
+ if (enable == false)
+ {
+ AppLogDebug("__openedState == DIALER_STATE_ADD_CALL_APPCONTROL");
+ pButton->SetEffectSoundEnabled(false);
+ }
+ else
+ {
+ AppLogDebug("__openedState == DIALER_STATE_FIRST_SCENE");
+ pButton->SetEffectSoundEnabled(true);
+ }
+ }
+}
+
+void
+DialerKeypad::AddListenersToButtons(void)
+{
+ //Construct array to store LongPress touch detectors
+ __pLongPressDetectors = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pLongPressDetectors->Construct(14);
+ for (int i = 1; i <= 12; i++)
+ {
+ //initialize buttons and add action listener
+ String buttonName(IDC_BUTTON_NAME);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName, true));
+ if(pButton == null)
+ {
+ continue;
+ }
+ pButton->SetActionId(i);
+ SetControlAlwaysOnTop(*pButton,true);
+
+ //Add Listeners
+ if(__pParentActionListener != null)
+ {
+ pButton->AddActionEventListener(*__pParentActionListener);
+ }
+
+ if(__pParentLongTapListener != null)
+ {
+ //If __openedState is Emergency Call AppControl then add LongPress detector for only 'CLEAR_KEY'.
+ if ( (i == NUM_KEY1 && (IsShowVoiceMailIcon() == true))
+ || ((i >= NUM_KEY2 && i <= HASH_KEY) && (__openedState != DIALER_STATE_EMERGENCY_APPCONTROL))
+ || (i == CLEAR_KEY) )
+ {
+ //Construct and Add gesture detector to "0-9,P,#,Clear" buttons
+ TouchLongPressGestureDetector* pLongPressDetector = new (std::nothrow) TouchLongPressGestureDetector();
+ pLongPressDetector->Construct();
+ pLongPressDetector->SetCancelTouchEventOnSuccessEnabled(true);
+ pLongPressDetector->AddLongPressGestureEventListener(*__pParentLongTapListener);
+ pButton->AddGestureDetector(*pLongPressDetector);
+ //stored in an array list
+ __pLongPressDetectors->Add(pLongPressDetector);
+ }
+ }
+ }
+}
+
+void
+DialerKeypad::SetBitmapToKeypadButtons(void)
+{
+ AppLogDebug("ENTER");
+
+ //NOTE:- Since "pButton->GetHeight()" works fine for only 1st button in landscape mode,
+ //and for subsequent buttons(2->9), it returns 0.This causes blank bitmap issue,e.g, N_SE-33113.
+ //SO, we are using button width and height for only first button and use same rect for other butons.
+ String firstbutton(IDC_BUTTON_NAME);
+ firstbutton.Append(1);
+ Button* pFirstButton = static_cast<Button*>(GetControl(firstbutton, true));
+ Rectangle canvasRect(0, 0, pFirstButton->GetWidth(), pFirstButton->GetHeight());
+
+ //Create the buttons of the keypad
+ for (int i = 1; i <= 14; i++)
+ {
+ //initialize buttons and add action listener
+ String buttonName(IDC_BUTTON_NAME);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName, true));
+ if(pButton == null)
+ {
+ continue;
+ }
+
+ //Draw text/image and background in a canvas and add it to the button
+ Canvas* pCanvasNormal = new (std::nothrow) Canvas();
+ pCanvasNormal->Construct(canvasRect);
+ Canvas* pCanvasPressed = new (std::nothrow) Canvas();
+ pCanvasPressed->Construct(canvasRect);
+
+ String number(DialUtil::ConvertDialedNumberToString(pButton->GetActionId()));
+ Dimension imageDim(W_KEYPAD_BUTTON, H_KEYPAD_BUTTON);
+ switch (pButton->GetActionId())
+ {
+ case NUM_KEY1:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_01ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ //Set canvas for pressed state of the button
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_01ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ if(IsShowVoiceMailIcon() == true)
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_VOICEMAILICON, Dimension(W_VOICEMAIL_ICON, H_VOICEMAIL_ICON), *pCanvasNormal, POSITION_BOTTOM_CENTER);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_VOICEMAILICON, Dimension(W_VOICEMAIL_ICON, H_VOICEMAIL_ICON), *pCanvasPressed, POSITION_BOTTOM_CENTER);
+ }
+ }
+ break;
+
+ case NUM_KEY2:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_02ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY2_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_02ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY2_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY3:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_03ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY3_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_03ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY3_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY4:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_04ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY4_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_04ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY4_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY5:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_05ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY5_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_05ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY5_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY6:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_06ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY6_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_06ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY6_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY7:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_07ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY7_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_07ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY7_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY8:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_08ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY8_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_08ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY8_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY9:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_09ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY9_TXT, FONT_KEYPAD_TEXT, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_09ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(IDI_KEY9_TXT, FONT_KEYPAD_TEXT, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_ASTERIKICON, Dimension(W_STAR_ICON, H_STAR_ICON), *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(L"P", FONT_KEYPAD_P, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_ASTERIKICON, Dimension(W_STAR_ICON, H_STAR_ICON), *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(L"P", FONT_KEYPAD_P, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY0:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_00ICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(L"+", FONT_KEYPAD_PLUS, *pCanvasNormal, POSITION_BOTTOM_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_00ICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadTextToCanvas(L"+", FONT_KEYPAD_PLUS, *pCanvasPressed, POSITION_BOTTOM_CENTER, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case HASH_KEY:
+ {
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_SHARPICON, imageDim, *pCanvasNormal, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_MUTEICON, Dimension(W_MUTE_ICON, H_MUTE_ICON), *pCanvasNormal, POSITION_BOTTOM_CENTER);
+ DialUtil::DrawBitmapToCanvas(*pCanvasPressed, IDB_KEYPAD_PRESSICON);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_SHARPICON, imageDim, *pCanvasPressed, POSITION_TOP_CENTER);
+ DialUtil::DrawKeypadImageToCanvas(IDB_KEYPAD_NUMBER_MUTEICON, Dimension(W_MUTE_ICON, H_MUTE_ICON), *pCanvasPressed, POSITION_BOTTOM_CENTER);
+ }
+ break;
+
+ /* case VIDEOCALL_KEY:
+ {
+ DialUtil::Draw9PatchToCanvas(*pCanvasNormal, IDB_DIALER_BTN_LINE5_ICON);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_VIDEOCALL_ICON, Dimension(W_VIDEOCALL_ICON, H_VIDEOCALL_ICON), *pCanvasNormal, POSITION_CENTER);
+
+ DialUtil::Draw9PatchToCanvas(*pCanvasPressed, IDB_DIALER_BTN_PRESS_ICON);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_VIDEOCALL_ICON, Dimension(W_VIDEOCALL_ICON, H_VIDEOCALL_ICON), *pCanvasPressed, POSITION_CENTER);
+ }
+ break;*/
+
+ case CANCEL_KEY:
+ {
+ DialUtil::Draw9PatchToCanvas(*pCanvasNormal, IDB_DIALER_BTN_LINE5_ICON);
+ DialUtil::DrawTextToCanvas(AppUtility::GetResourceString(IDS_CANCEL), FONT_KEYPAD_CANCEL, *pCanvasNormal, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+
+ DialUtil::Draw9PatchToCanvas(*pCanvasPressed, IDB_DIALER_BTN_PRESS_ICON);
+ DialUtil::DrawTextToCanvas(AppUtility::GetResourceString(IDS_CANCEL), FONT_KEYPAD_CANCEL, *pCanvasPressed, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ }
+ break;
+
+ case CALL_KEY:
+ {
+ DialUtil::DrawCall9PatchToCanvas(*pCanvasNormal, IDB_KEYPAD_CALLDIM9PATCH);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_CALL_ICON, Dimension(W_CALL_ICON, H_CALL_ICON), *pCanvasNormal, POSITION_CENTER);
+ DialUtil::DrawCall9PatchToCanvas(*pCanvasPressed, IDB_KEYPAD_CALLPRESS9PATCH);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_CALL_ICON, Dimension(W_CALL_ICON, H_CALL_ICON), *pCanvasPressed, POSITION_CENTER);
+ }
+ break;
+
+ case CLEAR_KEY:
+ {
+ DialUtil::DrawClear9PatchToCanvas(*pCanvasNormal, IDB_KEYPAD_CLEARDIM9PATCH);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_CLEAR_ICON, Dimension(W_CLEAR_ICON, H_CLEAR_ICON), *pCanvasNormal, POSITION_CENTER);
+ DialUtil::DrawClear9PatchToCanvas(*pCanvasPressed, IDB_KEYPAD_CLEARPRESS9PATCH);
+ DialUtil::DrawImageToCanvas(IDB_DIALER_CLEAR_ICON, Dimension(W_CLEAR_ICON, H_CLEAR_ICON), *pCanvasPressed, POSITION_CENTER);
+ }
+ break;
+ }
+
+ //Set the final Bitmap to Button
+ DialUtil::DrawCanvasToButton(pCanvasNormal, pCanvasPressed, pButton);
+ delete pCanvasNormal;
+ pCanvasNormal = null;
+ delete pCanvasPressed;
+ pCanvasPressed = null;
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialerKeypad::SetFocusToButtons(bool keypad, bool lastrow)
+{
+ AppLogDebug("Enter");
+ int totalControls = GetControlCount();
+ for(int index = 0; index < totalControls; ++index)
+ {
+ GetControl(index)->SetFocusable(keypad);
+ GetControl(index)->Invalidate(true);
+ }
+
+ Panel* pLastRowPanel = static_cast<Panel*>(GetParent()->GetControl(IDC_PANEL_LASTROW, true));
+ totalControls = pLastRowPanel->GetControlCount();
+ for(int index = 0; index < totalControls; ++index)
+ {
+ pLastRowPanel->GetControl(index)->SetFocusable(lastrow);
+ pLastRowPanel->GetControl(index)->Invalidate(true);
+ }
+}
+
+bool
+DialerKeypad::IsShowCancelButton(void)
+{
+ //'Cancel' is shown instead of 'Video Call' when opened in 'DIALER_STATE_ADD_CALL_APPCONTROL'.
+ bool isShowCancel = false;
+ if (__openedState == DIALER_STATE_ADD_CALL_APPCONTROL)
+ {
+ isShowCancel = true;
+ }
+ return isShowCancel;
+}
+
+bool
+DialerKeypad::IsShowVoiceMailIcon(void)
+{
+ //voice mail icon is not shown when opened from any APPCONTROL or from DIALER_STATE_ADD_CALL_APPCONTROL.
+ bool isShowVoiceMail = false;
+ if (__openedState == DIALER_STATE_FIRST_SCENE)
+ {
+ isShowVoiceMail = true;
+ }
+ return isShowVoiceMail;
+}
+
+bool
+DialerKeypad::IsShowVideoCallButton(void)
+{
+ //video call button is shown in 'DIALER_STATE_FIRST_SCENE' , 'DIALER_STATE_NORMAL_APPCONTROL'.
+ bool isShowVideoCall = true;
+ if ((__openedState == DIALER_STATE_EMERGENCY_APPCONTROL) || (__openedState == DIALER_STATE_ADD_CALL_APPCONTROL))
+ {
+ isShowVideoCall = false;
+ }
+ return isShowVideoCall;
+}
+
+result
+DialerKeypad::OnTerminating(void)
+{
+ AppLog("Enter");
+ for (int index = 0; index < __pLongPressDetectors->GetCount(); index++)
+ {
+ TouchLongPressGestureDetector* pLongPressDetector = static_cast<TouchLongPressGestureDetector*>(__pLongPressDetectors->GetAt(index));
+ Button* pButton = static_cast<Button*>(pLongPressDetector->GetControl());
+ pButton->RemoveGestureDetector(pLongPressDetector);
+ }
+ for (int i = 1; i <= 12; i++)
+ {
+ //initialize buttons and add action listener
+ String buttonName(IDC_BUTTON_NAME);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName, true));
+ if(pButton == null)
+ {
+ continue;
+ }
+ }
+ return E_SUCCESS;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnEmergencyDialForm.cpp
+ * @brief Base class for all Call forms
+ */
+#include <FApp.h>
+#include <FTelephony.h>
+#include "PhnAppUtility.h"
+#include "PhnCommonUtils.h"
+#include "PhnDialerKeypad.h"
+#include "PhnErrorMsgPopup.h"
+#include "PhnEmergencyDialForm.h"
+#include "PhnPhoneApp.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+using namespace Tizen::Telephony;
+
+//resources
+static const wchar_t* IDL_EMERGENCY_DIAL_FORM = L"IDL_EMERGENCY_DIAL_FORM";
+const wchar_t* IDC_LABEL_EMERGENCY = L"IDC_LABEL_EMERGENCY";
+const wchar_t* IDC_PANEL_EMERGENCY_DISPLAY_DATA = L"IDC_PANEL_EMERGENCY_DISPLAY_DATA";
+const wchar_t* IDC_EDITFIELD_NUMBER = L"IDC_EDITFIELD_NUMBER";
+//color
+const unsigned int COLOR_LABEL_BG = Color32<43, 107, 144>::Value;
+const int MAX_NUMBER_WITH_SEPERATOR = 11;
+const int MIN_NUMBER_WITH_TWO_SEPERATOR = 7;
+const int MIN_NUMBER_WITH_ONE_SEPERATOR = 3;
+const int MAX_TXT_LENGTH_WITH_SEPERATOR = 12;
+const int MAX_VISIBLE_TXT_WITH_MIN_FONT = 18;
+const int IDI_DELTA_FONT_SIZE = 5;
+const int IDI_MAX_TXT_FONT = 94;
+const int IDI_MIN_TXT_FONT = 67;
+const int IDI_MAX_LIMIT_LENGTH = 18;
+
+EmergencyDialForm::EmergencyDialForm(void)
+{
+ __pDialKeypad = null;
+ __pErrorMsgPopup = null;
+ __isAppControlLaunched = false;
+}
+
+EmergencyDialForm::~EmergencyDialForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+ if(__pDialKeypad != null)
+ {
+ __pDialKeypad = null;
+ }
+}
+
+bool
+EmergencyDialForm::Initialize(void)
+{
+ Construct(IDL_EMERGENCY_DIAL_FORM);
+ return true;
+}
+
+result
+EmergencyDialForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ ConstructKeypad();
+ return r;
+}
+
+void
+EmergencyDialForm::ConstructKeypad(void)
+{
+ AppLogDebug("ENTER");
+ //Construct Alpha numeric Keypad
+ if(__pDialKeypad == null)
+ {
+ __pDialKeypad = new (std::nothrow) DialerKeypad(DIALER_STATE_EMERGENCY_APPCONTROL);
+ __pDialKeypad->ConstructPanel(this, this,null);
+ AddControl(__pDialKeypad);
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+EmergencyDialForm::ShowFormattedText(EditField* pEditField, int actionId)
+{
+ AppLogDebug("ENTER");
+ String contactNumber = pEditField->GetText();
+ contactNumber.Replace(L"-",L"");
+ if(actionId == CLEAR_KEY)
+ {
+ contactNumber.Remove(contactNumber.GetLength() - 1, 1);
+ }
+ else
+ {
+ contactNumber.Append(DialUtil::ConvertDialedNumberToString(actionId));
+ }
+
+ int textLength = contactNumber.GetLength();
+ if(textLength == 0)
+ {
+ pEditField->Clear();
+ AppLogDebug("EXIT");
+ return;
+ }
+ //Insert separator if required
+ if(textLength < MAX_NUMBER_WITH_SEPERATOR)
+ {
+ if(textLength > MIN_NUMBER_WITH_TWO_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_TWO_SEPERATOR);
+ }
+ if(textLength > MIN_NUMBER_WITH_ONE_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_ONE_SEPERATOR);
+ }
+ }
+ //update text length
+ textLength = contactNumber.GetLength();
+ //need to change font to fit inside text box
+ //With size 94 -> 12 chars, 67 -> 18 chars
+ int fontSize = pEditField->GetTextSize();
+ if((actionId == CLEAR_KEY) && (textLength <= MAX_VISIBLE_TXT_WITH_MIN_FONT))
+ {
+ //clearing
+ fontSize += IDI_DELTA_FONT_SIZE;
+ }
+ else if(textLength > MAX_TXT_LENGTH_WITH_SEPERATOR)
+ {
+ //appending
+ fontSize -= IDI_DELTA_FONT_SIZE;
+ }
+
+ if(fontSize > IDI_MAX_TXT_FONT)
+ {
+ fontSize = IDI_MAX_TXT_FONT;
+ }
+ if(fontSize < IDI_MIN_TXT_FONT)
+ {
+ fontSize = IDI_MIN_TXT_FONT;
+ }
+ pEditField->SetTextSize(fontSize);
+ //set text to edit field
+ pEditField->SetText(contactNumber);
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+EmergencyDialForm::OnActionPerformed(const Control& source, int actionId)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_EDITFIELD_NUMBER, true));
+ if (pEditField == null)
+ {
+ return;
+ }
+
+ switch (actionId)
+ {
+ case NUM_KEY1:
+ case NUM_KEY2:
+ case NUM_KEY3:
+ case NUM_KEY4:
+ case NUM_KEY5:
+ case NUM_KEY6:
+ case NUM_KEY7:
+ case NUM_KEY8:
+ case NUM_KEY9:
+ case NUM_KEY0:
+ case CLEAR_KEY:
+ {
+ if(pEditField->GetTextLength() >= IDI_MAX_LIMIT_LENGTH && actionId != CLEAR_KEY)
+ {
+ //Maximum capacity reached, Don't append any more numbers.
+ AppLogDebug("EXIT");
+ return;
+ }
+ //append / clear last character to contact
+ ShowFormattedText(pEditField, actionId);
+ }
+ break;
+
+ case CALL_KEY:
+ {
+ //Check if number is present and Call AppControl is not already launched.
+ if (pEditField->GetTextLength() > 0 && __isAppControlLaunched == false)
+ {
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ DialEmergencyCall(contactNo);
+ return;
+ }
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ pEditField->AppendText(L"*");
+ }
+ break;
+
+ case HASH_KEY:
+ {
+ pEditField->AppendText(L"#");
+ }
+ break;
+
+ case CANCEL_KEY:
+ {
+ PhoneApp* pApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ pApp->Terminate();
+ }
+ break;
+
+ default:
+ break;
+ }
+ pEditField->Invalidate(false);
+
+ return;
+}
+
+void
+EmergencyDialForm::OnLongPressGestureDetected(TouchLongPressGestureDetector& gestureDetector)
+{
+ if (gestureDetector.GetControl() != null)
+ {
+ Button* pButton = static_cast<Button*>(gestureDetector.GetControl());
+ int actionId = pButton->GetActionId();
+ switch(actionId)
+ {
+ case CLEAR_KEY:
+ {
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_EDITFIELD_NUMBER, true));
+ if (pEditField != null && pEditField->GetTextLength() > 0)
+ {
+ pEditField->Clear();
+ pEditField->SetTextSize(IDI_MAX_TXT_FONT);
+ pEditField->Invalidate(false);
+ }
+ }
+ break;
+ }
+ }
+}
+
+result
+EmergencyDialForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+EmergencyDialForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+}
+
+void
+EmergencyDialForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+}
+
+void
+EmergencyDialForm::DialEmergencyCall(const String& contactNumber)
+{
+ AppLogDebug("ENTER");
+ ErrorCodes errorCode = ERROR_NONE;
+
+ //Check if dialing emergency call is possible
+ //Check if sim is available
+
+ result r = LaunchCallAppControl(contactNumber);
+ if (r != E_SUCCESS)
+ {
+ errorCode = ERROR_DIAL_FAILED;
+ }
+
+
+ if (errorCode == ERROR_NONE)
+ {
+ __isAppControlLaunched = true;
+ }
+ else
+ {
+ //Show error message Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
+ }
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+result
+EmergencyDialForm::LaunchCallAppControl(const String& contactNumber)
+{
+ result r = E_FAILURE;
+
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(contactNumber));
+
+ AppControl* pAppControl = AppManager::FindAppControlN(PROVIDER_ID_CALL, OPERATION_ID_CALL);
+ if (pAppControl != null)
+ {
+ r = pAppControl->Start(null, null, &extraData, this);
+ delete pAppControl;
+ }
+
+ extraData.RemoveAll(true);
+ return r;
+}
+
+//Called when the application control is completed.
+void
+EmergencyDialForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ //reset 'isAppControlLaunched'
+ __isAppControlLaunched = false;
+ //TODO: check if we need to show any error message here from Call module, in any case.
+}
+
+
+void
+EmergencyDialForm::HandlePopupClosed(void)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_EDITFIELD_NUMBER, true));
+ //clear text
+ pEditField->Clear();
+ Draw();
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ return;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnErrorMsgPopup.cpp
+ * @brief Error message pop class
+ */
+#include <FGraphics.h>
+#include "PhnAppUtility.h"
+#include "PhnErrorMsgPopup.h"
+#include "PhnTypes.h"
+
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Base::Runtime;
+
+const int IDI_VERTICAL_LINE_SPACING = 20;
+const int W_ERROR_MSG_POPUP = 720;
+const int IDI_VERTICAL_MARGIN = 39;
+static const wchar_t* IDL_ERROR_MSG_POPUP = L"IDL_ERROR_MSG_POPUP";
+static const wchar_t* IDC_MSG_TEXTBOX = L"IDC_MSG_TEXTBOX";
+static const wchar_t* IDS_DIAL_ERROR_MSG = L"IDS_DIAL_ERROR_MSG";
+static const wchar_t* IDS_JOIN_FAILED_ERROR_MSG = L"IDS_JOIN_FAILED_ERROR_MSG";
+static const wchar_t* IDS_REJECT_FAILED_ERROR_MSG = L"IDS_REJECT_FAILED_ERROR_MSG";
+static const wchar_t* IDS_CALL_SWAP_ERROR_MSG = L"IDS_CALL_SWAP_ERROR_MSG";
+static const wchar_t* IDS_END_PARTICIPANT_ERROR_MSG = L"IDS_END_PARTICIPANT_ERROR_MSG";
+static const wchar_t* IDS_SPLIT_PARTICIPANT_ERROR_MSG = L"IDS_SPLIT_PARTICIPANT_ERROR_MSG";
+static const wchar_t* IDS_SIM_INIT_ERROR_MSG = L"IDS_SIM_INIT_ERROR_MSG";
+static const wchar_t* IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG = L"IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG";
+static const wchar_t* IDS_INVALID_ARGS_ERROR_MSG = L"IDS_INVALID_ARGS_ERROR_MSG";
+static const wchar_t* IDS_TAPI_INIT_ERROR_MSG = L"IDS_TAPI_INIT_ERROR_MSG";
+static const wchar_t* IDS_GENERAL_TAPI_ERROR_MSG = L"IDS_GENERAL_TAPI_ERROR_MSG";
+static const wchar_t* IDS_LONG_BARRING_PWD_ERROR_MSG = L"IDS_LONG_BARRING_PWD_ERROR_MSG";
+static const wchar_t* IDS_INVALID_NUMBER_ERROR_MSG = L"IDS_INVALID_NUMBER_ERROR_MSG";
+static const wchar_t* IDS_GENERAL_ERROR_MSG = L"IDS_GENERAL_ERROR_MSG";
+
+ErrorMsgPopup::ErrorMsgPopup(IPopupClosedEventListener* pEventListener)
+: __pEventListener(pEventListener)
+{
+ __pTimer = null;
+}
+
+ErrorMsgPopup::~ErrorMsgPopup(void)
+{
+ if (__pTimer)
+ {
+ __pTimer->Cancel();
+ delete __pTimer;
+ __pTimer = null;
+ }
+}
+
+void
+ErrorMsgPopup::ConstructPopup(int errorCode)
+{
+ Construct(IDL_ERROR_MSG_POPUP);
+ //Fetch error message
+ String msg = FetchErrorMessage(errorCode);
+
+ //Set text to Message box
+ TextBox* pMsgTxtBox = static_cast<TextBox*>(GetControl(IDC_MSG_TEXTBOX));
+ pMsgTxtBox->SetLineSpacing(1,1);
+ pMsgTxtBox->SetText(msg);
+ pMsgTxtBox->SetEnabled(false);
+ pMsgTxtBox->SetTextAlignment(ALIGNMENT_CENTER);
+ pMsgTxtBox->SetTextColor(TEXT_BOX_TEXT_COLOR_NORMAL, Color(0, 0, 0));
+ pMsgTxtBox->SetTextColor(TEXT_BOX_TEXT_COLOR_DISABLED, Color(0, 0, 0));
+
+ Rectangle msgTxtBoxRect = pMsgTxtBox->GetBounds();
+ //get no. of lines to show message
+ int noOfLines = pMsgTxtBox->GetLineCount();
+ pMsgTxtBox->SetSize(msgTxtBoxRect.width,((noOfLines * msgTxtBoxRect.height) + IDI_VERTICAL_LINE_SPACING));
+
+ Dimension popUpDimen = GetSize();
+ popUpDimen.height = pMsgTxtBox->GetHeight() + (2 * IDI_VERTICAL_MARGIN);
+ SetSize(popUpDimen);
+
+ SetControlAlwaysOnTop(*pMsgTxtBox,true);
+ RelativeLayout* relPopUpLayout = static_cast<RelativeLayout*>(GetLayoutN());
+ if(relPopUpLayout != null)
+ {
+ // Set Relations between msgtextbox and Popup
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_HORIZONTAL);
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_VERTICAL);
+ }
+ //construct timer
+ __pTimer = new (std::nothrow) Timer();
+ __pTimer->Construct(*this);
+}
+
+void
+ErrorMsgPopup::ShowErrorMsgPopupN(int errorCode)
+{
+ //Construct the message popup
+ ConstructPopup(errorCode);
+ //Show popup message
+ ShowPopup();
+}
+
+void
+ErrorMsgPopup::ShowPopup(void)
+{
+ AppLogDebug("Popup launched");
+ __popupModalResult = 0;
+ //start timer to show popup
+ __pTimer->Start(2000);
+ SetShowState(true);
+ Show();
+}
+
+void
+ErrorMsgPopup::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ //Call default implementation of "Object.Equals()"
+ //returns true, if they are pointing to same address.
+ if (__pTimer->Equals(timer))
+ {
+ SetShowState(false);
+ //notify the listener
+ __pEventListener->HandlePopupClosed();
+ }
+}
+
+String
+ErrorMsgPopup::FetchErrorMessage(int errorCode)
+{
+ String msg(L"");
+ switch (errorCode)
+ {
+ case ERROR_NONE:
+ break;
+
+ case ERROR_DIAL_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_DIAL_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_JOIN_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_JOIN_FAILED_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_REJECT_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_REJECT_FAILED_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_SWAP_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_CALL_SWAP_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_END_FROM_CONFERENCE_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_END_PARTICIPANT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_SPLIT_FROM_CONFERENCE_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SPLIT_PARTICIPANT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_CODE_SIM_INITIALIZATION_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SIM_INIT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_NOT_EMERGENCY_NUM:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_INVALID_INPUT:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_INVALID_ARGS_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_TAPI_INIT_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_TAPI_INIT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_TAPI_ERROR:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_GENERAL_TAPI_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_BARRING_PWD_TOO_LONG:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_LONG_BARRING_PWD_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_INVALID_NUMBER:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_INVALID_NUMBER_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_FLIGHT_MODE_SET:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_FLIGHT_MODE_ON));
+ }
+ break;
+
+ case ERROR_SYSTEM_FAILURE:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SETTING_SYSTEM_FAILURE_TEXT));
+ }
+ break;
+
+ case ERROR_WRONG_BARRING_PASSWORD:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SETTING_WRONG_PASSWORD_TEXT));
+ }
+ break;
+
+ case ERROR_GENERAL:
+ default:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_GENERAL_ERROR_MSG));
+ }
+ break;
+ }
+
+ return msg;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnLogsDetailForm.cpp
+ * @brief Call log details form
+ */
+#include <FApp.h>
+#include <FGraphics.h>
+#include <FMedia.h>
+#include <FSocial.h>
+#include <msg_types.h>
+#include "PhnPhoneApp.h"
+#include "PhnAppUtility.h"
+#include "PhnLogsDetailForm.h"
+#include "PhnSceneRegister.h"
+#include "PhnCalllogManager.h"
+#include "PhnCallLogPresentationModel.h"
+#include "PhnCallRejectInfo.h"
+#include "PhnDialPresentationModel.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Base::Utility;
+//resources
+const wchar_t* IDL_CALL_LOG_DETAIL_FORM = L"IDL_CALL_LOG_DETAIL_FORM";
+const wchar_t* IDC_BUTTON_CONTACT_IMAGE = L"IDC_BUTTON_CONTACT_IMAGE";
+const wchar_t* IDC_LABEL_NAME = L"IDC_LABEL_NAME";
+const wchar_t* IDC_LABEL_NUMBER_COUNT = L"IDC_LABEL_NUMBER_COUNT";
+const wchar_t* IDC_LABEL_UNSAVED_NUMBER = L"IDC_LABEL_UNSAVED_NUMBER";
+const wchar_t* IDC_LABEL_COUNT = L"IDC_LABEL_COUNT";
+const wchar_t* IDC_LABEL_NUMBER = L"IDC_LABEL_NUMBER";
+const wchar_t* IDC_LABEL_NUMBER_UNSAVED = L"IDC_LABEL_NUMBER_UNSAVED";
+const wchar_t* IDC_LABEL_BLOCKED = L"IDC_LABEL_BLOCKED";
+const wchar_t* IDC_BUTTON_MESSAGE = L"IDC_BUTTON_MESSAGE";
+const wchar_t* IDC_SELECTALL = L"IDC_SELECTALL";
+const wchar_t* IDC_LABEL_DETAIL_SELECTED = L"IDC_LABEL_DETAIL_SELECTED";
+const wchar_t* IDC_PANEL_NAME = L"IDC_PANEL_NAME";
+const wchar_t* IDC_PANEL_NUMBER_UNSAVED = L"IDC_PANEL_NUMBER_UNSAVED";
+const wchar_t* IDS_ALREADY_USED_MSG = L"IDS_ALREADY_USED_MSG";
+
+const int IDA_CALL_LOG_CALL = 201;
+const int IDA_CALL_LOG_MESSAGE = 202;
+const int IDA_FOOTER_BUTTON_LEFT = 203;
+const int IDA_FOOTER_BUTTON_RIGHT = 204;
+const int IDA_SELECT_ALL_CHECKED = 205;
+const int IDA_SELECT_ALL_UNCHECKED = 206;
+const int IDA_POPUP_DELETE_CANCEL = 207;
+const int IDA_FOOTER_LOG_MORE = 208;
+const int IDA_CONTEXTMENU_DETAILS = 209;
+const int IDA_CONTEXTMENU_ADDTOCONTACT = 210;
+const int IDA_CONTEXTMENU_BLOCK = 211;
+const int IDA_POPUP_DELETE_YES = 212;
+const int IDA_POPUP_DELETE_NO = 213;
+
+static const wchar_t* IDS_INVALID_NUMBER_ERROR_MSG = L"IDS_INVALID_NUMBER_ERROR_MSG";
+static const wchar_t* IDS_MESSAGE_NUMBER_IS_INVALID = L"IDS_MESSAGE_NUMBER_IS_INVALID";
+static const wchar_t* IDS_CALL_NUMBER_IS_INVALID = L"IDS_CALL_NUMBER_IS_INVALID";
+
+const int W_BUTTON = 48;
+const int H_BUTTON = 48;
+const int W_BLOCKED_ICON = 56;
+const int H_BLOCKED_ICON = 56;
+//static const int X_MORE = 55;
+
+const wchar_t* FORMAT_STR = L"%ls (%d)";
+
+static const int W_DELETE_POPUP = 720;
+static const int H_DELETE_POPUP = 308;
+static const int Y_DELETE_POPUP_TITLE = 20;
+static const int H_DELETE_POPUP_ELEMENT = 60;
+static const int H_DELETE_POPUP_PROGRESS = 34;
+static const int Y_DELETE_POPUP_CANCEL_BUTTON = 214;
+static const int H_DELETE_POPUP_CANCEL_BUTTON = 74;
+static const int W_DELETE_POPUP_CANCEL_BUTTON = 394;
+
+static const int FONT_SIZE_DELETE_POPUP_TEXT = 36;
+
+static const unsigned int COLOR_DELETE_POPUP_TEXT = Color32<128, 128, 128>::Value;
+static const unsigned int COLOR_DELAIL_LABEL_SELECTED = Color32<68, 68, 68>::Value;
+const unsigned int COLOR_DELAIL_LABEL_SELECTED_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
+
+DlLogsDetailForm::DlLogsDetailForm(void)
+{
+ __pDataProvider = new LogsDetailItemProvider();
+
+ __listHeight = 0;
+ __pButtonCall = null;
+ __pButtonMessage = null;
+ __pButtonContactImage = null;
+ __pPanelNumberUnsaved = null;
+ __pPanelName = null;
+ __pLabelNumber = null;
+ __pFormFooter = null;
+ __pList = null;
+ __isEditMode = false;
+ __isSelectAll = false;
+ __isPresentInContacts = false;
+ __listItemCount = 0;
+ __selectedItemCount = 0;
+ __calllogListByNum = null;
+ __pLogPresentor = null;
+ __calllogCount = 0;
+ __isMsgAppControlLaunched = false;
+ __deleteLogsTimer.Construct(*this);
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+ __pDeletePopup = null;
+ __isDeleteInProgress = false;
+ __pCallLogId = null;
+ __isSceneVisible = false;
+ __pLogsBlockPopup = null;
+ __isContactAppControlLaunched = false;
+ __isCallBeRejected = false;
+ __isCallAppControlLaunched = false;
+ __isMsgBeRejected = false;
+ __pOptionMenu = null;
+ __pConfirmationDeletePopup = null;
+}
+
+DlLogsDetailForm::~DlLogsDetailForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+ if (__pDataProvider != null)
+ {
+ delete __pDataProvider;
+ __pDataProvider = null;
+ }
+ if (__pLogPresentor != null)
+ {
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ __pLogPresentor = null;
+ }
+ if (__pCallLogId != null)
+ {
+ __pCallLogId->RemoveAll();
+ delete __pCallLogId;
+ __pCallLogId = null;
+ }
+ if(__pLogsBlockPopup != null)
+ {
+ delete __pLogsBlockPopup;
+ __pLogsBlockPopup = null;
+ }
+}
+
+bool
+DlLogsDetailForm::Initialize()
+{
+ result r = Construct(IDL_CALL_LOG_DETAIL_FORM);
+ __pCallLogId = new(std::nothrow) ArrayList();
+ r = __pCallLogId->Construct();
+
+ TryCatch(r == E_SUCCESS, , "DlLogsDetailForm::Initialize Fail to initialize Call log detail form");
+ return true;
+CATCH:
+ return false;
+
+}
+
+result
+DlLogsDetailForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ SetFormMenuEventListener(this);
+ SetFormBackEventListener(this);
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+
+ __pFormFooter = GetFooter();
+
+ __pFormFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
+ __pFormFooter->AddActionEventListener(*this);
+
+ __pFooterItemDelete.Construct(IDA_FOOTER_BUTTON_LEFT);
+ __pFooterItemDelete.SetText(AppUtility::GetResourceString(IDS_CALLLOG_DELETE_FOOTER));
+ __pFormFooter->AddItem(__pFooterItemDelete);
+
+ __pButtonContactImage = static_cast<Button*>(GetControl(IDC_BUTTON_CONTACT_IMAGE));
+
+ //todo: set image & show if present in contacts
+ __pButtonContactImage->SetShowState(false);
+ __pButtonContactImage->SetFocusable(false);
+
+ __pPanelName = static_cast<Panel*>(GetControl(IDC_PANEL_NAME));
+ __pPanelNumberUnsaved = static_cast<Panel*>(GetControl(IDC_PANEL_NUMBER_UNSAVED));
+
+ __pLabelNumber = static_cast<Label*>(GetControl(IDC_LABEL_NUMBER));
+ __pLabelNumber->SetTextColor(Color::GetColor(COLOR_ID_BLACK));
+ __pLabelNumber->SetTextConfig(32, LABEL_TEXT_STYLE_BOLD);
+
+
+ __pLabelBlocked = static_cast<Label*>(GetControl(IDC_LABEL_BLOCKED));
+ __pLabelBlocked->SetShowState(false);
+
+
+ Bitmap* pBgNormal = pAppResource->GetBitmapN(IDB_CIRCLE_BUTTON_NORMAL ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ Bitmap* pBgPressed = pAppResource->GetBitmapN(IDB_CIRCLE_BUTTON_PRESSED ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ Bitmap* pCallNormal = pAppResource->GetBitmapN(IDB_LOG_DETAIL_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ Bitmap* pCallPressed = pAppResource->GetBitmapN(IDB_LOG_DETAIL_CALL_PRESSED_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ __pButtonCall = static_cast<Button*>(GetControl(IDC_BUTTON_CALL));
+ __pButtonCall->SetActionId(IDA_CALL_LOG_CALL);
+ __pButtonCall->AddActionEventListener(*this);
+
+ if (pBgNormal != null)
+ {
+ __pButtonCall->SetNormalBackgroundBitmap(*pBgNormal);
+ delete pBgNormal;
+ pBgNormal = null;
+ }
+ if (pBgPressed != null)
+ {
+ __pButtonCall->SetPressedBackgroundBitmap(*pBgPressed);
+ delete pBgPressed;
+ pBgPressed = null;
+ }
+ if (pCallNormal != null)
+ {
+ __pButtonCall->SetNormalBitmap(Point(0, 0), *pCallNormal);
+ delete pCallNormal;
+ pCallNormal = null;
+ }
+ if (pCallPressed != null)
+ {
+ __pButtonCall->SetPressedBitmap(Point(0, 0), *pCallPressed);
+ delete pCallPressed;
+ pCallPressed = null;
+ }
+
+ pBgNormal = pAppResource->GetBitmapN(IDB_CIRCLE_BUTTON_NORMAL ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ pBgPressed = pAppResource->GetBitmapN(IDB_CIRCLE_BUTTON_PRESSED ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ Bitmap* pMsgNormal = pAppResource->GetBitmapN(IDB_LOG_DETAIL_MSG_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ Bitmap* pMsgPressed = pAppResource->GetBitmapN(IDB_LOG_DETAIL_MSG_PRESSED_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ __pButtonMessage = static_cast<Button*>(GetControl(IDC_BUTTON_MESSAGE));
+ __pButtonMessage->SetActionId(IDA_CALL_LOG_MESSAGE);
+ __pButtonMessage->AddActionEventListener(*this);
+
+ if (pBgNormal != null)
+ {
+ __pButtonMessage->SetNormalBackgroundBitmap(*pBgNormal);
+ delete pBgNormal;
+ pBgNormal = null;
+ }
+ if (pBgPressed != null)
+ {
+ __pButtonMessage->SetPressedBackgroundBitmap(*pBgPressed);
+ delete pBgPressed;
+ pBgPressed = null;
+ }
+ if (pMsgNormal != null)
+ {
+ __pButtonMessage->SetNormalBitmap(Point(0, 0), *pMsgNormal);
+ delete pMsgNormal;
+ pMsgNormal = null;
+ }
+ if (pMsgPressed != null)
+ {
+ __pButtonMessage->SetPressedBitmap(Point(0, 0), *pMsgPressed);
+ delete pMsgPressed;
+ pMsgPressed = null;
+ }
+
+ __pSelectAll = static_cast<CheckButton*>(GetControl(IDC_SELECTALL));
+ __pSelectAll->SetActionId(IDA_SELECT_ALL_CHECKED, IDA_SELECT_ALL_UNCHECKED);
+ __pSelectAll->SetSize(GetClientAreaBounds().width, 112);
+ __pSelectAll->SetShowState(false);
+ __pSelectAll->AddActionEventListener(*this);
+
+ __pList = new (std::nothrow) GroupedListView();
+ if (__pList != null)
+ {
+ __listHeight = GetClientAreaBounds().height - __pButtonContactImage->GetBounds().height - __pButtonMessage->GetBounds().height - 40;
+ int listY = __pButtonContactImage->GetBounds().height + __pButtonMessage->GetBounds().height + 40;
+ __pList->Construct(Rectangle(0, listY, GetClientAreaBounds().width, __listHeight), GROUPED_LIST_VIEW_STYLE_INDEXED, true, SCROLL_STYLE_FADE_OUT);
+
+ __pList->AddGroupedListViewItemEventListener(*this);
+ r = AddControl(__pList);
+ TryCatch(r == E_SUCCESS, , "call log detail list control not added");
+ }
+
+ __pSelectedLabel = static_cast<Label*>(GetControl(IDC_LABEL_DETAIL_SELECTED));
+ if(__pSelectedLabel != null)
+ {
+ SetControlAlwaysOnTop(*__pSelectedLabel,true);
+ __pSelectedLabel->SetBackgroundColor(COLOR_DELAIL_LABEL_SELECTED);
+ __pSelectedLabel->SetTextColor(COLOR_DELAIL_LABEL_SELECTED_TEXT);
+ __pSelectedLabel->SetShowState(false);
+ }
+ return r;
+CATCH:
+ return r;
+}
+
+result
+DlLogsDetailForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ return r;
+}
+
+bool
+DlLogsDetailForm::DeleteSelectedCalllog(void)
+{
+
+ return false;
+}
+
+
+void
+DlLogsDetailForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+
+ case IDA_CALL_LOG_CALL:
+ {
+ if(__isCallAppControlLaunched == true)
+ {
+ AppLogDebug("Call AppControl is already launched");
+ return;
+ }
+ if (__number.IsEmpty() == false)
+ {
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ if (pPhoneApp->IsOpenAsAppControl() == false)
+ {
+ CalLogPresentationModel* pLogPresentor = CalLogPresentationModel::GetInstance();
+ pLogPresentor->DialCall(__number);
+ __isCallAppControlLaunched = true;
+ }
+ else
+ {
+ //launched as AppControl
+ /*HashMap resultData;
+ resultData.Construct();
+ resultData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(__number));
+ //send "APP_CTRL_RESULT_SUCCEEDED" and 'contactNumber' as result.
+ pPhoneApp->SendAppControlResponseMessage(APP_CTRL_RESULT_SUCCEEDED, &resultData);
+ resultData.RemoveAll(true);*/
+ CalLogPresentationModel* pLogPresentor = CalLogPresentationModel::GetInstance();
+ pLogPresentor->DialCall(__number);
+ pPhoneApp->Terminate();
+ }
+ }
+ }
+ break;
+
+ case IDA_CALL_LOG_MESSAGE:
+ {
+ if(__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl is already launched
+ return;
+ }
+
+ //launch message
+ __isMsgAppControlLaunched = true;
+ result r = E_SUCCESS;
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(MESSAGE_TYPE), new (std::nothrow) String(MESSAGE_SMS_TYPE));
+ String tempContactNumber;
+ int commaIndex = 0;
+ int semiColonIndex = 0;
+ int index = 0;
+ __number.IndexOf(",", 0, commaIndex);
+ __number.IndexOf(";", 0, semiColonIndex);
+
+ if(commaIndex != -1 && semiColonIndex != -1)
+ {
+ index = commaIndex < semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else if(commaIndex != -1 || semiColonIndex != -1)
+ {
+ index = commaIndex > semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else
+ {
+ index = __number.GetLength();
+ }
+ __number.SubString(0, index, tempContactNumber);
+
+ extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(tempContactNumber));
+
+ String uri = L"sms:";
+ uri.Append(tempContactNumber);
+ r = AppControl::FindAndStart(OPERATION_ID_COMPOSE,&uri,null,null,null,this);
+ if(r != E_SUCCESS)
+ {
+ //AppControl failed.
+ __isMsgAppControlLaunched = false;
+ }
+ /*AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ if(r != E_SUCCESS)
+ {
+ //AppControl failed.
+ __isMsgAppControlLaunched = false;
+ }
+ delete pAc;
+ }*/
+ extraData.RemoveAll(true);
+ }
+ break;
+
+ case IDA_FOOTER_BUTTON_LEFT:
+ {
+ if(__isContactAppControlLaunched == true || __isMsgAppControlLaunched == true || __isCallAppControlLaunched == true)
+ {
+ AppLog("AppControl lunching. Can not do delete operation");
+ return;
+ }
+ const wchar_t* pContact = __number.GetPointer();
+ int len = __number.GetLength() + 1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+ if (__isEditMode == false)
+ {
+ SetFormMode(true);
+ UnCheckAllItems();
+ __calllogListByNum = __pLogPresentor->GetCallogListByNumberFromDatabaseN(pNumber);
+ __pList->UpdateList();
+ __pList->Invalidate(false);
+ }
+ else
+ {
+ ShowDeleteConfirmationPopup();
+ }
+ delete[] pNumber;
+ pNumber = null;
+ }
+ break;
+
+ case IDA_POPUP_DELETE_YES:
+ {
+ if(__pConfirmationDeletePopup != null)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ ShowDeletePopup();
+ }
+ break;
+
+ case IDA_POPUP_DELETE_NO:
+ {
+ if(__pConfirmationDeletePopup != null)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ }
+ break;
+
+ case IDA_SELECT_ALL_UNCHECKED:
+ {
+ SetListItemSelectStatus(false);
+ __pCallLogId->RemoveAll();
+ __selectedItemCount = 0;
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ __pSelectedLabel->Invalidate(false);
+ }
+ break;
+ case IDA_SELECT_ALL_CHECKED:
+ {
+ __pCallLogId->RemoveAll();
+ SetAllListItems(true);
+ __selectedItemCount = __listItemCount;
+ String text;
+ String selItemStr = L"";
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __listItemCount);
+ __pSelectedLabel->SetText(text);
+ __pSelectedLabel->Invalidate(false);
+ }
+ break;
+ case IDA_POPUP_DELETE_CANCEL:
+ {
+ __deleteLogsTimer.Cancel();
+ HideDeletePopup();
+ }
+ break;
+
+ case IDA_CONTEXTMENU_DETAILS:
+ {
+ ViewContactDetail();
+ }
+ break;
+
+ case IDA_CONTEXTMENU_ADDTOCONTACT:
+ {
+ result r = __pLogPresentor->LaunchAddContactsAppControl(__number);
+ if(r == E_SUCCESS)
+ {
+ __isContactAppControlLaunched = true;
+ }
+ }
+ break;
+
+ case IDA_CONTEXTMENU_BLOCK:
+ {
+ ShowBlockPopup();
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+DlLogsDetailForm::GetUpdatedListFromDatabase()
+{
+ AppLogDebug("Enter");
+ if(__calllogListByNum != null)
+ {
+ AppLog(" list already present, UPDATE");
+ __calllogListByNum->RemoveAll();
+ delete __calllogListByNum;
+ __calllogListByNum = null;
+ }
+
+ const wchar_t* pContact = __number.GetPointer();
+ int len = __number.GetLength() + 1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+ __calllogListByNum = __pLogPresentor->GetCallogListByNumberFromDatabaseN(pNumber);
+ __calllogCount = __pLogPresentor->GetCalllogCountByNumber();
+
+ delete[] pNumber;
+}
+
+void
+DlLogsDetailForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppLogDebug("Enter");
+ AddOrientationEventListener(*this);
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+ __pLogPresentor = CalLogPresentationModel::GetInstance();
+ __pLogPresentor->AddCalllogChangeListener(*this);
+ __isPresentInContacts = false;
+ __selectedItemCount =0;
+ __isMsgAppControlLaunched = false;
+ __isCallAppControlLaunched = false;
+ if(pArgs != null)
+ {
+ __number.Clear();
+ String* pNumberStr = static_cast<String*> (pArgs->GetAt(0));
+ __number.Append(*pNumberStr);
+ //UpdateForm();
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+ __pList->SetItemProvider(*__pDataProvider);
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ SetFormMode(false);
+ SetSceneVisible(true);
+}
+
+void
+DlLogsDetailForm::UpdateForm(void)
+{
+ AppLogDebug("Enter");
+ SettingsPresentationModel* pSettingsPresentationModel = SettingsPresentationModel::GetInstance();
+ bool isCallToBeRejected = pSettingsPresentationModel->IsCallToBeRejected(__number);
+ __isCallBeRejected = isCallToBeRejected;
+ __isPresentInContacts = false;
+
+ AppLog("__calllogCount = %d", __calllogCount);
+ if(__calllogCount == 0)
+ {
+ return;
+ }
+ __contactName = L"";
+ Bitmap* pBitmap = null;
+ Addressbook* pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if (pAddressBook != null)
+ {
+ IList* pNumberContactsList = null;
+ if(__number.Contains(L"@"))
+ {
+ pNumberContactsList = pAddressBook->SearchContactsByEmailN(__number);
+ }
+ else
+ {
+ pNumberContactsList = pAddressBook->SearchContactsByPhoneNumberN(__number);
+ }
+ if(pNumberContactsList != null)
+ {
+ IEnumerator* pContactListEnum = pNumberContactsList->GetEnumeratorN();
+ while (pContactListEnum->MoveNext() == E_SUCCESS)
+ {
+ Contact* pContact = static_cast<Contact*>(pContactListEnum->GetCurrent());
+ if(pContact != null)
+ {
+ IList* pPhoneNumberList = null;
+ if(__number.Contains(L"@"))
+ {
+ pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_EMAILS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pEnum->MoveNext())
+ {
+ Email* pPhoneNumber = (Email*) pEnum->GetCurrent();
+ if(pPhoneNumber->GetEmail().Equals(__number) == true)
+ {
+ __isPresentInContacts = true;
+ break;
+ }
+ }
+ delete pEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ }
+ else
+ {
+ pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pEnum->GetCurrent();
+ if(pPhoneNumber->GetPhoneNumber().Equals(__number) == true)
+ {
+ __isPresentInContacts = true;
+ break;
+ }
+ }
+ delete pEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ }
+
+
+ if(__isPresentInContacts == true)
+ {
+ //fetch contact name
+ __contactName.Clear();
+ pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, __contactName);
+ //fetch person's photo
+ pBitmap = pContact->GetThumbnailN(); //In case of big image, it will return null.
+ if(pBitmap == null)
+ {
+ AppLog("Fetch big image");
+ String thumbnailPath;
+ pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, thumbnailPath);
+ if(thumbnailPath.IsEmpty() == true)
+ {
+ IList* pCategoryList = pAddressBook->GetCategoriesByContactN(pContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ AppLogDebug("Changes to get thumbnail group photo");
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ thumbnailPath = pCategory->GetThumbnailPath();
+ }
+ }
+ ImageBuffer thumbnailImageBuffer;
+ if (thumbnailImageBuffer.Construct(thumbnailPath) == E_SUCCESS)
+ {
+ pBitmap = thumbnailImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
+ }
+ }
+ ManageUserDetail();
+ //todo: set the contact button image
+ Canvas* pCanvas = null;
+ pCanvas = new (std::nothrow) Canvas();
+ pCanvas->Construct(Rectangle(0,0,__pButtonContactImage->GetBounds().width,__pButtonContactImage->GetBounds().height));
+ //set bitmap to button
+ if (pBitmap == null)
+ {
+ pBitmap = AppUtility::GetBitmapFromResourcesN(L"C01-1_icon_contacts.png", W_CONTACT_BITMAP_ITEM, H_CONTACT_BITMAP_ITEM);
+ }
+ else
+ {
+ //scale bitmap to predefined size
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pBitmap->Scale(Dimension(W_CONTACT_BITMAP_ITEM, H_CONTACT_BITMAP_ITEM));
+ }
+
+ pCanvas->DrawBitmap(Rectangle(Point(0, 0), Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+ //TODO: chk whether the number is blocked and add icon in top right
+ bool isMsgBeRejected = SettingsPresentationModel::GetInstance()->GetMsgFilterListIndex(__number);
+ if (isCallToBeRejected == true || isMsgBeRejected == true)
+ {
+ pBitmap = AppUtility::GetBitmapFromResourcesN(L"C01-4_icon_Blocked.png", W_BLOCKED_ICON, H_BLOCKED_ICON);
+ pCanvas->DrawBitmap(Rectangle(Point(86, 0), Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+ }
+ if(__isEditMode == false)
+ {
+ Bitmap* pActualBgBmp = new Bitmap();
+ pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
+ __pButtonContactImage->SetNormalBackgroundBitmap(*pActualBgBmp);
+ __pButtonContactImage->SetPressedBackgroundBitmap(*pActualBgBmp);
+ __pButtonContactImage->SetHighlightedBackgroundBitmap(*pActualBgBmp);
+ __pButtonContactImage->SetShowState(true);
+ __pButtonContactImage->Invalidate(false);
+ delete pCanvas;
+ delete pActualBgBmp;
+ }
+ break;
+ }
+ }
+ }
+ delete pContactListEnum;
+ pNumberContactsList->RemoveAll(true);
+ delete pNumberContactsList;
+ delete pAddressBook;
+ pAddressBook = null;
+ }
+ }
+
+ if (__isPresentInContacts == false)
+ {
+ __isPresentInContacts = false;
+ //not in contacts rearrage the icons
+ ManageUserDetail();
+ //if(__isEditMode == false)
+ {
+ //todo set bitmap
+ bool isMsgBeRejected = SettingsPresentationModel::GetInstance()->GetMsgFilterListIndex(__number);
+ if (isCallToBeRejected == true || isMsgBeRejected == true)
+ {
+ pBitmap = AppUtility::GetBitmapFromResourcesN(L"C01-4_icon_Blocked.png", W_BLOCKED_ICON, H_BLOCKED_ICON);
+ __pLabelBlocked->SetBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+ }
+ else
+ {
+ Canvas* pCanvas = null;
+ pCanvas = new (std::nothrow) Canvas();
+ pCanvas->Construct(Rectangle(0,0,__pLabelBlocked->GetBounds().width,__pButtonContactImage->GetBounds().height));
+ Bitmap* pActualBgBmp = new Bitmap();
+ pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
+ __pLabelBlocked->SetBackgroundBitmap(*pActualBgBmp);
+ delete pCanvas;
+ delete pActualBgBmp;
+ }
+ __pLabelBlocked->SetShowState(true);
+ __pLabelBlocked->Invalidate(false);
+ }
+ }
+ if (__pDataProvider != null)
+ {
+ __pDataProvider->ResetDetailsList();
+ }
+ __pList->UpdateList();
+ __pList->Invalidate(true);
+ if(__number.Contains(L"@"))
+ {
+ __pButtonCall->SetEnabled(false);
+ }
+ else
+ {
+ __pButtonCall->SetEnabled(true);
+ }
+}
+
+void
+DlLogsDetailForm::ManageUserDetail()
+{
+ if(__isEditMode == false)
+ {
+ AppLogDebug("Enter");
+ float fontSize;
+ float itemHeight;
+ AppUtility::GetGlobalFontAndItemHeight(&fontSize, &itemHeight);
+ if(fontSize == 44.0f)
+ {
+ fontSize = 50.0f; //normal fort size
+ }
+ if(__isPresentInContacts == true)
+ {
+ String contactNameStr;
+ contactNameStr.Format(100, L"%ls",__contactName.GetPointer(), __calllogCount);
+ Font* ContactNameTextfont = new (std::nothrow) Font();
+ ContactNameTextfont->Construct(FONT_STYLE_BOLD, fontSize);
+ FloatDimension textDimension;
+ ContactNameTextfont->GetTextExtent(contactNameStr, contactNameStr.GetLength(), textDimension);
+ delete ContactNameTextfont;
+ float width = 0.0;
+ String countString = L"(" + Integer::ToString(__calllogCount) + L")";
+ float countStringWidth = 0.0;
+ float stringHeight = 0.0;
+ GetTextWidthHeight(countString, fontSize, &countStringWidth, &stringHeight);
+ __pPanelName->SetSize(__pPanelName->GetWidthF(), stringHeight);
+ width = __pPanelName->GetWidthF() - countStringWidth;
+ Label* pLabelName = static_cast<Label*>(GetControl(IDC_LABEL_NAME, true));
+ Label* pLabelCount = static_cast<Label*>(GetControl(IDC_LABEL_NUMBER_COUNT, true));
+ if(pLabelName != null && pLabelCount != null)
+ {
+ pLabelName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelCount->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ pLabelName->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
+ pLabelCount->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
+ if(textDimension.width > width)
+ {
+ pLabelName->SetBounds(FloatRectangle(0, 0, width, __pPanelName->GetHeightF()));
+ pLabelName->SetText(contactNameStr);
+ pLabelName->SetShowState(true);
+ pLabelName->Invalidate(false);
+
+ pLabelCount->SetBounds(FloatRectangle(width, 0, __pPanelName->GetWidthF() - countStringWidth, __pPanelName->GetHeightF()));
+ pLabelCount->SetText(countString);
+ pLabelCount->SetShowState(true);
+ pLabelCount->Invalidate(false);
+ }
+ else
+ {
+ contactNameStr.Format(100, L"%ls (%d)",__contactName.GetPointer(), __calllogCount);
+ pLabelName->SetBounds(FloatRectangle(0, 0, __pPanelName->GetWidthF(), __pPanelName->GetHeightF()));
+ pLabelName->SetText(contactNameStr);
+ pLabelName->SetShowState(true);
+ pLabelName->Invalidate(false);
+ pLabelCount->SetShowState(false);
+ }
+ }
+
+ __pPanelName->SetShowState(true);
+ __pPanelName->Invalidate(true);
+ __pLabelNumber->SetText(__number);
+ __pLabelNumber->SetShowState(true);
+ __pLabelNumber->Invalidate(false);
+ __pPanelNumberUnsaved->SetShowState(false);
+ __pPanelNumberUnsaved->Invalidate(true);
+ __pLabelBlocked->SetShowState(false);
+ __pLabelBlocked->Invalidate(false);
+ }
+ else
+ {
+ String contactNameStr;
+ contactNameStr.Format(100, L"%ls",__number.GetPointer(), __calllogCount);
+ Font* ContactNameTextfont = new (std::nothrow) Font();
+ ContactNameTextfont->Construct(FONT_STYLE_BOLD, fontSize);
+ FloatDimension textDimension;
+ ContactNameTextfont->GetTextExtent(contactNameStr, contactNameStr.GetLength(), textDimension);
+ delete ContactNameTextfont;
+ float width = 0.0;
+ String countString = L" (" + Integer::ToString(__calllogCount) + L")";
+ float countStringWidth = 0.0;
+ float stringHeight = 0.0;
+ GetTextWidthHeight(countString, fontSize, &countStringWidth, &stringHeight);
+ __pPanelNumberUnsaved->SetSize(__pPanelNumberUnsaved->GetWidthF(), stringHeight);
+ width = __pPanelNumberUnsaved->GetWidthF() - countStringWidth;
+ Label* pLabelNumber = static_cast<Label*>(GetControl(IDC_LABEL_UNSAVED_NUMBER, true));
+ Label* pLabelCount = static_cast<Label*>(GetControl(IDC_LABEL_COUNT, true));
+
+ if(pLabelNumber != null && pLabelCount != null)
+ {
+ pLabelNumber->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelCount->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ pLabelNumber->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
+ pLabelCount->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
+ if(textDimension.width > width)
+ {
+ pLabelNumber->SetBounds(FloatRectangle(0, 0, width, __pPanelNumberUnsaved->GetHeightF()));
+ pLabelNumber->SetText(contactNameStr);
+ pLabelNumber->SetShowState(true);
+ pLabelNumber->Invalidate(false);
+
+ pLabelCount->SetBounds(FloatRectangle(width, 0, __pPanelNumberUnsaved->GetWidthF() - countStringWidth, __pPanelNumberUnsaved->GetHeightF()));
+ pLabelCount->SetText(countString);
+ pLabelCount->SetShowState(true);
+ pLabelCount->Invalidate(false);
+ }
+ else
+ {
+ pLabelNumber->SetBounds(FloatRectangle(0, 0, __pPanelNumberUnsaved->GetWidthF(), __pPanelNumberUnsaved->GetHeightF()));
+ contactNameStr.Format(100, L"%ls (%d)",__number.GetPointer(), __calllogCount);
+ pLabelNumber->SetText(contactNameStr);
+ pLabelNumber->SetShowState(true);
+ pLabelNumber->Invalidate(false);
+ pLabelCount->SetShowState(false);
+ }
+ }
+
+ __pPanelNumberUnsaved->SetShowState(true);
+ __pPanelNumberUnsaved->Invalidate(true);
+ __pPanelName->SetShowState(false);
+ __pPanelName->Invalidate(true);
+ __pLabelNumber->SetShowState(false);
+ __pLabelNumber->Invalidate(false);
+ __pButtonContactImage->SetShowState(false);
+ __pButtonContactImage->Invalidate(true);
+ }
+ }
+}
+
+void
+DlLogsDetailForm::GetTextWidthHeight(String str, float fontSize, float *width, float *height)
+{
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(str);
+ Font* ContactNameTextfont = new (std::nothrow) Font();
+ ContactNameTextfont->Construct(FONT_STYLE_BOLD, fontSize);
+ FloatDimension textDimension;
+ ContactNameTextfont->GetTextExtent(str, str.GetLength(), textDimension);
+ *width = textDimension.width;
+ *height = textDimension.height;
+ delete ContactNameTextfont;
+ delete pTextElement;
+}
+
+void
+DlLogsDetailForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->RemoveAppStateChangeListener(*this);
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+ SetSceneVisible(false);
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ if (__pDataProvider != null)
+ {
+ __pDataProvider->ResetDetailsList();
+ }
+ if (__pLogPresentor != null)
+ {
+ __pLogPresentor = null;
+ }
+ RemoveOrientationEventListener(*this);
+}
+
+
+void
+DlLogsDetailForm::SetFormMode(bool editMode)
+{
+ AppLogDebug("Enter");
+ if (editMode == false)
+ {
+ //UpdateForm();
+ __isEditMode = false;
+ __pSelectAll->SetShowState(false);
+ __pDataProvider->SetViewMode(false);
+ __pFormFooter->RemoveItemAt(1);
+ if (__isPresentInContacts == false)
+ {
+ __pLabelBlocked->SetShowState(true);
+ __pPanelNumberUnsaved->SetShowState(true);
+ __pPanelName->SetShowState(false);
+ __pLabelNumber->SetShowState(false);
+ __pButtonContactImage->SetShowState(false);
+ }
+ else
+ {
+ __pPanelNumberUnsaved->SetShowState(false);
+ __pLabelBlocked->SetShowState(false);
+ __pPanelName->SetShowState(true);
+ __pLabelNumber->SetShowState(true);
+ __pButtonContactImage->SetShowState(true);
+ }
+ __pButtonCall->SetShowState(true);
+ __pButtonMessage->SetShowState(true);
+ int listY = __pButtonContactImage->GetBounds().height + __pButtonMessage->GetBounds().height + 40;
+ __listHeight = GetClientAreaBounds().height - __pButtonContactImage->GetBounds().height - __pButtonMessage->GetBounds().height - 40;
+ __pList->SetBounds(Rectangle(0, listY, GetClientAreaBounds().width, __listHeight));
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+ __pFormFooter->SetItemEnabled(0, true);
+ __pList->RemoveGroupedListViewItemEventListener(*this);
+ __pSelectAll->SetSelected(false);
+ __pSelectedLabel->SetShowState(false);
+ __pSelectedLabel->Invalidate(false);
+ __pList->Invalidate(true);
+ }
+ else
+ {
+ __isEditMode = true;
+ __pSelectAll->SetShowState(true);
+ __pDataProvider->SetViewMode(true);
+ __pList->AddGroupedListViewItemEventListener(*this);
+ if (__isPresentInContacts == false)
+ {
+ __pLabelBlocked->SetShowState(false);
+ __pPanelNumberUnsaved->SetShowState(false);
+ __pPanelName->SetShowState(false);
+ __pLabelNumber->SetShowState(false);
+ __pButtonContactImage->SetShowState(false);
+ }
+ else
+ {
+ __pPanelNumberUnsaved->SetShowState(false);
+ __pLabelBlocked->SetShowState(false);
+ __pPanelName->SetShowState(false);
+ __pLabelNumber->SetShowState(false);
+ __pButtonContactImage->SetShowState(false);
+ }
+ __pButtonCall->SetShowState(false);
+ __pButtonMessage->SetShowState(false);
+ __pList->SetBounds(GetClientAreaBounds().x, __pSelectAll->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - (__pSelectAll->GetHeight()+__pSelectedLabel->GetHeight()));
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+ __pFormFooter->SetItemEnabled(0, false);
+ __selectedItemCount = 0;
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ __pSelectedLabel->SetShowState(true);
+ __pSelectedLabel->Invalidate(false);
+ }
+ __pSelectAll->Invalidate(true);
+ if(__number.Contains(L"@"))
+ {
+ __pButtonCall->SetEnabled(false);
+ }
+ else
+ {
+ __pButtonCall->SetEnabled(true);
+ }
+ __pButtonCall->Draw();
+ __pFormFooter->Draw();
+}
+
+void
+DlLogsDetailForm::UnCheckAllItems(void)
+{
+ AppLogDebug("Enter");
+ SetListItemSelectStatus(false);
+ __selectedItemCount = 0;
+}
+void
+DlLogsDetailForm::SetAllListItems(bool checked)
+{
+ AppLogDebug("Enter");
+ SetListItemSelectStatus(true);
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+ __selectedItemCount = __listItemCount;
+ String text;
+ String selItemStr = L"";
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __listItemCount);
+ __pSelectedLabel->SetText(text);
+ __pSelectedLabel->Invalidate(false);
+}
+
+void
+DlLogsDetailForm::SetListItemSelectStatus(bool status)
+{
+ int groupIndex = 0;
+ int itemIndex = 0;
+ int itemCount = 0;
+
+ __isSelectAll = status;
+ CallLogDetails* pCalllogInfo = null;
+ for (; groupIndex < __pList->GetGroupCount(); groupIndex++)
+ {
+ itemCount = __pList->GetItemCountAt(groupIndex);
+ for (itemIndex = 0; itemIndex < itemCount; itemIndex++)
+ {
+ __pList->SetItemChecked(groupIndex, itemIndex, status);
+ if(status == true)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Add(new Integer(pCalllogInfo->GetCalllogDbId()));
+ }
+ }
+ }
+ __pFormFooter->SetItemEnabled(0, status);
+ __pFormFooter->Invalidate(true);
+ __pList->Invalidate(true);
+}
+
+void
+DlLogsDetailForm::OnFormBackRequested(Form& source)
+{
+ AppLog("Enter");
+ if(__isContactAppControlLaunched == true || __isMsgAppControlLaunched == true || __isCallAppControlLaunched == true)
+ {
+ return;
+ }
+ if(__isEditMode == true)
+ {
+ __pCallLogId->RemoveAll();
+ SetFormMode(false);
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ __pList->UpdateList();
+ }
+ else
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ }
+}
+
+void
+DlLogsDetailForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ if (__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl request completed.
+ __isMsgAppControlLaunched = false;
+ }
+ if (__isCallAppControlLaunched == true)
+ {
+ //Call AppControl request completed.
+ __isCallAppControlLaunched = false;
+ }
+}
+void
+DlLogsDetailForm::ShowDeletePopup(void)
+{
+ __isDeleteInProgress = true;
+ if (__pDeletePopup != null)
+ {
+ delete __pDeletePopup;
+ __pDeletePopup = null;
+ }
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+ __pDeletePopup = new (std::nothrow) Popup();
+ __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
+ __pDeletePopup->AddWindowEventListener(*this);
+
+ Rectangle clientBounds = __pDeletePopup->GetClientAreaBounds();
+
+ Label* pLabelTitle = new (std::nothrow) Label();
+ pLabelTitle->Construct(Rectangle(0, Y_DELETE_POPUP_TITLE, clientBounds.width, H_DELETE_POPUP_ELEMENT), AppUtility::GetResourceString(IDS_DELETING_CALL_LOGS));
+ pLabelTitle->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelTitle->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_BOLD);
+ pLabelTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ __pDeletePopup->AddControl(*pLabelTitle);
+
+ Progress* pProgress = new (std::nothrow) Progress();
+ pProgress->Construct(Rectangle(0, Y_DELETE_POPUP_TITLE + H_DELETE_POPUP_ELEMENT, clientBounds.width, H_DELETE_POPUP_PROGRESS), 0, __selectedItemCount);
+
+ __pDeletePopup->AddControl(*pProgress);
+
+ Label* pLabelPercentage = new (std::nothrow) Label();
+ pLabelPercentage->Construct(Rectangle(0, pProgress->GetY() + pProgress->GetHeight(), clientBounds.width / 2, H_DELETE_POPUP_ELEMENT), Integer::ToString(pProgress->GetPercentComplete()) + L"%");
+ pLabelPercentage->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelPercentage->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelPercentage->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+
+ __pDeletePopup->AddControl(*pLabelPercentage);
+
+ String currentOfTotal(Integer::ToString(pProgress->GetValue()) + L" / " + Integer::ToString(__selectedItemCount));
+ Label* pLabelTotal = new (std::nothrow) Label();
+ pLabelTotal->Construct(Rectangle(clientBounds.width / 2, pLabelPercentage->GetY(), clientBounds.width / 2, H_DELETE_POPUP_ELEMENT), currentOfTotal);
+ pLabelTotal->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+ pLabelTotal->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelTotal->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+
+ __pDeletePopup->AddControl(*pLabelTotal);
+
+ Button* pCancelButton = new (std::nothrow) Button();
+ pCancelButton->Construct(Rectangle((clientBounds.width - W_DELETE_POPUP_CANCEL_BUTTON) / 2, Y_DELETE_POPUP_CANCEL_BUTTON, W_DELETE_POPUP_CANCEL_BUTTON, H_DELETE_POPUP_CANCEL_BUTTON));
+ pCancelButton->SetText(AppUtility::GetResourceString(IDS_CANCEL_DELETING_CALL_LOGS));
+ pCancelButton->SetActionId(IDA_POPUP_DELETE_CANCEL);
+ pCancelButton->AddActionEventListener(*this);
+
+ __pDeletePopup->AddControl(pCancelButton);
+ __pDeletePopup->Show();
+}
+
+void
+DlLogsDetailForm::OnWindowActivated (const Tizen::Ui::Window &source)
+{
+ __deleteLogsTimer.Start(1);
+}
+
+void
+DlLogsDetailForm::OnTimerExpired(Tizen::Base::Runtime::Timer &timer)
+{
+ Progress* pProgress = static_cast<Progress *>(__pDeletePopup->GetControl(1));
+
+ pProgress->SetValue(pProgress->GetValue() + 1);
+ pProgress->Invalidate(false);
+
+ Label* pLabelPercentage = static_cast<Label *>(__pDeletePopup->GetControl(2));
+
+ pLabelPercentage->SetText(Integer::ToString(pProgress->GetPercentComplete()) + L"%");
+ pLabelPercentage->Invalidate(false);
+
+ Label* pLabelTotal = static_cast<Label *>(__pDeletePopup->GetControl(3));
+
+ String currentOfTotal = pLabelTotal->GetText();
+ currentOfTotal.Remove(0, Integer::ToString(pProgress->GetValue() - 1).GetLength());
+ currentOfTotal.Insert(Integer::ToString(pProgress->GetValue()), 0);
+ pLabelTotal->SetText(currentOfTotal);
+ pLabelTotal->Invalidate(false);
+
+ if (RemoveLogsList() == E_SUCCESS)
+ {
+ __deleteLogsTimer.Start(1);
+ }
+ else
+ {
+ HideDeletePopup();
+ }
+}
+
+result
+DlLogsDetailForm::RemoveLogsList()
+{
+ result r = E_SUCCESS;
+
+ CallLogDetails* pCalllogInfo = null;
+ for(int groupIndex = __deleteGroupIndex; groupIndex < __pList->GetGroupCount(); groupIndex++)
+ {
+ int itemCount = __pList->GetItemCountAt(groupIndex);
+ for(int itemIndex = __deleteItemIndex; itemIndex < itemCount; itemIndex++)
+ {
+ bool isSelected = __pList->IsItemChecked(groupIndex, itemIndex);
+ if(isSelected == true)
+ {
+ __pList->SetItemChecked(groupIndex, itemIndex,false);
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ if(pCalllogInfo != null)
+ {
+ __pLogPresentor->DeleteCalllogByDbId(pCalllogInfo->GetCalllogDbId());
+ __pCallLogId->Remove(*(new Integer(pCalllogInfo->GetCalllogDbId())));
+ __deleteGroupIndex = groupIndex;
+ __deleteItemIndex = ++itemIndex;
+ return r;
+ }
+ }
+ }
+ __deleteItemIndex = 0;
+ }
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+
+ return E_FAILURE;
+}
+
+void
+DlLogsDetailForm::HideDeletePopup(void)
+{
+ __isDeleteInProgress = false;
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+ __isEditMode = false;
+ if (__pDeletePopup != null)
+ {
+ __pDeletePopup->SetShowState(false);
+ __pDeletePopup->Invalidate(true);
+ }
+ if ((__calllogListByNum != null) && (__calllogListByNum->GetCount() != __selectedItemCount))
+ {
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ SetFormMode(false);
+ __pList->UpdateList();
+ }
+ else
+ {
+ SetFormMode(false);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ }
+}
+
+void
+DlLogsDetailForm::OnForeground(void)
+{
+ SetSceneVisible(true);
+ if(__calllogCount == 0)
+ {
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ SetFormMode(false);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ return;
+ }
+ if(__isContactAppControlLaunched == false)
+ {
+ ManageItemSelection();
+ }
+ else
+ {
+ __isContactAppControlLaunched = false;
+ }
+ if(__isEditMode == false)
+ {
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ __pLogPresentor->ResetAndNotifyCalllogData();
+ }
+ if (__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl request completed.
+ __isMsgAppControlLaunched = false;
+ }
+ if(__isCallAppControlLaunched == true)
+ {
+ __isCallAppControlLaunched = false;
+ }
+ //fix for N_SE-55993 start
+ if ((__selectedItemCount == 0 || __pLogPresentor->GetCalllogCountByNumber() == 0)
+ && __pConfirmationDeletePopup != null
+ && __pConfirmationDeletePopup->GetShowState() == true)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ __pFormFooter->SetItemEnabled(0, false);
+ __pFormFooter->Invalidate(true);
+ }
+ //fix for N_SE-55993 end
+
+}
+
+void
+DlLogsDetailForm::OnBackground(void)
+{
+ if(__pLogsBlockPopup != null)
+ {
+ delete __pLogsBlockPopup;
+ __pLogsBlockPopup = null;
+ }
+ SetSceneVisible(false);
+}
+
+void
+DlLogsDetailForm::OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state)
+{
+ String text;
+ if (state == LIST_ITEM_STATUS_CHECKED)
+ {
+ __selectedItemCount++;
+ StoreItemselection(groupIndex, itemIndex, elementId, state);
+ }
+ else if (state == LIST_ITEM_STATUS_UNCHECKED)
+ {
+ __selectedItemCount--;
+ StoreItemselection(groupIndex, itemIndex, elementId, state);
+ }
+
+ if (__selectedItemCount == __listItemCount)
+ {
+ __pSelectAll->SetSelected(true);
+ }
+ else
+ {
+ __pSelectAll->SetSelected(false);
+ }
+ __pSelectAll->Invalidate(false);
+ if (__selectedItemCount == 0)
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ String selItemStr = L"";
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __selectedItemCount);
+ __pSelectedLabel->SetText(text);
+ }
+ __pFormFooter->Draw();
+ __pSelectedLabel->Invalidate(false);
+}
+
+void
+DlLogsDetailForm::OnCalllogChanged(void)
+{
+ if(__isEditMode == false)
+ {
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ SetFormMode(false);
+ }
+ //Update the log list for all MO/MT/MSG if the log list is in edit mode and delete is not on progress
+ if(__isEditMode == true && __isDeleteInProgress == false)
+ {
+ GetUpdatedListFromDatabase();
+ UpdateForm();
+ }
+ if(IsScecneVisible() == true && __isDeleteInProgress == false)
+ {
+ ManageItemSelection();
+ }
+}
+
+void
+DlLogsDetailForm::StoreItemselection(int groupIndex, int itemIndex, int elementId, ListItemStatus state)
+{
+ CallLogDetails* pCalllogInfo = null;
+ if (state == LIST_ITEM_STATUS_CHECKED)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Add(new Integer(pCalllogInfo->GetCalllogDbId()));
+ }
+ else if (state == LIST_ITEM_STATUS_UNCHECKED)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Remove(*(new Integer(pCalllogInfo->GetCalllogDbId())));
+ }
+}
+void
+DlLogsDetailForm:: ManageItemSelection(void)
+{
+ if(__isEditMode == true && __selectedItemCount > 0 && __listItemCount != __pLogPresentor->GetCalllogCountByNumber())
+ {
+ UnCheckAllItems();
+ int itemCount = 0;
+ CallLogDetails* pCalllogInfo = null;
+ for(int groupIndex = 0; groupIndex < __pList->GetGroupCount(); groupIndex++)
+ {
+ itemCount = __pList->GetItemCountAt(groupIndex);
+ for(int itemIndex = itemCount-1; itemIndex >=0 ; itemIndex--)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ if(__pCallLogId->Contains(*(new Integer(pCalllogInfo->GetCalllogDbId()))))
+ {
+ __pList->SetItemChecked(groupIndex,itemIndex,true);
+ ++__selectedItemCount;
+ }
+ }
+ }
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+ if(__selectedItemCount == __listItemCount)
+ {
+ __pSelectAll->SetSelected(true);
+ }
+ else
+ {
+ __pSelectAll->SetSelected(false);
+ }
+ String selItemStr = L"";
+ String text;
+ if(__selectedItemCount == 0)
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ }
+ else
+ {
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ __pFormFooter->SetItemEnabled(0, true);
+ text.Format(100, selItemStr.GetPointer(), __selectedItemCount);
+ __pSelectedLabel->SetText(text);
+ }
+ __pSelectedLabel->Invalidate(false);
+ __pSelectAll->SetShowState(true);
+ __pLabelBlocked->SetShowState(false);
+ __pPanelNumberUnsaved->SetShowState(false);
+ __pPanelName->SetShowState(false);
+ __pLabelNumber->SetShowState(false);
+ __pButtonContactImage->SetShowState(false);
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+ }
+ __listItemCount = __pLogPresentor->GetCalllogCountByNumber();
+}
+
+bool
+DlLogsDetailForm::IsScecneVisible()
+{
+ AppLogDebug("Enter");
+ return __isSceneVisible;
+}
+
+
+void
+DlLogsDetailForm::SetSceneVisible(bool sceneMode)
+{
+ AppLogDebug("Enter");
+ __isSceneVisible = sceneMode;
+}
+
+void
+DlLogsDetailForm::ShowBlockPopup(void)
+{
+ if(__pLogsBlockPopup != null)
+ {
+ delete __pLogsBlockPopup;
+ __pLogsBlockPopup = null;
+ }
+ SettingsPresentationModel* pSettingsPresentationModel = SettingsPresentationModel::GetInstance();
+ __isCallBeRejected = pSettingsPresentationModel->IsCallToBeRejected(__number);
+
+ __isMsgBeRejected = SettingsPresentationModel::GetInstance()->GetMsgFilterListIndex(__number);
+ __pLogsBlockPopup = new (std::nothrow) CallLogViewByPopup(*this);
+ __pLogsBlockPopup->ConstructBlockPopup(__number, __isCallBeRejected, __isMsgBeRejected);
+ __pLogsBlockPopup->SetShowState(true);
+ __pLogsBlockPopup->Draw();
+ __pLogsBlockPopup->Show();
+}
+
+void
+DlLogsDetailForm::OnItemSelected()
+{
+ SendUserEvent(REQUEST_CHANGE_BLOCK, null);
+}
+
+void
+DlLogsDetailForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ switch(requestId)
+ {
+ case REQUEST_CHANGE_BLOCK:
+ {
+ if(__pLogsBlockPopup->GetCallBlock() == true)
+ {
+ if(IsValidCallNumber(__number) == true)
+ {
+ result r = SettingsPresentationModel::GetInstance()->AddToCallRejectList(__number, CALL_REJECT_MATCH_EXACTLY,true);
+ if(r == E_OBJ_ALREADY_EXIST)
+ {
+ IListT<CallRejectInfo>* pRejList = SettingsPresentationModel::GetInstance()->GetCallRejectList();
+ IEnumeratorT<CallRejectInfo>* pRejEnum =pRejList->GetEnumeratorN();
+ while(pRejEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo rejectInfo;
+ pRejEnum->GetCurrent(rejectInfo);
+ if(rejectInfo.phoneNumber.Equals(__number))
+ {
+ SettingsPresentationModel::GetInstance()->UpdateCallRejectRow(rejectInfo.rowId,rejectInfo.phoneNumber,true,rejectInfo.rejectCondition);
+ }
+ }
+ delete pRejEnum;
+ }
+ UpdateForm();
+ }
+ else
+ {
+ ShowInvalidNumberMessageBox(__number);
+ }
+
+ }
+
+ if(__pLogsBlockPopup->GetMessageBlock() == true)
+ {
+ AppLog("block message");
+ if(IsValidMessageNumber(__number) == true)
+ {
+ SettingsPresentationModel::GetInstance()->AddToMessageRejectList(__number, MSG_FILTER_BY_ADDRESS_SAME);
+ UpdateForm();
+ }
+ else
+ {
+ ShowInvalidMessageNumberMessageBox(__number);
+ }
+
+ }
+ }
+ break;
+ }
+}
+
+void
+DlLogsDetailForm::ShowInvalidNumberMessageBox(String& number)
+{
+ // Creates an instance of MessageBox
+ MessageBox invalidNumberMsgBox;
+ String messageInvalid;
+ messageInvalid.Append(number +" " + AppUtility::GetResourceString(IDS_CALL_NUMBER_IS_INVALID));
+ invalidNumberMsgBox.Construct(AppUtility::GetResourceString(IDS_INVALID_NUMBER_ERROR_MSG), messageInvalid, MSGBOX_STYLE_NONE, 2000);
+
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ invalidNumberMsgBox.ShowAndWait(modalResult);
+}
+
+void
+DlLogsDetailForm::ShowInvalidMessageNumberMessageBox(String& number)
+{
+ // Creates an instance of MessageBox
+ MessageBox invalidNumberMsgBox;
+ String messageInvalid;
+ messageInvalid.Append(number +" " + AppUtility::GetResourceString(IDS_MESSAGE_NUMBER_IS_INVALID));
+ invalidNumberMsgBox.Construct(AppUtility::GetResourceString(IDS_INVALID_NUMBER_ERROR_MSG), messageInvalid, MSGBOX_STYLE_NONE, 2000);
+
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ invalidNumberMsgBox.ShowAndWait(modalResult);
+}
+
+void
+DlLogsDetailForm::ShowDuplicateErrorMessageBox(String& message)
+{
+ // Creates an instance of MessageBox
+ MessageBox duplicateMsgBox;
+ duplicateMsgBox.Construct(L"", message, MSGBOX_STYLE_NONE, 2000);
+
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ duplicateMsgBox.ShowAndWait(modalResult);
+}
+
+void
+DlLogsDetailForm::ViewContactDetail(void)
+{
+ AppLogDebug("Enter");
+ //Launch Contact AppControl
+ Contact* pContact = null;
+ AppControl* pAc = null;
+ result r = E_SUCCESS;
+ HashMap extraData;
+ extraData.Construct();
+ Addressbook* pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if (pAddressBook != null)
+ {
+ IList* pNumberContactsList = null;
+ if(__number.Contains(L"@"))
+ {
+ pNumberContactsList = pAddressBook->SearchContactsByEmailN(__number);
+ }
+ else
+ {
+ pNumberContactsList = pAddressBook->SearchContactsByPhoneNumberN(__number);
+ }
+ if(pNumberContactsList != null)
+ {
+ IEnumerator* pContactListEnum = pNumberContactsList->GetEnumeratorN();
+ while (pContactListEnum->MoveNext() == E_SUCCESS)
+ {
+ pContact = static_cast<Contact*>(pContactListEnum->GetCurrent());
+ if (pContact != null)
+ {
+ IList* pPhoneNumberList = null;
+ if(__number.Contains(L"@"))
+ {
+ pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_EMAILS);
+ if(pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ Email* pPhoneNumber = (Email*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetEmail().Equals(__number))
+ {
+ //save newly fetched contact info.
+ AppLogDebug("View Contact");
+ //View Contact
+ String idVal;
+ idVal.Append(pContact->GetRecordId());
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), new (std::nothrow) String(idVal));
+ extraData.Add(new (std::nothrow) String(CONTACTS_ID_KEY), new (std::nothrow) String(idVal));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
+ pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_VIEW);
+
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ __isContactAppControlLaunched = true;
+ delete pAc;
+ }
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ if(__isContactAppControlLaunched == true)
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetPhoneNumber().Equals(__number))
+ {
+ //save newly fetched contact info.
+ AppLogDebug("View Contact");
+ //View Contact
+ String idVal;
+ idVal.Append(pContact->GetRecordId());
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), new (std::nothrow) String(idVal));
+ extraData.Add(new (std::nothrow) String(CONTACTS_ID_KEY), new (std::nothrow) String(idVal));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
+ pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_VIEW);
+
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ __isContactAppControlLaunched = true;
+ delete pAc;
+ }
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ if(__isContactAppControlLaunched == true)
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void
+DlLogsDetailForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ if((GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE )&& __isEditMode == true)
+ {
+ __pList->SetBounds(GetClientAreaBounds().x, __pSelectAll->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - (__pSelectAll->GetHeight()+__pSelectedLabel->GetHeight()));
+ }
+ else if((GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE) && __isEditMode == false)
+ {
+ int listY = __pButtonContactImage->GetBounds().height + __pButtonMessage->GetBounds().height + 40;
+ int listHeight = GetClientAreaBounds().height - __pButtonContactImage->GetBounds().height - __pButtonMessage->GetBounds().height - 40;
+ __pList->SetBounds(Rectangle(0, listY, GetClientAreaBounds().width, listHeight));
+ }
+ else if(__isEditMode == true)
+ {
+ __pList->SetBounds(GetClientAreaBounds().x, __pSelectAll->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - (__pSelectAll->GetHeight()+__pSelectedLabel->GetHeight()));
+ }
+ else
+ {
+ int listHeight = GetClientAreaBounds().height - __pButtonContactImage->GetBounds().height - __pButtonMessage->GetBounds().height - 40;
+ int listY = __pButtonContactImage->GetBounds().height + __pButtonMessage->GetBounds().height + 40;
+ __pList->SetBounds(Rectangle(0, listY, GetClientAreaBounds().width, listHeight));
+ }
+ ManageUserDetail();
+}
+
+void
+DlLogsDetailForm::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLog("Enter");
+ if(key.Equals(String(SETTING_INFO_KEY_TIME_FORMAT)) == true)
+ {
+ __pList->UpdateList();
+ }
+ AppLog("Exit");
+}
+
+void
+DlLogsDetailForm::OnFormMenuRequested(Controls::Form& source)
+{
+ if(__isEditMode == false)
+ {
+ ShowOptionsMenu();
+ }
+}
+
+void
+DlLogsDetailForm::ShowOptionsMenu()
+{
+ if(__pOptionMenu != null)
+ {
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->AddActionEventListener(*this);
+ __pOptionMenu->RemoveAllItems();
+
+ if(__isPresentInContacts == true)
+ {
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_CONTEXTMENU_ITEM_DETAILS), IDA_CONTEXTMENU_DETAILS);
+ if(!(__number.Contains(L"@")))
+ {
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_CONTEXTMENU_ITEM_BLOCK), IDA_CONTEXTMENU_BLOCK);
+ }
+ }
+ else
+ {
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS), IDA_CONTEXTMENU_ADDTOCONTACT);
+ if(!(__number.Contains(L"@")))
+ {
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_CONTEXTMENU_ITEM_BLOCK), IDA_CONTEXTMENU_BLOCK);
+ }
+ }
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+}
+
+bool
+DlLogsDetailForm::IsValidCallNumber(const String& phoneNumber)
+{
+ AppLogDebug("Enter");
+ if (phoneNumber.GetLength() != 0)
+ {
+ //Check if number starts with pause(; or p) if so its a invalid number
+ //so just go to previous form without saving
+ String phoneNumberPattern(L";|p");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ bool resultMatch = checkPhoneNumber.Match(phoneNumber,false);
+ if(resultMatch == true) // if it starts with ; or p go to previous form without saving
+ {
+ return false;
+ }
+ }
+ return true;
+}
+bool
+DlLogsDetailForm::IsValidMessageNumber(const String& phoneNumber)
+{
+ AppLogDebug("ENTER");
+ bool validPhoneNumber(false);
+ if (phoneNumber.GetLength() > 2 && phoneNumber.GetLength() <= 20)
+ {
+ validPhoneNumber = true;
+ String strPlus(L"+");
+ int index(0);
+ wchar_t wChar;
+ phoneNumber.GetCharAt(index, wChar);
+ if (strPlus.CompareTo(String(wChar)) == 0)
+ {
+ index++;
+ }
+ while (index < phoneNumber.GetLength())
+ {
+ phoneNumber.GetCharAt(index, wChar);
+ if (!iswdigit(wChar) /*&& (*pPhoneNumber == '*') && *pPhoneNumber == '#'*/)
+ {
+ validPhoneNumber = false;
+ break;
+ }
+ ++index;
+ }
+ }
+ AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
+ return validPhoneNumber;
+}
+
+bool
+DlLogsDetailForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pConfirmationDeletePopup != null && __pConfirmationDeletePopup->GetShowState() == true)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+DlLogsDetailForm::ShowDeleteConfirmationPopup()
+{
+ if(__pConfirmationDeletePopup != null)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ }
+
+ __pConfirmationDeletePopup = new (std::nothrow) Popup();
+ __pConfirmationDeletePopup->Construct(false, Dimension(688,230));
+ __pConfirmationDeletePopup->SetPropagatedKeyEventListener(this);
+ Label *pDeleteTitle = new Label();
+ pDeleteTitle->Construct(Rectangle(16,32,656,80), AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+ pDeleteTitle->SetTextConfig(38, LABEL_TEXT_STYLE_BOLD);
+ pDeleteTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pDeleteTitle->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ __pConfirmationDeletePopup->AddControl(pDeleteTitle);
+
+ //Yes button
+ Rectangle yesRect(354, 132, 318, 74);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_YES));
+ pYesButton->SetActionId(IDA_POPUP_DELETE_YES);
+ pYesButton->AddActionEventListener(*this);
+ pYesButton->SetColor(BUTTON_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ pYesButton->SetColor(BUTTON_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pConfirmationDeletePopup->AddControl(pYesButton);
+
+ //No button
+ Rectangle noRect(16, 132, 318, 74);
+ Button* pNoButton = new Button();
+ pNoButton->Construct(noRect, AppUtility::GetResourceString(IDS_DELETE_NO));
+ pNoButton->SetActionId(IDA_POPUP_DELETE_NO);
+ pNoButton->AddActionEventListener(*this);
+ __pConfirmationDeletePopup->AddControl(pNoButton);
+ __pConfirmationDeletePopup->SetShowState(true);
+ __pConfirmationDeletePopup->Show();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnLogsDetailItemProvider.cpp
+ * @brief Calllog detail item provider class
+ */
+#include <FGraphics.h>
+#include <FUi.h>
+#include <FUiControl.h>
+#include <FBase.h>
+#include <FMedia.h>
+#include <FApp.h>
+#include <FLocales.h>
+#include <FSystem.h>
+#include "PhnAppUtility.h"
+#include "PhnLogsDetailItemProvider.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Locales;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+
+const int LogsDetailItemProvider::ID_NAME_STRING = 100;
+const int LogsDetailItemProvider::ID_NUMBER_STRING = 101;
+const int LogsDetailItemProvider::ID_TIME_STRING = 102;
+const int LogsDetailItemProvider::ID_CALLTYPE_BITMAP = 104;
+
+const int LogsDetailItemProvider::X_TEXT_LINE1_ITEM = 16;
+const int LogsDetailItemProvider::Y_TEXT_LINE1_ITEM = 10;
+const int LogsDetailItemProvider::H_TEXT_LINE1_ITEM = 60;
+const int LogsDetailItemProvider::W_TEXT_LINE1_ITEM = 560;
+
+const int LogsDetailItemProvider::X_TEXT_LINE2_ITEM = 64;
+const int LogsDetailItemProvider::Y_TEXT_LINE2_ITEM = 70;
+const int LogsDetailItemProvider::H_TEXT_LINE2_ITEM = 48;
+const int LogsDetailItemProvider::W_TEXT_LINE2_ITEM = 456;
+
+const int LogsDetailItemProvider::X_TEXT_TIME_ITEM = 600;
+const int LogsDetailItemProvider::Y_TEXT_TIME_ITEM = 70;
+const int LogsDetailItemProvider::H_TEXT_TIME_ITEM = 48;
+const int LogsDetailItemProvider::W_TEXT_TIME_ITEM = 168;
+
+
+const int LogsDetailItemProvider::X_CALLTYPE_BITMAP_ITEM = 16;
+const int LogsDetailItemProvider::Y_CALLTYPE_BITMAP_ITEM = 70 + 8;
+const int LogsDetailItemProvider::H_CALLTYPE_BITMAP_ITEM = 32;
+const int LogsDetailItemProvider::W_CALLTYPE_BITMAP_ITEM = 32;
+
+static const int H_CALLLOGDETAIL_ITEM = 128;
+static const int MAX_TWELVEHOUR_FORMAT = 12;
+static const int MAX_TWELVEHOUR_FORMAT_LENGTH = 9;
+static const int MAX_TWENTYFOUR_FORMAT_LENGTH = 6;
+
+CallLogDetailGroup::CallLogDetailGroup()
+{
+ __pGroupElements = null;
+ __groupTitleText = null;
+}
+
+CallLogDetailGroup::~CallLogDetailGroup()
+{
+
+}
+
+ArrayList*
+CallLogDetailGroup::GetLogData(void)
+{
+ return __pGroupElements;
+}
+
+String
+CallLogDetailGroup::GetTitleText(void)
+{
+ return __groupTitleText;
+}
+
+void
+CallLogDetailGroup::SetLogData(ArrayList* pData)
+{
+ __pGroupElements = pData;
+}
+
+void
+CallLogDetailGroup::SetTitleText(String titleText)
+{
+ __groupTitleText = titleText;
+}
+
+LogsDetailItemProvider::LogsDetailItemProvider()
+{
+ __isEditMode = false;
+ __pCalllogDetailListByNumber = null;
+ __pCallLogDetailGroups = null;
+ __pLogPresentor = CalLogPresentationModel::GetInstance();
+
+ __fontSize = 44.f;
+ __itemHeight = 112.f;
+}
+
+LogsDetailItemProvider::~LogsDetailItemProvider()
+{
+ if(__pCalllogDetailListByNumber != null)
+ {
+ __pCalllogDetailListByNumber->RemoveAll();
+ delete __pCalllogDetailListByNumber;
+ }
+ if(__pCallLogDetailGroups != null)
+ {
+ __pCallLogDetailGroups->RemoveAll();
+ delete __pCallLogDetailGroups;
+ __pCallLogDetailGroups = null;
+ }
+}
+
+void
+LogsDetailItemProvider::CreateCalllogDetailGroups()
+{
+ result r = E_FAILURE;
+ CallLogDetails* pCalllogInfo = null;
+ ArrayList* data = null;
+ DateTime todaysDate;
+ DateTime calllogDate;
+ CallLogDetailGroup* pGroup = null;
+ int detailLogCount = 0;
+ String title;
+
+ if(__pCalllogDetailListByNumber == null)
+ {
+ __pCalllogDetailListByNumber =__pLogPresentor->GetCalllogListByNumValues();
+ }
+
+ if(__pCallLogDetailGroups != null)
+ {
+ ArrayList* pDetailCalllogList = null;
+ CallLogDetailGroup* pGroupInfo = null;
+ for(int index = 0; index < __pCallLogDetailGroups->GetCount(); index++)
+ {
+ pGroupInfo = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(index));
+
+ if(pGroupInfo != null)
+ {
+ pDetailCalllogList = pGroupInfo->GetLogData();
+ if(pDetailCalllogList != null)
+ {
+ pDetailCalllogList->RemoveAll();
+ delete pDetailCalllogList;
+ pDetailCalllogList = null;
+ }
+ delete pGroupInfo;
+ pGroupInfo = null;
+ }
+ }
+ __pCallLogDetailGroups->RemoveAll();
+ delete __pCallLogDetailGroups;
+ __pCallLogDetailGroups = null;
+ }
+
+ __pCallLogDetailGroups = new(std::nothrow) ArrayList();
+ if(__pCallLogDetailGroups == null)
+ {
+ return;
+ }
+ r = __pCallLogDetailGroups->Construct();
+ if(IsFailed(r))
+ {
+ delete __pCallLogDetailGroups;
+ __pCallLogDetailGroups = null;
+ return;
+ }
+
+ detailLogCount =__pCalllogDetailListByNumber->GetCount();
+ GetCurrentDateTime(todaysDate);
+ calllogDate = todaysDate;
+
+
+ for(int index=0; index < detailLogCount; ++index)
+ {
+ data = null;
+ title.Clear();
+ pCalllogInfo = new (std::nothrow) CallLogDetails();
+ if(pCalllogInfo == null)
+ {
+ continue;
+ }
+ __pCalllogDetailListByNumber->GetAt(index, *pCalllogInfo);
+ pCalllogInfo->ConvertTimetoDateTime();
+ calllogDate = pCalllogInfo->GetDateTime();
+
+ int days = GetDaysDifferenceBetweenDates(calllogDate , todaysDate);
+ if(days == 0)
+ {
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_TODAY));
+ }
+ else if(days == 1)
+ {
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_YESTERDAY));
+ }
+ else
+ {
+ title.Format(30,L"%d/%d/%d",calllogDate.GetDay(), calllogDate.GetMonth(), calllogDate.GetYear());
+ }
+
+ if(IsGroupPresent(title) == true)
+ {
+ //Group already present
+ pGroup = GetGroupWithTitle(title);
+ data = pGroup->GetLogData();
+ if(data == null)
+ {
+ data = new ArrayList();
+ data->Construct();
+ }
+ data->Add(*pCalllogInfo);
+ pGroup->SetLogData(data);
+ }
+ else
+ {
+ //Group not present in __pCallLogDetailGroups. So create a new group
+ pGroup = new(std::nothrow) CallLogDetailGroup();
+ if(pGroup == null)
+ {
+ return;
+ }
+ data = new ArrayList();
+ data->Construct();
+ data->Add(*pCalllogInfo);
+ pGroup->SetTitleText(title);
+ pGroup->SetLogData(data);
+ __pCallLogDetailGroups->Add(*pGroup);
+ }
+ }
+}
+
+void
+LogsDetailItemProvider::GetCurrentDateTime(DateTime& dt)
+{
+ DateTime dtNow;
+ LocaleManager localManager;
+ result r = E_FAILURE;
+ TimeZone tz;
+ r = SystemTime::GetCurrentTime(UTC_TIME, dtNow);
+ localManager.Construct();
+ tz = localManager.GetSystemTimeZone();
+ dt = tz.UtcTimeToWallTime(dtNow);
+}
+
+int
+LogsDetailItemProvider::GetDaysDifferenceBetweenDates(DateTime date1, DateTime date2)
+{
+ TimeSpan oneDay(1,0,0,0);
+ TimeSpan timeOfDay = date2.GetTimeOfDay();
+
+ DateTime yesterday = date2;
+ yesterday.Subtract(timeOfDay);
+ yesterday.Subtract(oneDay);
+
+ DateTime today = date2;
+ today.Subtract(timeOfDay);
+
+ if (yesterday <= date1 && date1 < today)
+ {
+ return 1;
+ }
+ else if (today <= date1 && date1 <= date2)
+ {
+ return 0;
+ }
+ else
+ {
+ return 2;
+ }
+}
+
+bool
+LogsDetailItemProvider::IsGroupPresent(String title)
+{
+ if(title.IsEmpty())
+ {
+ return false;
+ }
+ CallLogDetailGroup* pGroupInfo = null;
+ for(int index = 0; index < __pCallLogDetailGroups->GetCount(); index++)
+ {
+ pGroupInfo = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(index));
+ if(pGroupInfo == null)
+ {
+ return false;
+ }
+ String title1;
+ title1 = pGroupInfo->GetTitleText();
+ if( title.CompareTo(title1) == 0)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+CallLogDetailGroup*
+LogsDetailItemProvider::GetGroupWithTitle(String title)
+{
+ CallLogDetailGroup* pGroupInfo = null;
+ for(int index = 0; index < __pCallLogDetailGroups->GetCount(); index++)
+ {
+ pGroupInfo = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(index));
+ if(pGroupInfo == null)
+ {
+ return null;
+ }
+ String title1 = pGroupInfo->GetTitleText();
+ if( title.CompareTo(title1) == 0)
+ {
+ return pGroupInfo;
+ }
+ }
+ return null;
+}
+
+int
+LogsDetailItemProvider::GetGroupCount(void)
+{
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ CreateCalllogDetailGroups();
+ if(__pCallLogDetailGroups != null)
+ {
+ return __pCallLogDetailGroups->GetCount();
+ }
+ return 0;
+}
+
+int
+LogsDetailItemProvider::GetItemCount(int groupIndex)
+{
+ CallLogDetailGroup* group = null;
+ if(__pCallLogDetailGroups != null)
+ {
+ group = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(groupIndex));
+ if(group)
+ {
+ return (group->GetLogData())->GetCount();
+ }
+ }
+ return 0;
+}
+
+Tizen::Ui::Controls::GroupItem*
+LogsDetailItemProvider::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ GroupItem* pItem = new GroupItem();
+ if(pItem == null)
+ {
+ return null;
+ }
+ pItem->Construct(Dimension(itemWidth, 48));
+
+ Bitmap* pBitmap = null;
+ pBitmap = pAppResource->GetBitmapN(IDB_CALLOG_LIST_BG,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ CallLogDetailGroup* group = null;
+ if(__pCallLogDetailGroups != null)
+ {
+ group = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(groupIndex));
+ if(group)
+ {
+ pItem->SetElement(group->GetTitleText(), pBitmap);
+ }
+ else
+ {
+ if(pItem != null)
+ {
+ delete pItem;
+ pItem = null;
+ }
+ return null;
+ }
+ }
+ return pItem;
+}
+
+bool
+LogsDetailItemProvider::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+Tizen::Ui::Controls::ListItemBase*
+LogsDetailItemProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ CallLogDetailGroup* pGroup = null;
+ ArrayList* pCalllogList = null;
+ CallLogDetails* calllogInfo = null;
+ DateTime t;
+ int duration = 0;
+ String dateText(L"");
+ DateTime calllogDate;
+ CallLogType type = CALL_LOG_TYPE_MAX;
+ String durationText;
+ String typeText;
+ Bitmap* pBitmap = null;
+ int hr, min, sec;
+ hr = min = sec = 0;
+
+ if(__pCallLogDetailGroups != null)
+ {
+ pGroup = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(groupIndex));
+ if(pGroup != null)
+ {
+ pCalllogList = pGroup->GetLogData();
+ if(pCalllogList != null)
+ {
+ calllogInfo = static_cast<CallLogDetails*>(pCalllogList->GetAt(itemIndex));
+ }
+ }
+ }
+ if(calllogInfo != null)
+ {
+ duration = calllogInfo->GetDuration();
+ type = calllogInfo->GetCalllogType();
+ calllogDate = calllogInfo->GetDateTime();
+ if(type == CALL_LOG_TYPE_VOICE_MISSED_UNSEEN)
+ {
+ __pLogPresentor->SetMissedCallSeenStatus(calllogInfo);
+ }
+ }
+
+ Bitmap* pTypeBitmap=null;
+ GetCallogIconBitmap(type,pBitmap,pTypeBitmap,typeText);
+
+ GetTimeText(calllogDate,dateText);
+
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+
+ TextElement* textElement = new (std::nothrow) TextElement();
+ Font font;
+ String appPath = (Application::GetInstance())->GetAppRootPath();
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+ if (__isEditMode == true)
+ {
+ style = LIST_ANNEX_STYLE_MARK;
+ }
+ pItem->Construct(Dimension(itemWidth, __itemHeight), style);
+
+ pItem->AddElement(Rectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, W_TEXT_LINE1_ITEM, __fontSize + 16), ID_NAME_STRING, dateText,__fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), false);
+ pItem->AddElement(Rectangle(X_TEXT_LINE2_ITEM, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_LINE2_ITEM, H_TEXT_LINE2_ITEM), ID_NUMBER_STRING, typeText.GetPointer(), 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_WHITE), Color::GetColor(COLOR_ID_GREY), false);
+
+ if (__isEditMode == true)
+ {
+ pItem->AddElement(Rectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, W_TEXT_LINE1_ITEM - 76, __fontSize + 16), ID_NAME_STRING, dateText, false);
+ pItem->AddElement(Rectangle(X_TEXT_LINE2_ITEM, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_LINE2_ITEM - 76, H_TEXT_LINE2_ITEM), ID_NUMBER_STRING, typeText.GetPointer(), 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), false);
+
+ }
+ if(IsTimeToBeDisplayed(type) == true)
+ {
+ EnrichedText* text = new (std::nothrow) EnrichedText();
+ text->Construct(Dimension(W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM));
+ text->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
+ text->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+ hr = duration/3600;
+ sec = duration%3600;
+ min = sec/60;
+ sec = sec%60;
+ durationText.Format(10,L"%02d:%02d:%02d", hr, min, sec);
+ textElement->Construct(durationText);
+
+ font.Construct(FONT_STYLE_PLAIN, 32);
+ textElement->SetFont(font);
+ textElement->SetTextColor(Color::GetColor(COLOR_ID_GREY));
+ text->Add(*textElement);
+
+ if (__isEditMode == false)
+ {
+ //pItem->AddElement(Rectangle((itemWidth - (X_TEXT_TIME_ITEM_RIGHT_MARGIN-76)), Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *text);
+ pItem->AddElement(Rectangle(itemWidth - (X_TEXT_TIME_ITEM_RIGHT_MARGIN-140), Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, durationText.GetPointer(), 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_WHITE), Color::GetColor(COLOR_ID_GREY), false);
+ }
+ else
+ {
+ //pItem->AddElement(Rectangle((itemWidth - (X_TEXT_TIME_ITEM_RIGHT_MARGIN-165)) - 165, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *text);
+ pItem->AddElement(Rectangle((itemWidth - (X_TEXT_TIME_ITEM_RIGHT_MARGIN-140)) - 85, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, durationText.GetPointer(), 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_WHITE), Color::GetColor(COLOR_ID_GREY), false);
+ }
+
+ delete text;
+ text = null;
+ }
+
+ if (pTypeBitmap != null)
+ {
+ pItem->AddElement(Rectangle(X_CALLTYPE_BITMAP_ITEM, Y_TEXT_LINE1_ITEM + __fontSize + 20, W_CALLTYPE_BITMAP_ITEM, H_CALLTYPE_BITMAP_ITEM), ID_CALLTYPE_BITMAP, *pTypeBitmap);
+ delete pTypeBitmap;
+ pTypeBitmap = null;
+ }
+ if(pBitmap != null)
+ {
+ if (__isEditMode == false)
+ {
+ pItem->AddElement(Rectangle((itemWidth - X_LOGCALL_BITMAP_RIGHT_MARGIN), Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pBitmap);
+ }
+ else
+ {
+ pItem->AddElement(Rectangle((itemWidth - X_LOGCALL_BITMAP_RIGHT_MARGIN) - 90, Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pBitmap);
+ }
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ return pItem;
+
+}
+
+bool
+LogsDetailItemProvider::IsTimeToBeDisplayed(CallLogType type)
+{
+ switch(type)
+ {
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ case CALL_LOG_TYPE_VIDEO_REJECTED:
+ case CALL_LOG_TYPE_VIDEO_BLOCKED:
+ case CALL_LOG_TYPE_VIDEO_MISSED:
+ {
+ return false;
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ case CALL_LOG_TYPE_VIDEO_INCOMING:
+ case CALL_LOG_TYPE_VIDEO_OUTGOING:
+ {
+ return true;
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_INCOMING:
+ case CALL_LOG_TYPE_SMS_OUTGOING:
+ case CALL_LOG_TYPE_SMS_BLOCKED:
+ case CALL_LOG_TYPE_MMS_INCOMING:
+ case CALL_LOG_TYPE_MMS_OUTGOING:
+ case CALL_LOG_TYPE_MMS_BLOCKED:
+ case CALL_LOG_TYPE_EMAIL_INCOMING:
+ case CALL_LOG_TYPE_EMAIL_OUTGOING:
+ {
+ return false;
+ }
+ break;
+ default:
+ {
+ return false;
+ }
+ break;
+ }
+}
+
+void
+LogsDetailItemProvider::GetCallogIconBitmap(CallLogType logType,Bitmap*& iconType, Bitmap*& iconArrow, String& text)
+{
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ switch(logType)
+ {
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED));
+
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_OUTGOING));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_REJECTED));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_REJECTED));
+ }
+ break;
+
+ case CALL_LOG_TYPE_VIDEO_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_OUTGOING));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_MISSED:
+ case CALL_LOG_TYPE_VIDEO_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+
+ case CALL_LOG_TYPE_SMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+ }
+ break;
+ default:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ }
+}
+
+bool
+LogsDetailItemProvider::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+LogsDetailItemProvider::SetViewMode(bool mode)
+{
+ __isEditMode = mode;
+}
+
+void
+LogsDetailItemProvider::ResetDetailsList(void)
+{
+ if(__pCalllogDetailListByNumber != null)
+ {
+ __pCalllogDetailListByNumber->RemoveAll();
+ delete __pCalllogDetailListByNumber;
+ __pCalllogDetailListByNumber = null;
+ }
+ //reset __pCallLogDetailGroups also
+}
+
+void
+LogsDetailItemProvider::GetItemAtGroupIndex(int groupIndex, int itemIndex, CallLogDetails** pCalllogDetails)
+{
+ if(__pCallLogDetailGroups != null)
+ {
+ CallLogDetailGroup* pGroup = null;
+ ArrayList* list = null;
+ pGroup = static_cast<CallLogDetailGroup*>(__pCallLogDetailGroups->GetAt(groupIndex));
+ if(pGroup != null)
+ {
+ list = pGroup->GetLogData();
+ *pCalllogDetails = static_cast<CallLogDetails*>(list->GetAt(itemIndex));
+ }
+ }
+}
+
+void
+LogsDetailItemProvider::GetTimeText(DateTime calllogDate,String& dateText)
+{
+ int hour = calllogDate.GetHour();
+ String key(L"24HourFormatSelected");
+ bool dateFormat24 = true;
+ String amPm;
+
+ SettingInfo::GetValue(key, dateFormat24);
+ if (dateFormat24 == false)
+ {
+ if (hour > MAX_TWELVEHOUR_FORMAT)
+ {
+ hour -= MAX_TWELVEHOUR_FORMAT;
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ else if (hour < MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_AM_TIME));
+ }
+ else if (hour == MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ dateText.Format(MAX_TWELVEHOUR_FORMAT_LENGTH,L"%02d:%02d %ls", hour, calllogDate.GetMinute(), amPm.GetPointer());
+ }
+ else
+ {
+ dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:%02d", calllogDate.GetHour(), calllogDate.GetMinute());
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPanelFactory.cpp
+ * @brief The Panel factory for Dial application
+ */
+
+#include "PhnPanelFactory.h"
+#include "PhnTabDialer.h"
+#include "PhnTabLogs.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+PanelFactory::PanelFactory(void)
+{
+}
+
+PanelFactory::~PanelFactory(void)
+{
+}
+
+Panel*
+PanelFactory::CreatePanelN(const String& panelId, const SceneId& sceneId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ Panel* pNewPanel = null;
+
+ if (panelId == PANEL_DIALER)
+ {
+ DialTabDialer* pPanel = new DialTabDialer();
+ pPanel->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pPanel);
+ pNewPanel = pPanel;
+ }
+ else if (panelId == PANEL_LOGS)
+ {
+ DialTabLogs* pPanel = new DialTabLogs();
+ pPanel->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pPanel);
+ pNewPanel = pPanel;
+ }
+ return pNewPanel;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPhoneApp.cpp
+ * @brief Phone Application UiApp file
+ */
+#include <FUi.h>
+#include "PhnCallInfo.h"
+#include "PhnPhoneAppFrame.h"
+#include "PhnPhoneApp.h"
+#include "PhnSceneRegister.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnTypes.h"
+#include "PhnAppUtility.h"
+#include "PhnIAppStateChangeListner.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+
+const int ID_BTN_OPEN_DIALER = 145;
+const int ID_BTN_OPEN_CALL = 146;
+const int MIN_MEMORY_NEEDED = 1048576;
+
+PhoneApp::PhoneApp(void)
+ : __isOpenAsAppControl(false)
+ , __pLaunchArgs(null)
+ , __initialSceneId(L"")
+ , __currentDisplayLanguage(IDS_BLANK_LANGUAGE)
+ , __currentFontSize(IDS_BLANK_FONTSIZE)
+ , __appControlRequestId(INVALID_REQUEST_ID)
+ , __pAppPopup(null)
+{
+ __listenerList.Construct();
+}
+
+PhoneApp::~PhoneApp(void)
+{
+}
+
+UiApp*
+PhoneApp::CreateInstance(void)
+{
+ return new (std::nothrow) PhoneApp();
+}
+
+bool
+PhoneApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+ AppControlProviderManager* pProviderMgr = AppControlProviderManager::GetInstance();
+ pProviderMgr->SetAppControlProviderEventListener(this);
+ vconf_notify_key_changed(VCONFKEY_CALL_STATE,PhoneApp::OnCallStateChange,this);
+ return true;
+}
+
+void
+PhoneApp::OnSettingChanged(String& key)
+{
+ if (key.CompareTo(IDS_KEY_LANGUAGE_CHANGE) == 0)
+ {
+ String displayLanguageValue;
+ SettingInfo::GetValue(IDS_KEY_LANGUAGE_CHANGE, displayLanguageValue);
+ AppLogDebug("Current Language: %S", __currentDisplayLanguage.GetPointer());
+ AppLogDebug("New Language: %S", displayLanguageValue.GetPointer());
+ if (displayLanguageValue.CompareTo(__currentDisplayLanguage) != 0)
+ {
+
+ if(IsOpenAsAppControl() == true)
+ {
+ //launched as "AddCall" AppControl, send response
+ SendAppControlResponseMessage(APP_CTRL_RESULT_CANCELED, null);
+ }
+ Terminate();
+ }
+ }
+ if (key.CompareTo(IDS_KEY_FONTSIZE_CHANGE) == 0)
+ {
+ String fontSizeValue;
+ SettingInfo::GetValue(IDS_KEY_FONTSIZE_CHANGE, fontSizeValue);
+ AppLogDebug("Current FontSize: %S", __currentFontSize.GetPointer());
+ AppLogDebug("New Language: %S", fontSizeValue.GetPointer());
+ if (fontSizeValue.CompareTo(__currentFontSize) != 0)
+ {
+
+ if(IsOpenAsAppControl() == true)
+ {
+ //launched as "AddCall" AppControl, send response
+ SendAppControlResponseMessage(APP_CTRL_RESULT_CANCELED, null);
+ }
+ Terminate();
+ }
+ }
+
+
+ AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
+ return;
+}
+
+bool
+PhoneApp::OnAppInitialized(void)
+{
+ AppLog("ENTER");
+ result r = E_FAILURE;
+ //Commented since it always comes to on OnForeground() and have put memory check there.
+/* long long mem = GetAvailableMemory();
+ AppLogDebug("%lld",mem);
+ if(mem < MIN_MEMORY_NEEDED)
+ {
+ MessageBox LowMemory;
+ String msg = L"";
+ LowMemory.Construct(AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG_TITLE), AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG), MSGBOX_STYLE_NONE,1000);
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ LowMemory.ShowAndWait(modalResult);
+
+ return false;
+
+ }*/
+ //Check if PhoneApp is opened as AppControl
+ if(__isOpenAsAppControl == false)
+ {
+ //by default, initial scene is DIALER view
+ __initialSceneId = IDSCN_DIALER;
+ __pLaunchArgs = null;
+ }
+ //Setting the current display language
+ SettingInfo::AddSettingEventListener(*this);
+ SettingInfo::GetValue(IDS_KEY_LANGUAGE_CHANGE, __currentDisplayLanguage);
+ SettingInfo::GetValue(IDS_KEY_FONTSIZE_CHANGE, __currentFontSize);
+ // Initialize Frame and App specific data.
+ PhoneAppFrame* pPhoneAppFrame = new (std::nothrow) PhoneAppFrame();
+ pPhoneAppFrame->Construct();
+ pPhoneAppFrame->SetName(L"Phone");
+ r = AddFrame(*pPhoneAppFrame);
+ AppManager::GetInstance()->AddActiveAppEventListener(*this);
+ AppLog("EXIT");
+ return (!IsFailed(r));
+}
+
+bool
+PhoneApp::OnAppWillTerminate(void)
+{
+ return true;
+}
+
+bool
+PhoneApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+ AppLogDebug("Enter");
+ AppManager::GetInstance()->RemoveActiveAppEventListener(*this);
+ SettingInfo::RemoveSettingEventListener(*this);
+ vconf_ignore_key_changed(VCONFKEY_CALL_STATE, PhoneApp::OnCallStateChange);
+ return true;
+}
+
+void
+PhoneApp::OnForeground(void)
+{
+ AppLogDebug("Onforeground");
+}
+
+void
+PhoneApp::OnBackground(void)
+{
+ IEnumerator* pEnum = __listenerList.GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ IAppStateChangeListener* pInterface = static_cast<IAppStateChangeListener*>(pEnum->GetCurrent());
+ if (pInterface == null)
+ {
+ delete pEnum;
+
+ return;
+ }
+ pInterface->OnBackground();
+ }
+ delete pEnum;
+}
+
+void
+PhoneApp::OnLowMemory(void)
+{
+ AppLogDebug("Enter");
+}
+
+void
+PhoneApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+}
+
+void
+PhoneApp::OnScreenOn(void)
+{
+}
+
+void
+PhoneApp::OnScreenOff(void)
+{
+}
+
+bool
+PhoneApp::IsOpenAsAppControl(void)
+{
+ AppLogDebug("%d",__isOpenAsAppControl);
+ return __isOpenAsAppControl;
+}
+
+SceneId
+PhoneApp::GetInitialScene(void)
+{
+ return __initialSceneId;
+}
+
+void
+PhoneApp::SetInitialScene(SceneId initialSceneId)
+{
+ __initialSceneId = initialSceneId;
+}
+
+IList*
+PhoneApp::GetAppLaunchArguments(void)
+{
+ return __pLaunchArgs;
+}
+
+void
+PhoneApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUriData,
+ const String* pMimeType, const IMap* pExtraData)
+{
+ AppLogDebug("ENTER");
+ //process AppControl parameters
+ ProcessAppControlRequest(reqId, operationId, pUriData, pExtraData);
+ AppLogDebug("EXIT");
+}
+
+void
+PhoneApp::ProcessAppControlRequest(RequestId reqId, const String& operationId,const String* pUriData, const IMap* pArgsMap)
+{
+ __pLaunchArgs = null;
+ __operatioID = operationId;
+ AppLogDebug("Enter %ls",operationId.GetPointer());
+ if (operationId.Equals(OPERATION_ID_DIAL, true))
+ {
+ HandleDialerAppControlRequest(reqId, pUriData, pArgsMap);
+ }
+ else if (operationId.Equals(OPERATION_ID_CONFIGURE, true))
+ {
+ //Adding work around to handle add call , since using OPERATION_ID_DIAL makes Phone to run as main application
+ //instead of submode , so now we use OPERATION_ID_CONFIGURE and differentiate using parameters
+ if(pArgsMap != null)
+ {
+ HandleDialerAppControlRequest(reqId, pUriData, pArgsMap);
+ __operatioID = OPERATION_ID_ADD_CALL;
+ }
+ else
+ {
+ HandleSettingsAppControlRequest(reqId, pArgsMap);
+ }
+ }
+}
+
+void
+PhoneApp::HandleDialerAppControlRequest(RequestId reqId,const String* pUriData, const IMap* pArgsMap)
+{
+ AppLogDebug("Enter ");
+ //start Dial Form
+ __initialSceneId = IDSCN_DIALER;
+ //fetch launch arguments
+ __pLaunchArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pLaunchArgs->Construct();
+ //request id
+ __appControlRequestId = reqId;
+ __isOpenAsAppControl = true;
+
+ //First check if URI is present Now check if tel uri is present
+ if(pUriData != null)
+ {
+ AppLogDebug("pUriData is present %ls",pUriData->GetPointer());
+ String phoneNumber(L"");
+ phoneNumber.Append(*pUriData);
+ if(phoneNumber.Contains(PARAM_PHONE_NUMBER))
+ {
+ phoneNumber.Replace(PARAM_PHONE_NUMBER,L"");
+ if(phoneNumber.Contains(DELIMITER))
+ {
+ phoneNumber.Replace(DELIMITER,L"");
+ String* pPhoneNumber = new (std::nothrow) String(phoneNumber);
+ __pLaunchArgs->Add(pPhoneNumber);
+
+ }
+ }
+ AppLogDebug("%ls",phoneNumber.GetPointer());
+ }
+ else if (pArgsMap != null)
+ {
+ String* pKey = new (std::nothrow) String(PARAM_PHONE_NUMBER);
+ if (pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pPhoneValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if (pPhoneValue != null)
+ {
+ String* pPhoneNumber = new (std::nothrow) String(*pPhoneValue);
+ __pLaunchArgs->Add(pPhoneNumber);
+ }
+ }
+ delete pKey;
+ }
+
+}
+
+void
+PhoneApp::HandleSettingsAppControlRequest(RequestId reqId,const IMap* pArgsMap)
+{
+ //request id
+ __appControlRequestId = reqId;
+ __isOpenAsAppControl = true;
+ __initialSceneId = IDSCN_SCENE_MAIN_SETTING_MENU;
+ //send response message
+ SendAppControlResponseMessage(APP_CTRL_RESULT_SUCCEEDED, null);
+}
+
+void
+PhoneApp::SendAppControlResponseMessage(AppCtrlResult appCtrlResult, const IMap* pExtraData)
+{
+ if (__appControlRequestId != INVALID_REQUEST_ID)
+ {
+ AppLogDebug("Enter");
+ //response message
+ result res = AppControlProviderManager::GetInstance()->SendAppControlResult(__appControlRequestId, appCtrlResult, pExtraData);
+ AppLogDebug("SendAppControlResult %d",res);
+ }
+}
+
+void
+PhoneApp::AddAppStateChangeListener(const IAppStateChangeListener& listener)
+{
+ __listenerList.Add(listener);
+
+}
+void
+PhoneApp::RemoveAppStateChangeListener(const IAppStateChangeListener& listener)
+{
+ __listenerList.Remove(listener);
+}
+
+void
+PhoneApp::OnActiveAppChanged(const Tizen::Base::String& appId)
+{
+ AppLogDebug("OnActiveAppChanged %ls",appId.GetPointer());
+ if(GetAppId().Equals(appId) == true)
+ {
+ // Todo: temporary solution for appcontrol.
+ if (!GetAppFrame()->GetFrame()->IsEnabled())
+ {
+ GetAppFrame()->GetFrame()->SetEnabled(true);
+ GetAppFrame()->GetFrame()->Invalidate(true);
+ }
+
+ long long mem = GetAvailableMemory();
+ AppLogDebug("%lld",mem);
+ // for bug# N_SE-53227 moving it from OnInitialized since it always comes to onforeground
+ // even for first launch
+ if(mem < MIN_MEMORY_NEEDED)
+ {
+ MessageBox LowMemory;
+ String msg = L"";
+ LowMemory.Construct(AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG_TITLE), AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG), MSGBOX_STYLE_NONE,1000);
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ LowMemory.ShowAndWait(modalResult);
+ if(IsOpenAsAppControl() == true)
+ {
+ //launched as "AddCall" AppControl, send response
+ SendAppControlResponseMessage(APP_CTRL_RESULT_CANCELED, null);
+ }
+ Terminate();
+ }
+
+ IEnumerator* pEnum = __listenerList.GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ IAppStateChangeListener* pInterface = static_cast<IAppStateChangeListener*>(pEnum->GetCurrent());
+ if (pInterface == null)
+ {
+ delete pEnum;
+
+ return;
+ }
+ pInterface->OnForeground();
+ }
+ delete pEnum;
+
+ result res = E_FAILURE;
+ CallState state = CALL_STATE_MAX;
+ res = SettingsPresentationModel::GetInstance()->GetCallState(state);
+ if(res == E_SUCCESS)
+ {
+ if((IsOpenAsAppControl() == false) && (state == CALL_STATE_CALL_VOICE_ACTIVE
+ || state == CALL_STATE_CALL_VIDEO_ACTIVE || state == CALL_STATE_CALL_VOICE_CONNECTING || state == CALL_STATE_CALL_VIDEO_CONNECTING))
+ {
+ //Show message box to select dialer or call app.
+ if (__pAppPopup != null)
+ {
+ return;
+ }
+ __pAppPopup = new (std::nothrow) Popup();
+ __pAppPopup->Construct(true, Dimension(640,250));
+ __pAppPopup->SetTitleText(L"Select Application");
+
+ //Dialer button
+ Rectangle dialRect(10, 80, 300, 80);
+ Button* pDialButton = new Button();
+ pDialButton->Construct(dialRect, L"Open Dialer");
+ pDialButton->SetActionId(ID_BTN_OPEN_DIALER);
+ pDialButton->AddActionEventListener(*this);
+ __pAppPopup->AddControl(pDialButton);
+
+ //Dialer button
+ dialRect.x = dialRect.x + dialRect.width + 10;
+ Button* pCallButton = new Button();
+ pCallButton->Construct(dialRect, L"Open Call");
+ pCallButton->SetActionId(ID_BTN_OPEN_CALL);
+ pCallButton->AddActionEventListener(*this);
+ __pAppPopup->AddControl(pCallButton);
+ __pAppPopup->SetShowState(true);
+ __pAppPopup->Show();
+ }
+ }
+ }
+
+
+
+}
+
+void
+PhoneApp::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case ID_BTN_OPEN_DIALER:
+ {
+ //Launch call application
+ AppLogDebug("Show Dialer Screen");
+ }
+ break;
+
+ case ID_BTN_OPEN_CALL:
+ {
+ //Launch call application
+ AppLogDebug("Launch Call Application");
+ AppManager* pAppManager = AppManager::GetInstance();
+ pAppManager->LaunchApplication(PROVIDER_ID_CALL);
+ }
+ break;
+ }
+ __pAppPopup->Destroy();
+ __pAppPopup = null;
+}
+
+void
+PhoneApp::OnCallStateChange(keynode_t *node, void *user_data)
+{
+ AppLogDebug("Enter");
+ PhoneApp* pPhoneApp = (PhoneApp*)user_data;
+ result res = E_FAILURE;
+ CallState state = CALL_STATE_MAX;
+ res = SettingsPresentationModel::GetInstance()->GetCallState(state);
+
+ if((pPhoneApp->IsOpenAsAppControl() == false) && (state == CALL_STATE_CALL_OFF ))
+ {
+ pPhoneApp->DestroyLaunchOptionPopup();
+
+ }
+ //Un-commenting because of N_SE-53330
+ //Commenting this code because of N_SE-47688
+ if((pPhoneApp->IsOpenAsAppControl() == true) && ((state == CALL_STATE_CALL_VOICE_CONNECTING)||(state == CALL_STATE_CALL_VIDEO_CONNECTING))
+ && pPhoneApp->__operatioID.Equals(OPERATION_ID_ADD_CALL,true))
+ {
+ AppControlProviderManager::GetInstance()->SendAppControlResult(pPhoneApp->__appControlRequestId, APP_CTRL_RESULT_CANCELED, null);
+ pPhoneApp->Terminate();
+ }
+
+}
+
+void
+PhoneApp::DestroyLaunchOptionPopup(void)
+{
+ if(__pAppPopup != null)
+ {
+ __pAppPopup->Destroy();
+ __pAppPopup = null;
+ }
+}
+
+long long
+PhoneApp::GetAvailableMemory(void)
+{
+ result r = E_SUCCESS;
+
+ String key(L"http://tizen.org/runtime/storage.available.internal");
+ long long allocatedMemory = 0;
+
+ r = RuntimeInfo::GetValue(key, allocatedMemory);
+ TryCatch(r == E_SUCCESS, , "MyRuntimeInfo: Failed to get value");
+
+ return allocatedMemory;
+
+ CATCH:
+ return 0;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnPhoneAppEntry.cpp
+ * @brief Phone Application Entry file
+ */
+#include "PhnPhoneApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+//
+// The entry function of Tizen application called by the operating system.
+//
+_EXPORT_ int
+OspMain(int argc, char* pArgv[])
+{
+ AppLog("Application started.");
+ ArrayList args(SingleObjectDeleter);
+ args.Construct();
+ for (int i = 0; i < argc; i++)
+ {
+ args.Add(new (std::nothrow) String(pArgv[i]));
+ }
+
+ result r = Tizen::App::UiApp::Execute(PhoneApp::CreateInstance, &args);
+ TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+ AppLog("Application finished.");
+
+ return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhoneAppFrame.cpp
+ * @brief Phone Application Frame
+ */
+#include "PhnPhoneApp.h"
+#include "PhnPhoneAppFrame.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui::Scenes;
+
+PhoneAppFrame::PhoneAppFrame(void)
+{
+}
+
+PhoneAppFrame::~PhoneAppFrame(void)
+{
+}
+
+result
+PhoneAppFrame::OnInitializing(void)
+{
+ result r = E_FAILURE;
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ if(pPhoneApp != null && pPhoneApp->GetInitialScene().IsEmpty() == false)
+ {
+ //Initialize factory methods and register all scenes.
+ r = SceneRegister::RegisterAllScenes();
+ TryReturn(r == E_SUCCESS, r , "Scene registration failed");
+
+ //start initial Form
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ r = pSceneManager->GoForward( ForwardSceneTransition(pPhoneApp->GetInitialScene(), SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY), pPhoneApp->GetAppLaunchArguments());
+ }
+ return r;
+}
+
+result
+PhoneAppFrame::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FormFactory.cpp
+ * @brief Form factory class
+ */
+#include "PhnPhoneFormFactory.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+//Settings Forms
+#include "PhnSettingsMainMenuForm.h"
+#include "PhnSettingsRejectListForm.h"
+#include "PhnSettingsRejectMsgsForm.h"
+#include "PhnSettingsSpeedDialForm.h"
+#include "PhnSettingsMoreOptionsForm.h"
+#include "PhnSettingsCallStatusTonesForm.h"
+#include "PhnSettingsCallForwardWaitBarrForm.h"
+#include "PhnSettingsAddNumberForm.h"
+#include "PhnSettingsEditRejectMsgForm.h"
+#include "PhnSettingsForwardToNumberForm.h"
+#include "PhnSettingsBarringPwdForm.h"
+#include "PhnSettingsDeleteListForm.h"
+#include "PhnSettingsCallAnsweringForm.h"
+#include "PhnSettingsCallAccessoryForm.h"
+//Dial Forms
+#include "PhnDialAppForm.h"
+#include "PhnLogsDetailForm.h"
+#include "PhnUnknownLogsDetailForm.h"
+#include "PhnEmergencyDialForm.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+FormFactory::FormFactory(void)
+{
+}
+
+FormFactory::~FormFactory(void)
+{
+}
+
+Form*
+FormFactory::CreateFormN(const String& formId, const SceneId& sceneId)
+{
+ Form* pNewForm = null;
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ if (formId == IDL_FORM_DIAL_APP)
+ {
+ DialAppForm* pForm = new (std::nothrow) DialAppForm();
+ pForm->Initialize();
+ //pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_LOG_DETAIL)
+ {
+ DlLogsDetailForm* pForm = new (std::nothrow) DlLogsDetailForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_RESTRICTED_CALL_LOG_DETAIL)
+ {
+ UnknownLogsDetailForm* pForm = new (std::nothrow) UnknownLogsDetailForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if(formId == IDL_FORM_EMERGENCY_DIAL)
+ {
+ EmergencyDialForm* pForm = new (std::nothrow) EmergencyDialForm();
+ pForm->Initialize();
+ //pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId.StartsWith(IDL_FORM_SETTINGS_PREFIX,0) == true)
+ {
+ pNewForm = CreateCallSettingsForm(formId, sceneId);
+ }
+
+ return pNewForm;
+}
+
+Form*
+FormFactory::CreateCallSettingsForm(const String& formId, const SceneId& sceneId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ Form* pNewForm = null;
+
+ if (formId == IDL_FORM_MAIN_SETTING_MENU)
+ {
+ SettingsMainMenuForm* pForm = new (std::nothrow) SettingsMainMenuForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_REJECTLIST_MENU)
+ {
+ SettingsRejectListForm* pForm = new (std::nothrow) SettingsRejectListForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_REJECTMSGS_MENU)
+ {
+ SettingsRejectMsgsForm* pForm = new (std::nothrow) SettingsRejectMsgsForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_SPEED_DIAL)
+ {
+ SettingsSpeedDialForm* pForm = new (std::nothrow) SettingsSpeedDialForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_MORE_OPTIONS)
+ {
+ SettingsMoreOptionsForm* pForm = new (std::nothrow) SettingsMoreOptionsForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_STATUSTONES)
+ {
+ SettingsCallStatusTonesForm* pForm = new (std::nothrow) SettingsCallStatusTonesForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALLTYPE_FORWARD)
+ {
+ SettingsCallForwardWaitBarrForm* pForm = new (std::nothrow) SettingsCallForwardWaitBarrForm(
+ SettingsCallForwardWaitBarrForm::FORMTYPE_CALLFORWARDING_TYPE);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_FORWARD_OPTIONS)
+ {
+ SettingsCallForwardWaitBarrForm* pForm = new (std::nothrow) SettingsCallForwardWaitBarrForm(
+ SettingsCallForwardWaitBarrForm::FORMTYPE_VOICE_CALLFORWARDING);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALLTYPE_BARRING)
+ {
+ SettingsCallForwardWaitBarrForm* pForm = new (std::nothrow) SettingsCallForwardWaitBarrForm(
+ SettingsCallForwardWaitBarrForm::FORMTYPE_CALLBARRING_TYPE);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_BARRING_OPTIONS)
+ {
+ SettingsCallForwardWaitBarrForm* pForm = new (std::nothrow) SettingsCallForwardWaitBarrForm(
+ SettingsCallForwardWaitBarrForm::FORMTYPE_VOICE_CALLBARRING);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_WAITING_OPTIONS)
+ {
+ SettingsCallForwardWaitBarrForm* pForm = new (std::nothrow) SettingsCallForwardWaitBarrForm(
+ SettingsCallForwardWaitBarrForm::FORMTYPE_CALL_WAITING);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_ADD_REJECT_NUMBER)
+ {
+ SettingsAddNumberForm* pForm = new (std::nothrow) SettingsAddNumberForm(SettingsAddNumberForm::FORMTYPE_NUMBER_TO_REJECT);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_AUTO_AREA_CODE)
+ {
+ SettingsAddNumberForm* pForm = new (std::nothrow) SettingsAddNumberForm(SettingsAddNumberForm::FORMTYPE_AUTO_AREA_CODE);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_ADD_REJECT_MSG)
+ {
+ SettingsEditRejectMsgForm* pForm = new (std::nothrow) SettingsEditRejectMsgForm(SettingsEditRejectMsgForm::FORMMODE_NEW_MESSAGE);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_EDIT_REJECT_MSG)
+ {
+ SettingsEditRejectMsgForm* pForm = new (std::nothrow) SettingsEditRejectMsgForm(SettingsEditRejectMsgForm::FORMMODE_EDIT_MESSAGE);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_FORWARD_TO_NUMBER)
+ {
+ SettingsForwardToNumberForm* pForm = new (std::nothrow) SettingsForwardToNumberForm(SettingsForwardToNumberForm::FORWARDCONDITION);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_NOREPLY_FORWARD_TO_NUMBER)
+ {
+ SettingsForwardToNumberForm* pForm = new (std::nothrow) SettingsForwardToNumberForm(SettingsForwardToNumberForm::FORWARDCONDITION_NOREPLY);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_SCENE_SET_BARRING_PWD)
+ {
+ SettingsBarringPwdForm* pForm = new (std::nothrow) SettingsBarringPwdForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_DEL_NUMBER)
+ {
+ SettingsDeleteListForm* pForm = new (std::nothrow) SettingsDeleteListForm(SettingsDeleteListForm::LISTOF_NUMBERS);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_DEL_MESSAGE)
+ {
+ SettingsDeleteListForm* pForm = new (std::nothrow) SettingsDeleteListForm(SettingsDeleteListForm::LISTOF_MESSAGES);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_ANSWER_OPTIONS)
+ {
+ SettingsCallAnsweringForm* pForm = new (std::nothrow) SettingsCallAnsweringForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CALL_ACCESSORY_OPTIONS)
+ {
+ SettingsCallAccessoryForm* pForm = new (std::nothrow) SettingsCallAccessoryForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+
+ return pNewForm;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnRetrieveSuggestionsTasks.cpp
+ * @brief RetrieveContactsListTask class
+ */
+#include "PhnAppUtility.h"
+#include "PhnCalllogManager.h"
+#include "PhnCommonUtils.h"
+#include "PhnDialContactInfo.h"
+#include "PhnRetrieveSuggestionsTasks.h"
+#include "PhnSettingsManager.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+
+
+RetrieveContactsListTask::RetrieveContactsListTask(ISuggestionsRetrievedEventListener& pEventListener)
+ : __pEventListener(pEventListener), __pContactsList(null), __pNumberStr(null)
+{
+}
+
+RetrieveContactsListTask::~RetrieveContactsListTask()
+{
+ if(__pNumberStr)
+ {
+ delete __pNumberStr;
+ }
+ if (__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ }
+}
+
+result
+RetrieveContactsListTask::Construct(String& searchString,const IList* oldSearchResults)
+{
+ result r = E_SUCCESS;
+
+ __pAddressBook = new (std::nothrow) Addressbook();
+ r = __pAddressBook->Construct();
+ TryCatch (r == E_SUCCESS,, "AddressBook.Contruct() failed");
+ //new search string and result list
+ __pNumberStr = new (std::nothrow) String(searchString);
+ __pContactsList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ r = __pContactsList->Construct();
+ TryCatch (r == E_SUCCESS,,"ArrayList.Contruct() failed");
+
+ //Copy old search result, if available
+ if(oldSearchResults != null)
+ {
+ IEnumerator* pOldResultsEnum = oldSearchResults->GetEnumeratorN();
+ while(pOldResultsEnum->MoveNext() == E_SUCCESS)
+ {
+ DialContactInfo* pContactInfo = (static_cast<DialContactInfo*>(pOldResultsEnum->GetCurrent()))->CloneN();
+ if(pContactInfo != null)
+ {
+ __pContactsList->Add(pContactInfo);
+ }
+ }
+ delete pOldResultsEnum;
+ }
+
+ return r;
+
+CATCH:
+ delete __pAddressBook;
+ delete __pNumberStr;
+ delete __pContactsList;
+ return r;
+}
+
+Object*
+RetrieveContactsListTask::Run(void)
+{
+ //check if this is a new search
+ if(__pContactsList->GetCount() > 0)
+ {
+ //filter out suggestion list
+ UpdateSuggestionList();
+ }
+ else
+ {
+ //search for Speed dial number -> 1st Priority in Result List.
+ SearchSpeedDialForNumberN();
+
+ if(__pNumberStr->GetLength() > 0)
+ {
+ //searches contacts by name -> 2nd Priority in result list
+ SearchContactsForName();
+ //Searches contacts by number -> 3rd Priority in result list
+ SearchContactsForNumber();
+ }
+ //TODO: Search logs by number - Last Priority in the list
+ //Only Unknown Numbers are added, since known numbers will be added from above searches
+ /*SearchCallLogsForNumber();*/
+
+ //Need to sort arraylist according to latest search keys.
+ if (__pContactsList->GetCount() > 0)
+ {
+ SuggestionListComparer* pComparer = new (std::nothrow) SuggestionListComparer();
+ //__pContactsList->Sort(*pComparer);
+ delete pComparer;
+ }
+ }
+
+ //Inform listener about search completion.
+ __pEventListener.HandleContactsRetrievalCompleted(__pContactsList);
+ __pContactsList = null;
+ return null;
+}
+
+void
+RetrieveContactsListTask::UpdateSuggestionList(void)
+{
+ //search through each list to filter out suggestions not matching new search string.
+ for (int index = 0; index < __pContactsList->GetCount(); index++)
+ {
+ DialContactInfo* pContact = static_cast<DialContactInfo*>(__pContactsList->GetAt(index));
+ if(pContact == null)
+ {//goto next record
+ continue;
+ }
+ //Fetch search key list
+ IList* pKeyList = pContact->GetSearchKeyList();
+ int nextKey = 0;
+ while(nextKey < pKeyList->GetCount())
+ {
+ bool isRemoveKey = false;
+ //search for Speed dial
+ String* keyWord = static_cast<String*>(pKeyList->GetAt(nextKey));
+ if(keyWord->Equals(String(IDS_SPEED_DIAL_SEARCH_KEY)) == true && __pNumberStr->GetLength() > 1)
+ {
+ isRemoveKey = true;
+ }
+ else if ((__pNumberStr->GetLength() > 0)
+ && ((DialUtil::IsNumericString(*keyWord) == true)
+ || keyWord->Contains("+") == true || keyWord->Contains("#") == true
+ || keyWord->Contains(",") == true || keyWord->Contains(";") == true
+ || keyWord->Contains("*") == true))
+ {
+ //search for number - update list
+ if (pContact->GetPhoneNumber().Contains(*__pNumberStr) == false)
+ {
+ isRemoveKey = true;
+ }
+ else
+ {
+ //update search keys.
+ pContact->ReplaceSearchKey(nextKey, *__pNumberStr);
+ }
+ }
+ else
+ {
+ //search For name
+ //substring of contact name to match
+ String subName;
+ //numeric keys typed, equivalent to above 'subName'.
+ String numericKey;
+ String contactName = pContact->GetDisplayName();
+ contactName.SubString(0,__pNumberStr->GetLength(),subName);
+ DialUtil::ConvertNameToNumericKeys(subName,numericKey);
+ if(numericKey.Equals(*__pNumberStr) == true)
+ {
+ //update search keys.
+ pContact->ReplaceSearchKey(nextKey, subName);
+ }
+ else
+ {
+ isRemoveKey = true;
+ }
+ }
+
+ //remove previous search key, as updated key did'nt match.
+ if(isRemoveKey == true)
+ {
+ pContact->RemoveSearchKey(nextKey);
+ }
+ else
+ {
+ nextKey++;
+ }
+ }
+
+ //Add to contacts list to be removed
+ if(pKeyList->GetCount() <= 0)
+ {
+ __pContactsList->RemoveAt(index);
+ index--;
+ }
+ }
+
+ //Need to sort arraylist according to latest search keys.
+ if(__pContactsList->GetCount() > 0)
+ {
+ SuggestionListComparer* pComparer = new (std::nothrow) SuggestionListComparer();
+ //__pContactsList->Sort(*pComparer);
+ delete pComparer;
+ }
+ else
+ {
+ //remove old search key
+ delete __pNumberStr;
+ __pNumberStr = null;
+ }
+}
+
+void
+RetrieveContactsListTask::SearchContactsForNumber(void)
+{
+ //Searches contacts by (part of)phone number.
+ IList* pResultList = __pAddressBook->SearchContactsByPhoneNumberN(*__pNumberStr);
+ if(pResultList != null && pResultList->GetCount() > 0)
+ {
+ SaveContactsToListByNumber(*pResultList, *__pNumberStr);
+ pResultList->RemoveAll(true);
+ }
+ delete pResultList;
+}
+
+void
+RetrieveContactsListTask::SearchContactsForName(void)
+{
+ // If phoneNumber: "23" -> Possible string matches -> 9.
+ // It is much better to do first 3(2=A,B,C) search in 1000 fields(in database), and
+ // subsequent 9 searches in locally stored array of fewer records.
+ // then to 9 search searches in 1000 fields(in database).
+
+ //Fetch matching names for mapping char for first digit, e.g. 2->ABC, 3->DEF.
+ int digit = 0;
+ String strDigit;
+ __pNumberStr->SubString(0,1,strDigit);
+ Integer::Parse(strDigit,digit);
+ IList* pNamesList = DialUtil::FetchPossibleNamesListN(L"",digit);
+ if (pNamesList != null)
+ {
+ int totalMatches = pNamesList->GetCount();
+ for (int index = 0; index < totalMatches; index++)
+ {
+ //Search All names that start with single character
+ String* searchKey = static_cast<String*>(pNamesList->GetAt(index));
+ SearchContactsWithInitialChar(*searchKey);
+ }
+ pNamesList->RemoveAll();
+ delete pNamesList;
+ }
+}
+
+void
+RetrieveContactsListTask::SearchContactsWithInitialChar(String& searchStr)
+{
+ //search for contacts which contains 'searchStr' anywhere in displayName.
+ IList* pResultList = __pAddressBook->SearchContactsByNameN(searchStr);
+ //Check if empty list.
+ if(pResultList == null || pResultList->GetCount() <= 0)
+ {
+ delete pResultList;
+ return;
+ }
+
+ //further filter out result list - save contacts starting with 'searchStr'.
+ ArrayList* pDialInfoList = new (std::nothrow) ArrayList();
+ pDialInfoList->Construct();
+
+ for(int index = 0; index < pResultList->GetCount(); index++)
+ {
+ Contact* pContact = static_cast<Contact*>(pResultList->GetAt(index));
+ //Check if display name starts with search string
+ String contactName;
+ result r = pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, contactName);
+ if ((r == E_SUCCESS) && (contactName.StartsWith(searchStr, 0) == true))
+ {
+ //substring of contact name to match
+ String subName;
+ //numeric keys typed, equivalent to above 'subName'.
+ String numericKey;
+ contactName.SubString(0,__pNumberStr->GetLength(),subName);
+ DialUtil::ConvertNameToNumericKeys(subName,numericKey);
+ if(numericKey.Equals(*__pNumberStr) == true)
+ {
+ DialContactInfo* pDialInfo = ConvertToDialContactN(*pContact,subName);
+ if(pDialInfo != null)
+ {
+ pDialInfoList->Add(*pDialInfo);
+ }
+ }
+ }
+ }
+ pResultList->RemoveAll(true);
+ delete pResultList;
+
+ //save list
+ if(pDialInfoList->GetCount() > 0 && __pContactsList != null)
+ {
+ //remove duplicate items
+ pDialInfoList->RemoveItems(*__pContactsList,true);
+ //Add all distinct item to list
+ __pContactsList->AddItems(*pDialInfoList);
+ //remove ownership for all items.
+ pDialInfoList->RemoveAll();
+ }
+ delete pDialInfoList;
+}
+
+void
+RetrieveContactsListTask::SearchSpeedDialForNumberN(void)
+{
+ //Check if only 1 digit number
+ if(__pNumberStr->GetLength() != 1)
+ {
+ return;
+ }
+ //convert to speed dial rowId
+ int rowId;
+ Integer::Parse(*__pNumberStr, rowId);
+ if (rowId < 2 || rowId > 9)
+ {
+ return;
+ }
+
+ //Fetch matched speed dial contact number
+ SettingsManager* pSettingsManager = SettingsManager::GetInstance();
+ String* contactNo = pSettingsManager->GetMappedSpeedDialNumberN(rowId);
+ if (contactNo == null)
+ {
+ return;
+ }
+
+ //Fetch Contact for phoneNumber
+ IList* pContactList = __pAddressBook->SearchContactsByPhoneNumberN(*contactNo);
+ if (pContactList != null)
+ {
+ IEnumerator* pContactsEnum = pContactList->GetEnumeratorN();
+ while (pContactsEnum->MoveNext() == E_SUCCESS)
+ {
+ Contact* pContact = static_cast<Contact*>(pContactsEnum->GetCurrent());
+ if(pContact != null)
+ {
+ //save to HashMap - ownership transferred of key-value pair.
+ DialContactInfo* pDialContact = ConvertToDialContactN(*pContact,*contactNo, true);
+ if(pDialContact != null)
+ {
+ __pContactsList->Add(pDialContact);
+ break;
+ }
+ }
+ }
+
+ //free resources
+ delete pContactsEnum;
+ pContactList->RemoveAll(true);
+ delete pContactList;
+ }
+ delete contactNo;
+}
+
+/*void
+RetrieveContactsListTask::SearchCallLogsForNumber(void)
+{
+ //conversion "contactNumber" to char*
+ const wchar_t* pContact = __pNumberStr->GetPointer();
+ int len = __pNumberStr->GetLength()+1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+
+ //fetch Unknown numbers from Call logs Manager containing search string.
+ HashMapT<int, CallLogDetails>* pLogsByNumber = CallLogManager::GetInstance()->GetCallogListByUnknownNumberFromDatabaseN(pNumber);
+ if(pLogsByNumber != null)
+ {
+ IListT<CallLogDetails>* logDetailsList = pLogsByNumber->GetValuesN();
+ if(logDetailsList != null)
+ {
+ //Convert to DialContacts
+ for(int index=0;index<logDetailsList->GetCount();index++)
+ {
+ CallLogDetails logDetails;
+ result r = logDetailsList->GetAt(index,logDetails);
+ if(r == E_SUCCESS)
+ {
+ DialContactInfo* pDialContact = ConvertLogDetailsToDialContactN(logDetails);
+ if(pDialContact != null)
+ {
+ if((__pContactsList->GetCount() <= 0) || (__pContactsList->Contains(*pDialContact) == false))
+ {
+ //Add only 'unknown' number to Map
+ __pContactsList->Add(pDialContact);
+ }
+ else
+ {
+ delete pDialContact;
+ pDialContact = null;
+ }
+ }
+ }
+ }
+ delete logDetailsList;
+ }
+ delete pLogsByNumber;
+ }
+}*/
+
+void
+RetrieveContactsListTask::SaveContactsToListByNumber(IList& saveList, String& matchedString)
+{
+ if(__pContactsList != null)
+ {
+ //List of contacts to be saved
+ for (int index = 0; index < saveList.GetCount(); index++)
+ {
+ Contact* pContact = static_cast<Contact*>(saveList.GetAt(index));
+ DialContactInfo* pDialContact = ConvertToDialContactN(*pContact, matchedString);
+ if (pDialContact != null)
+ {
+ //check if already present
+ int foundItemIndex;
+ if (__pContactsList->IndexOf(*pDialContact, foundItemIndex) != E_SUCCESS)
+ {
+ //save new mapping
+ __pContactsList->Add(pDialContact);
+ }
+ else
+ {
+ //Add search key to existing list
+ DialContactInfo* pExistingInfo = static_cast<DialContactInfo*>(__pContactsList->GetAt( foundItemIndex));
+ if (pExistingInfo != null)
+ {
+ pExistingInfo->AddSearchKey(*(pDialContact->GetSearchKey()));
+ }
+ delete pDialContact;
+ }
+ }
+ }
+ }
+}
+
+DialContactInfo*
+RetrieveContactsListTask::ConvertToDialContactN(Contact& contact, String& matchedString, bool isSpeedDialContact)
+{
+ result r = E_FAILURE;
+
+ //display name
+ String displayName;
+ r = contact.GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ TryReturn(r == E_SUCCESS,null,"Display name not available");
+
+ //phone number
+ String phoneNumber(L"");
+ IList* pNumberList = contact.GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if(pNumberList == null || pNumberList->GetCount() <= 0)
+ {
+ delete pNumberList;
+ return null;
+ }
+
+ if(DialUtil::IsNumericString(matchedString) == true)
+ {
+ //this contact searched by phone number or speed dial
+ IEnumerator* pPhoneEnum = pNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ if (isSpeedDialContact == true && pPhoneNumber->GetPhoneNumber().Equals(matchedString) == true)
+ {
+ //contact number is exact match
+ phoneNumber.Append(pPhoneNumber->GetPhoneNumber());
+ break;
+ }
+ //Check if this is the correct contact
+ else if (isSpeedDialContact == false && pPhoneNumber->GetPhoneNumber().Contains(matchedString) == true)
+ {
+ phoneNumber.Append(pPhoneNumber->GetPhoneNumber());
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ }
+ else
+ {
+ //this contact searched by name
+ PhoneNumber* pContactNo = static_cast<PhoneNumber*>(pNumberList->GetAt(0));
+ phoneNumber.Append(pContactNo->GetPhoneNumber());
+ }
+ pNumberList->RemoveAll(true);
+ delete pNumberList;
+ pNumberList = null;
+ TryReturn((phoneNumber.IsEmpty() == false), null, "No matching phone number found");
+
+ DialContactInfo* pDialContact = new (std::nothrow) DialContactInfo();
+ if (isSpeedDialContact == false)
+ {
+ pDialContact->AddSearchKey(matchedString);
+ }
+ else
+ {
+ String speedDialContact(IDS_SPEED_DIAL_SEARCH_KEY);
+ pDialContact->AddSearchKey(speedDialContact);
+ }
+
+ pDialContact->SetPhoneNumber(phoneNumber);
+ pDialContact->SetDisplayName(displayName);
+ pDialContact->SetRecordId(contact.GetRecordId());
+
+ //Check if Thumbnail is present
+ Bitmap* pThumbnail = contact.GetThumbnailN();
+ if(pThumbnail != null)
+ {
+ pDialContact->SetThumbnail(pThumbnail);
+ }
+ return pDialContact;
+}
+
+/*DialContactInfo*
+RetrieveContactsListTask::ConvertLogDetailsToDialContactN(CallLogDetails& logDetails)
+{
+ DialContactInfo* pDialContact = new (std::nothrow) DialContactInfo();
+ String emptyDisplayName(L"");
+ pDialContact->SetDisplayName(emptyDisplayName);
+ //call log db id
+ pDialContact->SetCallLogDbId(logDetails.GetCalllogDbId());
+
+ String phoneNumber(logDetails.GetPhoneNumber());
+ pDialContact->SetPhoneNumber(phoneNumber);
+ pDialContact->AddSearchKey(*__pNumberStr);
+ return pDialContact;
+}*/
+
+///////////////////////////////////////////////
+// SuggestionListComparer Implementation //////
+///////////////////////////////////////////////
+result
+SuggestionListComparer::Compare(const Object& objRef1, const Object& objRef2, int& cmpResult) const
+{
+ result r = E_INVALID_ARG;
+
+ //Check if both object are of type 'DialContactInfo'
+ DialContactInfo* pDialInfo1 = dynamic_cast<DialContactInfo*>(const_cast<Object*>(&objRef1));
+ DialContactInfo* pDialInfo2 = dynamic_cast<DialContactInfo*>(const_cast<Object*>(&objRef2));
+ if((pDialInfo1 == null) || (pDialInfo2 == null))
+ {
+ return r;
+ }
+ r = E_SUCCESS;
+
+ //Rules for comparison:-
+ //Priority 1 - show contacts for Speed dial.
+ //Priority 2 - show contacts searched by Name from Contacts.
+ //Priority 3 - show contacts searched by Number from Contacts.
+ //Priority 4 - show contacts searched by Number from Logs.
+
+ //Fetch initial search keys for both objects
+ String displayName1 = pDialInfo1->GetDisplayName();
+ String* searchKey1 = pDialInfo1->GetSearchKey();
+ bool isNumericKey1 = DialUtil::IsNumericString(*searchKey1);
+
+ String displayName2 = pDialInfo2->GetDisplayName();
+ String* searchKey2 = pDialInfo2->GetSearchKey();
+ bool isNumericKey2 = DialUtil::IsNumericString(*searchKey2);
+
+ //via Speed Dial
+ if(searchKey1->Equals(String(IDS_SPEED_DIAL_SEARCH_KEY)) == true)
+ {
+ cmpResult = 1;//objRef1 is searched via Speed Dial
+ return r;
+ }
+ else if (searchKey2->Equals(String(IDS_SPEED_DIAL_SEARCH_KEY)) == true)
+ {
+ cmpResult = 1;//objRef2 via Speed Dial
+ return r;
+ }
+
+ //via Logs
+ if((displayName1.IsEmpty() == false) && (displayName2.IsEmpty() == true))
+ {
+ cmpResult = -1;//objRef1 NOT via Logs, objRef2 via Logs
+ return r;
+ }
+ else if((displayName1.IsEmpty() == true) && (displayName2.IsEmpty() == false))
+ {
+ cmpResult = 1;//objRef2 NOT via Logs, objRef1 via Logs
+ return r;
+ }
+ else if((displayName1.IsEmpty() == true) && (displayName2.IsEmpty() == true))
+ {
+ //Both via Logs - keep the same ordering as shown in logs.
+ cmpResult = (pDialInfo2->GetCallLogDbId() - pDialInfo1->GetCallLogDbId());
+ return r;
+ }
+
+ //If control comes here, it means both Objects are fetched from Contacts.
+ //Here, priority is first Names than Numbers
+ if((isNumericKey1 == false) && (isNumericKey2 == true))
+ {
+ cmpResult = -1;//objRef1 via name and objRef2 via number
+ return r;
+ }
+ else if((isNumericKey2 == false) && (isNumericKey1 == true))
+ {
+ cmpResult = 1;//objRef2 via name and objRef1 via number
+ return r;
+ }
+ else if((isNumericKey1 == false) && (isNumericKey2 == false))
+ {
+ //Both searched via name - sort by alphabetic ordering of search key.
+ cmpResult = searchKey1->CompareTo(*searchKey2);
+ return r;
+ }
+ else
+ {
+ //Both searched via number - keep current ordering as fetched from contacts.
+ cmpResult = 0;//pDialInfo1->GetPhoneNumber().CompareTo(pDialInfo2->GetPhoneNumber());
+ return r;
+ }
+
+ return E_SUCCESS;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSceneRegister.cpp
+ * @brief Scene register file
+ */
+#include <FUi.h>
+#include "PhnSceneRegister.h"
+#include "PhnPhoneFormFactory.h"
+#include "PhnPanelFactory.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+SceneRegister::SceneRegister(void)
+{
+}
+
+SceneRegister::~SceneRegister(void)
+{
+}
+
+result
+SceneRegister::RegisterAllScenes(void)
+{
+ result r = E_SUCCESS;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ //Register factory methods for form & panel creation
+ static FormFactory formFactory;
+ static PanelFactory panelFactory;
+ r |= pSceneManager->RegisterFormFactory(formFactory);
+ r |= pSceneManager->RegisterPanelFactory(panelFactory);
+
+ //register all scenes
+ r |= pSceneManager->RegisterScene(IDSCN_DIALER, IDL_FORM_DIAL_APP, PANEL_DIALER);
+ r |= pSceneManager->RegisterScene(IDSCN_CALL_LOG, IDL_FORM_DIAL_APP, PANEL_LOGS);
+ r |= pSceneManager->RegisterScene(IDSCN_CALL_LOG_DETAILS, IDL_FORM_CALL_LOG_DETAIL, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_RESTRICTED_CALL_LOG_DETAILS, IDL_FORM_RESTRICTED_CALL_LOG_DETAIL, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_EMERGENCY_DIAL, IDL_FORM_EMERGENCY_DIAL, L"");
+
+ //Call Settings Scenes
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_MAIN_SETTING_MENU, IDL_FORM_MAIN_SETTING_MENU, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_REJECTLIST_MENU, IDL_FORM_CALL_REJECTLIST_MENU, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_REJECTMSGS_MENU, IDL_FORM_CALL_REJECTMSGS_MENU, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_SPEED_DIAL, IDL_FORM_SPEED_DIAL, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_MORE_OPTIONS, IDL_FORM_MORE_OPTIONS, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_STATUSTONES, IDL_FORM_CALL_STATUSTONES, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALLTYPE_FORWARD, IDL_FORM_CALLTYPE_FORWARD, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_FORWARD_OPTIONS, IDL_FORM_CALL_FORWARD_OPTIONS, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALLTYPE_BARRING, IDL_FORM_CALLTYPE_BARRING, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_BARRING_OPTIONS, IDL_FORM_CALL_BARRING_OPTIONS, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_WAITING_OPTIONS, IDL_FORM_CALL_WAITING_OPTIONS, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_ADD_REJECT_NUMBER, IDL_FORM_ADD_REJECT_NUMBER, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_AUTO_AREA_CODE, IDL_FORM_AUTO_AREA_CODE, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_ADD_REJECT_MSG, IDL_FORM_ADD_REJECT_MSG, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_EDIT_REJECT_MSG, IDL_FORM_EDIT_REJECT_MSG, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_FORWARD_TO_NUMBER, IDL_FORM_FORWARD_TO_NUMBER, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER, IDL_FORM_NOREPLY_FORWARD_TO_NUMBER, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_SET_BARRING_PWD, IDL_FORM_SCENE_SET_BARRING_PWD, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_DEL_NUMBER, IDL_FORM_DEL_NUMBER, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_DEL_MESSAGE, IDL_FORM_DEL_MESSAGE, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_ANSWER_OPTIONS, IDL_FORM_CALL_ANSWER_OPTIONS, L"");
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CALL_ACCESSORY_OPTIONS, IDL_FORM_CALL_ACCESSORY_OPTIONS, L"");
+
+ return r;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsAddNumberForm.cpp
+ * @brief Add Number form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsAddNumberForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include <FSystem.h>
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Social;
+using namespace Tizen::Base::Utility;
+
+static const int W_INVALID_CONTACT_POPUP = 640;
+static const int H_INVALID_CONTACT_POPUP = 250;
+static const int IDA_ADD_NUMBER_INVALID_POPUP_OK = 102;
+static const int FONT_SIZE_AUTOREJECT_POPUP_TEXT = 36;
+
+const int X_OK_BUTTON = 170;
+const int Y_OK_BUTTON = 80;
+const int W_OK_BUTTON = 300;
+const int H_OK_BUTTON = 80;
+
+static const wchar_t* IDL_SETTINGS_ADD_NUMBER_FORM = L"IDL_SETTINGS_ADD_NUMBER_FORM";
+static const wchar_t* IDL_SETTINGS_AUTO_AREA_CODE_FORM = L"IDL_SETTINGS_AUTO_AREA_CODE_FORM";
+static const wchar_t* IDS_ALREADY_USED_MSG = L"IDS_ALREADY_USED_MSG";
+static const wchar_t* IDS_SETTING_ENTER_NUMBER_STRING = L"IDS_SETTING_ENTER_NUMBER_STRING";
+
+SettingsAddNumberForm::SettingsAddNumberForm(FormType formType)
+ : __formType(formType)
+ , __selectedCriteria(CRITERIAOPTIONS_EXACT)
+ , __isCriteriaOptionsMenuExpanded(false)
+ , __isMatchCriteriaMenuItemSelected(false)
+ , __activePrefixDialingNumber(L"")
+ , __isContactAppControlLaunched(false)
+ , __pEditFieldNumber(null)
+ , __pContactBtn(null)
+ , __isKeypadShown(false)
+ ,__pInvalidContactPopup(null)
+ ,__editFieldText(L"")
+ ,__pickedContactId(L"")
+{
+}
+
+SettingsAddNumberForm::~SettingsAddNumberForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+}
+
+void
+SettingsAddNumberForm::Initialize(void)
+{
+ switch (__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ Construct(IDL_SETTINGS_ADD_NUMBER_FORM);
+ }
+ break;
+
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ Construct(IDL_SETTINGS_AUTO_AREA_CODE_FORM);
+ }
+ break;
+ }
+}
+
+result
+SettingsAddNumberForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ //Initialize Header & Footer
+ InitializeHeaderAndFooter();
+ //Initialize table view
+ r = InitializeGroupedTableView();
+ TryReturn(r == E_SUCCESS,r,"GroupedTableView initialization failed");
+ return r;
+}
+
+void
+SettingsAddNumberForm::InitializeHeaderAndFooter(void)
+{
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetStyle(HEADER_STYLE_TITLE);
+ String title(L"");
+ switch (__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_ADD_NUMBER_TITLE));
+ }
+ break;
+
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_AUTO_AREA_CODE_TITLE));
+ }
+ break;
+ }
+ pHeader->SetTitleText(title);
+ }
+
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ //change style to show "save" in center
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ //'Save' item
+ String saveItemName;
+ saveItemName.Append(AppUtility::GetResourceString(IDS_SETTING_SAVE_HEADER_ITEM));
+ FooterItem saveFooterItem;
+ saveFooterItem.Construct(IDA_SAVE_FOOTER_ITEMID);
+ saveFooterItem.SetText(saveItemName);
+ pFooter->AddItem(saveFooterItem);
+ //disable save button
+ EnableSaveButton(false);
+
+ //'Cancel' item
+ SetFormBackEventListener(this);
+
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsAddNumberForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SettingsAddNumberForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case IDA_SAVE_FOOTER_ITEMID:
+ {
+ SettingsPresentationModel* pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ String editFieldNumber;
+ if ((__pEditFieldNumber != null) && (__pEditFieldNumber->GetTextLength() != 0))
+ {
+ editFieldNumber.Append(__pEditFieldNumber->GetText());
+ //Check if number starts with pause(; or p) if so its a invalid number
+ //so just go to previous form without saving
+ String phoneNumberPattern(L";|p");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(editFieldNumber,false);
+ if(resultMatch == true) // if it starts with ; or p go to previous form without saving
+ {
+ bool keypadFocus = __pEditFieldNumber->HasFocus();
+ String msg(L"");
+ msg.Append(editFieldNumber);
+ msg.Append(L" is an invalid number.");
+ ShowDuplicateErrorMessageBox(msg);
+ if(keypadFocus == true)
+ {
+ __pEditFieldNumber->SetFocus();
+ }
+ return;
+ }
+ }
+ //handle save
+ switch (__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ if(editFieldNumber.IsEmpty() == false)
+ {
+ CallRejectMatchCondition matchCondition = (CallRejectMatchCondition)(__selectedCriteria + 1);
+ result r = pSettingsPresentor->AddToCallRejectList(editFieldNumber, matchCondition);
+ if(r == E_OBJ_ALREADY_EXIST)
+ {
+ //Show error message box and go back to previous screen
+ String msg(L"");
+ msg.Append(editFieldNumber);
+ msg.Append(L" (");
+ msg.Append(FetchTextForCriteria(__selectedCriteria));
+ msg.Append(L") ");
+ msg.Append(AppUtility::GetResourceString(IDS_ALREADY_USED_MSG));
+ ShowDuplicateErrorMessageBox(msg);
+
+ }
+ GoBackToPreviousForm();
+ }
+ }
+ break;
+
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ if(editFieldNumber.IsEmpty() == false)
+ {
+ result r = pSettingsPresentor->SetPrefixDialNumber(0, editFieldNumber);
+ if (r == E_SUCCESS)
+ {
+ pSettingsPresentor->SetActivePrefixDialingValue(0);
+ pSettingsPresentor->SetPrefixDialingStatus(true);
+ }
+ }
+ else
+ {
+ pSettingsPresentor->SetPrefixDialingStatus(false);
+ }
+ GoBackToPreviousForm();
+ }
+ break;
+ }
+ }
+ break;
+
+ case IDA_SELECT_CONTACT:
+ {
+ LaunchContactsAppControl();
+ }
+ break;
+
+ case IDA_POPUP_INVALID_OK:
+ {
+ if(__pInvalidContactPopup != null)
+ {
+ __pInvalidContactPopup->SetShowState(false);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+SettingsAddNumberForm::ShowDuplicateErrorMessageBox(String& message)
+{
+ // Creates an instance of MessageBox
+ MessageBox duplicateMsgBox;
+ duplicateMsgBox.Construct(L"", message, MSGBOX_STYLE_NONE, 2000);
+
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ SetFocus();
+ duplicateMsgBox.ShowAndWait(modalResult);
+}
+
+void
+SettingsAddNumberForm::LaunchContactsAppControl(void)
+{
+ AppLogDebug("Enter");
+ if (__isContactAppControlLaunched == true)
+ {
+ //app control already launched.
+ return;
+ }
+ //launch app control
+ __isContactAppControlLaunched = true;
+ result r = E_SUCCESS;
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(SELECTION_MODE), new (std::nothrow) String(SELECTION_MODE_SINGLE));
+ extraData.Add(new (std::nothrow) String(RETURN_TYPE), new (std::nothrow) String(RETURN_TYPE_ITEM_ID));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
+
+ AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_PICK);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ if(r != E_SUCCESS)
+ {
+ //app control request failed.
+ __isContactAppControlLaunched = false;
+ }
+ delete pAc;
+ }
+ extraData.RemoveAll(true);
+
+ if (!IsFailed(r))
+ {
+ UiApp::GetInstance()->GetAppFrame()->GetFrame()->SetEnabled(false);
+ }
+
+}
+
+void
+SettingsAddNumberForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ AppLogDebug("Enter");
+ if (appId.Equals(String(PROVIDER_ID_CONTACTS)) && operationId.Equals(String(OPERATION_ID_PICK)))
+ {
+ //app control request completed.
+ __isContactAppControlLaunched = false;
+ //check if request was successful.
+ if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+ {
+ const ArrayList* rettype = static_cast<const ArrayList*>(pExtraData->GetValue(String(CONTACT_KEY_ITEM_ID)));
+ if (rettype != null)
+ {
+ const String* pPickedContactId = static_cast<const String *>(rettype->GetAt(0));
+ __pickedContactId = L"";
+ if (pPickedContactId != null && pPickedContactId->IsEmpty() == false)
+ {
+ //Fetch phone number and contact photo from AddressBook
+ Addressbook* pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if (pAddressBook != null)
+ {
+ RecordId contactId = INVALID_RECORD_ID;
+ Integer::Parse(*pPickedContactId, contactId);
+ __pickedContactId = *pPickedContactId;
+ Contact* pContact = pAddressBook->GetContactN(contactId);
+ if (pContact != null)
+ {
+ //fetch phone number
+ String phoneNumber(L"");
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null && pPhoneNumberList->GetCount() > 0)
+ {
+ //There is no API for fetching default phone number.
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneNumberList->GetAt(0);
+ phoneNumber.Append(pPhoneNumber->GetPhoneNumber());
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+
+ //set Phone number
+ if (phoneNumber.IsEmpty() == false && __pEditFieldNumber != null /*&& phoneNumber.Equals(__pEditFieldNumber->GetText()) == false*/)
+ {
+ //set bitmap
+ Bitmap* pContactPhoto = pContact->GetThumbnailN();
+ //SetBitmapToContactButton(pContactPhoto);
+ delete pContactPhoto;
+ pContactPhoto = null;
+
+ __pEditFieldNumber->SetText(phoneNumber);
+ __editFieldText = __pEditFieldNumber->GetText();
+ __pEditFieldNumber->Invalidate(true);
+ //enable "save" button
+ AppLogDebug("%ls %ls",__activePrefixDialingNumber.GetPointer(), phoneNumber.GetPointer());
+ if(__activePrefixDialingNumber.Equals(phoneNumber) == false)
+ {
+ EnableSaveButton(true);
+ }
+ else
+ {
+ EnableSaveButton(false);
+ }
+
+ }
+ else if(phoneNumber.IsEmpty() == true)
+ {
+ ShowInvalidContactPopup();
+ }
+
+ }
+ delete pAddressBook;
+ pAddressBook = null;
+ }
+ }
+ }
+ }
+ }
+}
+
+void
+SettingsAddNumberForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ __isMatchCriteriaMenuItemSelected = false;
+ __isContactAppControlLaunched = false;
+
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ pMainMenuTableView->UpdateTableView();
+ }
+ if (__pEditFieldNumber != null)
+ {
+ __isKeypadShown = false;
+ //clear edit field
+ __pEditFieldNumber->Clear();
+ __pEditFieldNumber->SetFocus();
+ __pEditFieldNumber->SetPropagatedKeyEventListener(this);
+ __editFieldText = L"";
+ }
+ //disable "save" button
+ EnableSaveButton(false);
+ //clear bitmap on "contact" button
+ if (__pContactBtn != null)
+ {
+ SetBitmapToContactButton(null);
+ __pickedContactId = L"";
+ }
+
+ switch (__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ __selectedCriteria = CRITERIAOPTIONS_EXACT;
+ //set default item as checked
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //by default, "exact match" option is selected
+ pMainMenuTableView->SetItemChecked(GROUP_CRITERIA_OPTIONS, __selectedCriteria, true);
+ //un-check all other items
+ pMainMenuTableView->SetItemChecked(GROUP_CRITERIA_OPTIONS, CRITERIAOPTIONS_STARTSWITH, false);
+ pMainMenuTableView->SetItemChecked(GROUP_CRITERIA_OPTIONS, CRITERIAOPTIONS_ENDSWITH, false);
+ pMainMenuTableView->SetItemChecked(GROUP_CRITERIA_OPTIONS, CRITERIAOPTIONS_INCLUDE, false);
+
+ pMainMenuTableView->RefreshItem(GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ pMainMenuTableView->Invalidate(true);
+ }
+ }
+ break;
+
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ __activePrefixDialingNumber.Clear();
+ //Fetch active prefix
+ SettingsPresentationModel* pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ if(pSettingsPresentor != null)
+ {
+ result r = pSettingsPresentor->GetActivePrefixDialNumber(__activePrefixDialingNumber);
+ if(r == E_SUCCESS && __activePrefixDialingNumber.IsEmpty() == false && __pEditFieldNumber != null)
+ {
+ __pEditFieldNumber->SetText(__activePrefixDialingNumber);
+ //We are now not setting the contact image to the Auto Area code contact button
+ //SearchAndSetBitmapToContactButton(__activePrefixDialingNumber);
+
+ }
+ }
+ }
+ break;
+ }
+}
+
+void
+SettingsAddNumberForm::SearchAndSetBitmapToContactButton(String& phoneNumber)
+{
+
+ bool contactFound = false;
+ Addressbook* pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if (pAddressBook != null)
+ {
+ IList* pNumberContactsList = pAddressBook->SearchContactsByPhoneNumberN(phoneNumber);
+ if(pNumberContactsList != null)
+ {
+
+ IEnumerator* pContactEnum = pNumberContactsList->GetEnumeratorN();
+ while (E_SUCCESS == pContactEnum->MoveNext())
+ {
+ Contact* pContact = static_cast<Contact*>(pContactEnum->GetCurrent());
+ if (pContact != null)
+ {
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetPhoneNumber().Equals(phoneNumber))
+ {
+ Bitmap* pContactPhoto = pContact->GetThumbnailN();
+ //SetBitmapToContactButton(pContactPhoto);
+ delete pContactPhoto;
+ pContactPhoto = null;
+ contactFound = true;
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+
+ }
+ if(contactFound == true)
+ {
+ break;
+ }
+ }
+ delete pContactEnum;
+ pNumberContactsList->RemoveAll(true);
+ delete pNumberContactsList;
+ }
+ else
+ {
+
+ }
+
+ }
+}
+
+void
+SettingsAddNumberForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ //Hide Keypad
+ if (__pEditFieldNumber != null)
+ {
+ __pEditFieldNumber->HideKeypad();
+ __pEditFieldNumber->SetPropagatedKeyEventListener(null);
+
+ }
+ //close drop-down menu
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null && pMainMenuTableView->IsGroupExpanded(GROUP_CRITERIA_OPTIONS) == true)
+ {
+ pMainMenuTableView->CollapseGroup(GROUP_CRITERIA_OPTIONS);
+ __isCriteriaOptionsMenuExpanded = false;
+ //Change icon
+ pMainMenuTableView->RefreshItem(GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
+
+void
+SettingsAddNumberForm::InitializeNumberEditField(TableViewItem* pItem)
+{
+ //"Enter number" Label
+ Rectangle itemRect = pItem->GetBounds();
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+
+ itemRect.x += X_LIST_MENU_TEXT_ITEM;
+ itemRect.y += 18;
+ itemRect.width = itemRect.width - (2 * X_LIST_MENU_TEXT_ITEM) - W_CONTACT_ICON - 16;
+ itemRect.height = 42;
+
+ Label* pNumberLbl = static_cast<Label*>(pItem->GetControl(IDC_ENTER_NUMBER_LABEL, true));
+ if (pNumberLbl == null)
+ {
+ pNumberLbl = new (std::nothrow) Label();
+ String name = AppUtility::GetResourceString(IDS_SETTING_ENTER_NUMBER_STRING);
+ pNumberLbl->Construct(itemRect, name);
+ pNumberLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pNumberLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pNumberLbl->SetTextConfig(32, LABEL_TEXT_STYLE_NORMAL);
+ pNumberLbl->SetTextColor(Color32<128, 128, 128>::Value);
+ pNumberLbl->SetName(IDC_ENTER_NUMBER_LABEL);
+ pItem->AddControl(pNumberLbl);
+ }
+ else
+ {
+ pNumberLbl->SetBounds(itemRect);
+ }
+
+ //EditField
+ itemRect.y += itemRect.height;
+ itemRect.height = mainItemTextSize;
+
+ EditField* pEditFieldNumber = static_cast<EditField*>(pItem->GetControl(IDC_NUMBER_EDITFIELD, true));
+ if (pEditFieldNumber == null)
+ {
+ pEditFieldNumber = new (std::nothrow) EditField();
+ pEditFieldNumber->Construct(itemRect, EDIT_FIELD_STYLE_PHONE_NUMBER, INPUT_STYLE_OVERLAY, EDIT_FIELD_TITLE_STYLE_NONE);
+ pEditFieldNumber->SetName(IDC_NUMBER_EDITFIELD);
+ pEditFieldNumber->SetTextSize(mainFontSize);
+ pEditFieldNumber->AddKeypadEventListener(*this);
+ pEditFieldNumber->AddTextEventListener(*this);
+ pEditFieldNumber->SetOverlayKeypadCommandButtonVisible(false);
+ pEditFieldNumber->SetKeypadActionEnabled(false);
+ //Adds the edit field to the table item
+ pItem->AddControl(*pEditFieldNumber);
+ __pEditFieldNumber = pEditFieldNumber;
+ }
+ else
+ {
+ pEditFieldNumber->SetBounds(itemRect);
+ }
+
+ //Contact Button
+ itemRect.x += itemRect.width + 16;
+ itemRect.y = itemRect.y + (itemRect.height/2 - H_CONTACT_ICON/2);
+ itemRect.width = W_CONTACT_ICON;
+ itemRect.height = H_CONTACT_ICON;
+
+ Button* pContactBtn = static_cast<Button*>(pItem->GetControl(IDC_SELECT_CONTACT_BUTTON, true));
+ String contactButtonName;
+ contactButtonName.Append(AppUtility::GetResourceString(IDS_SETTING_CONTACT_BUTTON));
+ if (pContactBtn == null)
+ {
+ pContactBtn = new (std::nothrow) Button();
+ pContactBtn->Construct(itemRect, L"");
+ pContactBtn->SetName(IDC_SELECT_CONTACT_BUTTON);
+ pContactBtn->SetText(contactButtonName);
+ pContactBtn->SetTextColor(Color(0,0,0,0));
+ pContactBtn->SetHighlightedTextColor(Color(0,0,0,0));
+ pContactBtn->SetActionId(IDA_SELECT_CONTACT);
+ pContactBtn->SetPressedTextColor(Color(0,0,0,0));
+ pContactBtn->SetDisabledTextColor(Color(0,0,0,0));
+ pContactBtn->AddActionEventListener(*this);
+ //Adds the contact button to the table item
+ pItem->AddControl(*pContactBtn);
+ __pContactBtn = pContactBtn;
+ }
+ else
+ {
+ pContactBtn->SetBounds(itemRect);
+ }
+
+ pItem->SetIndividualSelectionEnabled(pNumberLbl, true);
+ pItem->SetIndividualSelectionEnabled(__pEditFieldNumber, true);
+ pItem->SetIndividualSelectionEnabled(__pContactBtn, true);
+}
+
+void
+SettingsAddNumberForm::SetBitmapToContactButton(Bitmap* pContactPhoto)
+{
+ AppLogDebug("Enter");
+ Bitmap* pContactPressedPhoto = null;
+ if (__pContactBtn == null)
+ {
+ return;
+ }
+ int imgWidth = __pContactBtn->GetWidth();
+ int imgHeight = __pContactBtn->GetHeight();
+
+ //normal canvas
+ Canvas normalCanvas;
+ normalCanvas.Construct(Rectangle(0, 0, imgWidth, imgHeight));
+ //press canvas
+ Canvas pressedCanvas;
+ pressedCanvas.Construct(Rectangle(0, 0, imgWidth, imgHeight));
+
+ if(pContactPhoto != null)
+ {
+ pContactPressedPhoto = pContactPhoto;
+ }
+
+ //fetch contacts photo or show default image
+ if (pContactPhoto == null)
+ {
+ pContactPhoto = AppUtility::GetBitmapFromResourcesN(IDB_SELECT_CONTACT_ICON_NORMAL, imgWidth, imgHeight);
+ }
+ else
+ {
+ pContactPhoto->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pContactPhoto->Scale(Dimension(imgWidth, imgHeight));
+ }
+
+ if (pContactPressedPhoto == null)
+ {
+ pContactPressedPhoto = AppUtility::GetBitmapFromResourcesN(IDB_SELECT_CONTACT_ICON_PRESSED, imgWidth, imgHeight);
+ }
+ else
+ {
+ pContactPressedPhoto->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pContactPressedPhoto->Scale(Dimension(imgWidth, imgHeight));
+ }
+
+ normalCanvas.DrawBitmap(Point(0,0), *pContactPhoto);
+ pressedCanvas.DrawBitmap(Point(0,0), *pContactPressedPhoto);
+
+ //normal bg bitmap
+ Bitmap* pFrameBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SELECT_CONTACT_BG_ICON, imgWidth, imgHeight);
+ normalCanvas.DrawBitmap(Point(0,0), *pFrameBitmap);
+ delete pFrameBitmap;
+ //pressed bg bitmap
+ pFrameBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SELECT_CONTACT_PRESS_BG_ICON, imgWidth, imgHeight);
+ pressedCanvas.DrawBitmap(Point(0,0), *pFrameBitmap);
+ delete pFrameBitmap;
+ pFrameBitmap = null;
+
+ //set bitmap to button
+ Bitmap* pBgBitmap = new (std::nothrow) Bitmap();
+ pBgBitmap->Construct(normalCanvas,normalCanvas.GetBounds());
+ __pContactBtn->SetNormalBackgroundBitmap(*pBgBitmap);
+ delete pBgBitmap;
+ Bitmap* pBgPressBitmap = new (std::nothrow) Bitmap();
+ pBgPressBitmap->Construct(pressedCanvas,pressedCanvas.GetBounds());
+ __pContactBtn->SetPressedBackgroundBitmap(*pBgPressBitmap);
+ delete pBgPressBitmap;
+ __pContactBtn->Invalidate(true);
+}
+
+void
+SettingsAddNumberForm::GoBackToPreviousForm(void)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ SetFocus();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTLIST_MENU), null);
+ }
+ break;
+
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ SetFocus();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MORE_OPTIONS), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+result
+SettingsAddNumberForm::InitializeGroupedTableView(void)
+{
+ result r = E_SUCCESS;
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //pMainMenuTableView->SetGroupedLookEnabled(true);
+ pMainMenuTableView->SetItemProvider(this);
+ r = pMainMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMainMenuTableView->UpdateTableView();
+
+ if (__formType == FORMTYPE_NUMBER_TO_REJECT)
+ {
+ CollapseSelectiveGroups(pMainMenuTableView);
+ pMainMenuTableView->SetItemEnabled(GROUP_ENTER_NUMBER, -1, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_SELECT_CRITERIA, -1, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_CRITERIA_OPTIONS, -1, false);
+
+ }
+ if (__formType == FORMTYPE_AUTO_AREA_CODE)
+ {
+ pMainMenuTableView->SetItemEnabled(0, -1, false);
+ }
+ }
+ return r;
+}
+
+void
+SettingsAddNumberForm::CollapseSelectiveGroups(GroupedTableView* pMainMenuTableView)
+{
+ //Expand other groups
+ pMainMenuTableView->ExpandGroup(GROUP_ENTER_NUMBER);
+ pMainMenuTableView->ExpandGroup(GROUP_SELECT_CRITERIA);
+ pMainMenuTableView->CollapseGroup(GROUP_CRITERIA_OPTIONS);
+}
+
+void
+SettingsAddNumberForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ switch (groupIndex)
+ {
+ case GROUP_SELECT_CRITERIA:
+ {
+ //NOTE:- Hiding of Keypad takes time. This causes the drop-down items to not be available for first time.
+ //So, we will now call ToggleGroupExpansion() in "OnKeypadClosed()" callback.
+ //close overlay keypad
+ if (__pEditFieldNumber != null)
+ {
+ if (__isKeypadShown == true)
+ {
+ __isMatchCriteriaMenuItemSelected = true;
+ __pEditFieldNumber->HideKeypad();
+ }
+ else
+ {
+ //keypad is already closed. Open Drop-Down menu
+ ToggleGroupExpansion(tableView, groupIndex, itemIndex);
+ }
+ }
+ }
+ break;
+
+ case GROUP_CRITERIA_OPTIONS:
+ {
+ HandleMatchingCriteriaSelected(tableView, itemIndex, status);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+int
+SettingsAddNumberForm::GetGroupCount(void)
+{
+ int groupCount = GROUP_TOTALCOUNT;
+ if (__formType == FORMTYPE_AUTO_AREA_CODE)
+ {
+ groupCount = 1;
+ }
+ return groupCount;
+}
+
+int
+SettingsAddNumberForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_ENTER_NUMBER:
+ {
+ itemCount = ENTERNUMBER_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_SELECT_CRITERIA:
+ {
+ itemCount = SELECTCRITERIA_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CRITERIA_OPTIONS:
+ {
+ itemCount = CRITERIAOPTIONS_TOTALCOUNT;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsAddNumberForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ return pItem;
+}
+
+bool
+SettingsAddNumberForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsAddNumberForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsAddNumberForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ TableViewItem* pItem = null;
+
+ switch (groupIndex)
+ {
+ case GROUP_ENTER_NUMBER:
+ {
+ pItem = CreateContactEditFieldItem(itemWidth);
+ }
+ break;
+
+ case GROUP_SELECT_CRITERIA:
+ {
+ pItem = CreateExpandableCriteriaItem(itemWidth);
+ }
+ break;
+
+ case GROUP_CRITERIA_OPTIONS:
+ {
+ pItem = CreateCriteriaOptionsMenuItem(itemIndex, itemWidth);
+ }
+ break;
+
+ default:
+ break;
+ }
+ return pItem;
+}
+
+bool
+SettingsAddNumberForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsAddNumberForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ AppLog("Enter");
+ int bufferWidth = 100;
+ int itemWidth = pItem->GetWidth();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+
+ if (groupIndex == GROUP_ENTER_NUMBER)
+ {
+ //update edit field, contact button bounds
+ InitializeNumberEditField(pItem);
+
+ //Add background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch(__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ position = TABLEVIEWITEMPOS_TOP;
+ break;
+ case FORMTYPE_AUTO_AREA_CODE:
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ break;
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ //Used same background color for Pressed state as shown in normal state.
+ Color bgColor = pItem->GetBackgroundColor(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED);
+ }
+ else if (groupIndex == GROUP_SELECT_CRITERIA && itemIndex == SELECTCRITERIA_MATCH_CRITERIA)
+ {
+ //main text
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM)
+ - W_EXPAND_ICON), mainItemTextSize);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(IDC_MATCHCRITERIA_MAINTEXT_LABEL, true));
+ if (pItemLbl != null)
+ {
+ pItemLbl->SetBounds(mainItemRect);
+ pItemLbl->Invalidate(true);
+ }
+
+ String subText = FetchTextForCriteria(__selectedCriteria);
+ //sub text item
+ Label* pSubTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_SELECTEDOPTION_SUBTEXT_LABEL, true));
+ if(pSubTxtLbl != null)
+ {
+ pSubTxtLbl->SetText(subText);
+ }
+ //set background bitmap according to position in group
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_BOTTOM);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isCriteriaOptionsMenuExpanded);
+ }
+ else if (groupIndex == GROUP_CRITERIA_OPTIONS)
+ {
+ //text item rectangle
+ //Rectangle optionsItemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ itemName.Append(FetchTextForCriteria(itemIndex));
+ Label* pOptionsItemLbl = static_cast<Label*>(pItem->GetControl(itemName, true));
+ if (pOptionsItemLbl != null)
+ {
+ Rectangle optionsItemRect(pOptionsItemLbl->GetX(), 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - bufferWidth), H_LIST_NORMAL_MENU_ITEM);
+ pOptionsItemLbl->SetBounds(optionsItemRect);
+ pOptionsItemLbl->Invalidate(true);
+ }
+ //TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ if (itemIndex == CRITERIAOPTIONS_INCLUDE)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else if(itemIndex == CRITERIAOPTIONS_EXACT)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+}
+
+int
+SettingsAddNumberForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsAddNumberForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+TableViewItem*
+SettingsAddNumberForm::CreateContactEditFieldItem(int itemWidth)
+{
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int editFieldNameLabelHeight = 42;
+ int bottomMargin = 50;
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, bottomMargin + mainItemTextSize + editFieldNameLabelHeight),
+ TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //Add "Enter number" Label, EditField, contact button
+ InitializeNumberEditField(pItem);
+
+ UpdateCallRejectionDetail();
+ //Add background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch(__formType)
+ {
+ case FORMTYPE_NUMBER_TO_REJECT:
+ position = TABLEVIEWITEMPOS_TOP;
+ break;
+ case FORMTYPE_AUTO_AREA_CODE:
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ break;
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ //Used same background color for Pressed state as shown in normal state.
+ Color bgColor = pItem->GetBackgroundColor(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ pItem->SetBackgroundColor(bgColor, TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED);
+ return pItem;
+}
+
+
+void
+SettingsAddNumberForm::UpdateCallRejectionDetail()
+{
+ AppLogDebug("Enter");
+
+ if (__pEditFieldNumber != null && __formType == FORMTYPE_NUMBER_TO_REJECT)
+ {
+ bool activateSave = false;
+ __pEditFieldNumber->SetText(__editFieldText);
+ if(__pEditFieldNumber->GetText().IsEmpty() == false)
+ {
+ activateSave = true;
+ }
+ EnableSaveButton(activateSave);
+ }
+ if (__pickedContactId.IsEmpty() == false)
+ {
+ //Fetch contact photo from AddressBook
+ Addressbook* pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if (pAddressBook != null)
+ {
+ RecordId contactId = INVALID_RECORD_ID;
+ Integer::Parse(__pickedContactId, contactId);
+ Contact* pContact = pAddressBook->GetContactN(contactId);
+ if (pContact != null)
+ {
+ //set bitmap
+ Bitmap* pContactPhoto = pContact->GetThumbnailN();
+ //SetBitmapToContactButton(pContactPhoto);
+ SetBitmapToContactButton(null);
+ delete pContactPhoto;
+ pContactPhoto = null;
+ }
+ else
+ {
+ SetBitmapToContactButton(null);
+ }
+ delete pAddressBook;
+ pAddressBook = null;
+ }
+ }
+ else
+ {
+ SetBitmapToContactButton(null);
+ }
+}
+
+TableViewItem*
+SettingsAddNumberForm::CreateExpandableCriteriaItem(int itemWidth)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ //main text
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ mainItemTextSize);
+ String mainText = AppUtility::GetResourceString(IDS_SETTINGS_MATCHCRITERIA_STRING);
+ //sub text
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, (Y_LIST_MENU_TEXT_ITEM + mainItemTextSize),
+ (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON), subItemTextSize);
+ String subText = FetchTextForCriteria(__selectedCriteria);
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, itemRectSize), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ //main text item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pMainTxtLbl = new (std::nothrow) Label();
+ pMainTxtLbl->Construct(mainItemRect, mainText);
+ pMainTxtLbl->SetName(IDC_MATCHCRITERIA_MAINTEXT_LABEL);
+ pMainTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMainTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pMainTxtLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pMainTxtLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);
+ pItem->AddControl(pMainTxtLbl);
+ //sub text item
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetName(IDC_SELECTEDOPTION_SUBTEXT_LABEL);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ pItem->AddControl(*pSubTxtLbl);
+
+ //set background bitmap according to position in group
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_BOTTOM);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isCriteriaOptionsMenuExpanded);
+ return pItem;
+}
+
+String
+SettingsAddNumberForm::FetchTextForCriteria(int itemIndex)
+{
+ //default text
+ String subText = AppUtility::GetResourceString(IDS_MATCHCRITERIA_EXACT);
+ switch(itemIndex)
+ {
+ case CRITERIAOPTIONS_EXACT:
+ subText = AppUtility::GetResourceString(IDS_MATCHCRITERIA_EXACT);
+ break;
+
+ case CRITERIAOPTIONS_STARTSWITH:
+ subText = AppUtility::GetResourceString(IDS_MATCHCRITERIA_START);
+ break;
+
+ case CRITERIAOPTIONS_ENDSWITH:
+ subText = AppUtility::GetResourceString(IDS_MATCHCRITERIA_END);
+ break;
+
+ case CRITERIAOPTIONS_INCLUDE:
+ subText = AppUtility::GetResourceString(IDS_MATCHCRITERIA_INCLUDE);
+ break;
+
+ default:
+ break;
+ }
+
+ return subText;
+}
+
+void
+SettingsAddNumberForm::ToggleGroupExpansion(GroupedTableView& tableView, int groupIndex, int itemIndex)
+{
+ switch (itemIndex)
+ {
+ case SELECTCRITERIA_MATCH_CRITERIA:
+ {
+ if (tableView.IsGroupExpanded(GROUP_CRITERIA_OPTIONS) == true)
+ {
+ tableView.CollapseGroup(GROUP_CRITERIA_OPTIONS);
+ __isCriteriaOptionsMenuExpanded = false;
+ }
+ else
+ {
+ tableView.ExpandGroup(GROUP_CRITERIA_OPTIONS);
+ __isCriteriaOptionsMenuExpanded = true;
+ }
+ //Change icon
+ tableView.RefreshItem(GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+TableViewItem*
+SettingsAddNumberForm::CreateCriteriaOptionsMenuItem(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ int bufferWidth = 100;
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+ pItem->SetBackgroundColor(COLOR_SECONDDEPTH_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - bufferWidth), H_LIST_NORMAL_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ itemName.Append(FetchTextForCriteria(itemIndex));
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetName(itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);
+ pItem->AddControl(pItemLbl);
+
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ if (itemIndex == CRITERIAOPTIONS_INCLUDE)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else if(itemIndex == CRITERIAOPTIONS_EXACT)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+
+ return pItem;
+}
+
+void
+SettingsAddNumberForm::HandleMatchingCriteriaSelected(GroupedTableView& tableView, int itemIndex, TableViewItemStatus status)
+{
+ //check if already checked item is selected
+ if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ tableView.SetItemChecked(GROUP_CRITERIA_OPTIONS, itemIndex, true);
+ __selectedCriteria = (GroupCriteriaOptionsItems) itemIndex;
+ return;
+ }
+ //un-check previous selected options
+ if(__selectedCriteria != (GroupCriteriaOptionsItems(itemIndex)))
+ {
+ tableView.SetItemChecked(GROUP_CRITERIA_OPTIONS, __selectedCriteria, false);
+ tableView.RefreshItem(GROUP_CRITERIA_OPTIONS, __selectedCriteria, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ //update selected criteria to latest checked itemIndex
+ __selectedCriteria = (GroupCriteriaOptionsItems) itemIndex;
+ //change sub text for criteria options menu
+ tableView.RefreshItem(GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ tableView.Invalidate(true);
+}
+
+void
+SettingsAddNumberForm::OnKeypadWillOpen(Control& source)
+{
+
+}
+
+void
+SettingsAddNumberForm::OnKeypadOpened(Control& source)
+{
+ __isKeypadShown = true;
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null && __isCriteriaOptionsMenuExpanded == true)
+ {
+ pMainMenuTableView->CollapseGroup(GROUP_CRITERIA_OPTIONS);
+ __isCriteriaOptionsMenuExpanded = false;
+ //Change icon
+ pMainMenuTableView->RefreshItem(GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
+
+void
+SettingsAddNumberForm::OnKeypadClosed(Control& source)
+{
+ //Keypad is closed.
+ __isKeypadShown = false;
+ //Now, we can open drop-down Group menu item.
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null && __isMatchCriteriaMenuItemSelected == true)
+ {
+ ToggleGroupExpansion(*pMainMenuTableView, GROUP_SELECT_CRITERIA, SELECTCRITERIA_MATCH_CRITERIA);
+ __isMatchCriteriaMenuItemSelected = false;
+ }
+}
+
+void
+SettingsAddNumberForm::OnTextValueChanged(const Control& source)
+{
+ //enable or disable save button
+ if (__pEditFieldNumber != null)
+ {
+ bool activateSave = false;
+ switch (__formType)
+ {
+ case FORMTYPE_AUTO_AREA_CODE:
+ {
+ if (__activePrefixDialingNumber.Equals(__pEditFieldNumber->GetText()) == false)
+ {
+ activateSave = true;
+ }
+ if(__pEditFieldNumber->GetText().IsEmpty() == true)
+ {
+ SetBitmapToContactButton(null);
+ __pickedContactId = L"";
+ }
+ }
+ break;
+
+ case FORMTYPE_NUMBER_TO_REJECT:
+ {
+ __editFieldText = __pEditFieldNumber->GetText();
+ if(__pEditFieldNumber->GetText().IsEmpty() == false)
+ {
+ activateSave = true;
+ }
+ else if(__pEditFieldNumber->GetText().IsEmpty() == true)
+ {
+ SetBitmapToContactButton(null);
+ __pickedContactId = L"";
+ }
+ }
+ break;
+ }
+ EnableSaveButton(activateSave);
+ }
+}
+
+void
+SettingsAddNumberForm::OnTextValueChangeCanceled(const Control& source)
+{
+ //text change canceled, disable save button
+ if (__pEditFieldNumber != null)
+ {
+ __editFieldText = __pEditFieldNumber->GetText();
+ EnableSaveButton(false);
+ }
+}
+
+void
+SettingsAddNumberForm::EnableSaveButton(bool isEnable)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetItemEnabled(0, isEnable);
+ pFooter->Invalidate(true);
+ }
+}
+
+void
+SettingsAddNumberForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ pMainMenuTableView->RefreshAllItems();
+ }
+}
+
+void
+SettingsAddNumberForm::OnFormBackRequested(Form& source)
+{
+ GoBackToPreviousForm();
+}
+
+void
+SettingsAddNumberForm::ShowInvalidContactPopup(void)
+{
+ if(__pInvalidContactPopup != null)
+ {
+ __pInvalidContactPopup->SetShowState(false);
+ }
+
+ __pInvalidContactPopup = new (std::nothrow) Popup();
+ __pInvalidContactPopup->Construct(true, Dimension(W_INVALID_CONTACT_POPUP,H_INVALID_CONTACT_POPUP));
+ __pInvalidContactPopup->SetPropagatedKeyEventListener(this);
+ __pInvalidContactPopup->SetTitleText(AppUtility::GetResourceString(IDS_PHONE));
+
+ Label* pLabelText = new (std::nothrow) Label();
+ pLabelText->Construct(Tizen::Graphics::Rectangle(0, 20, __pInvalidContactPopup->GetWidth(), __pInvalidContactPopup->GetHeight()-100), AppUtility::GetResourceString(IDS_INVALID_CONTACT_STRING));
+ pLabelText->SetTextConfig(FONT_SIZE_AUTOREJECT_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+ pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelText->SetTextVerticalAlignment(ALIGNMENT_TOP);
+ __pInvalidContactPopup->AddControl(pLabelText);
+
+ //Ok button
+ Rectangle yesRect(X_OK_BUTTON, Y_OK_BUTTON, W_OK_BUTTON, H_OK_BUTTON);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_SPEED_DIAL_INVALID_CONTACT_OK));
+ pYesButton->SetActionId(IDA_POPUP_INVALID_OK);
+ pYesButton->AddActionEventListener(*this);
+ __pInvalidContactPopup->AddControl(pYesButton);
+ __pInvalidContactPopup->SetShowState(true);
+ __pInvalidContactPopup->Show();
+}
+
+bool
+SettingsAddNumberForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ /*if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pInvalidContactPopup != null && __pInvalidContactPopup->GetShowState() == true)
+ {
+ __pInvalidContactPopup->SetShowState(false);
+ return true;
+ }
+ }*/
+ return false;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsBarringPwdForm.cpp
+ * @brief Call Baring Password form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnSettingsBarringPwdForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDL_SETTINGS_SET_BARRING_PWD__FORM = L"IDL_SETTINGS_SET_BARRING_PWD__FORM";
+
+SettingsBarringPwdForm::SettingsBarringPwdForm(void)
+ : __pErrorMsgPopup(null)
+{
+}
+
+SettingsBarringPwdForm::~SettingsBarringPwdForm(void)
+{
+}
+
+void
+SettingsBarringPwdForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_SET_BARRING_PWD__FORM);
+}
+
+result
+SettingsBarringPwdForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+
+ //Initialize Header & Footer
+ InitializeHeaderAndFooter();
+ //Initialize reject message editArea
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ if (pSetPwd != null)
+ {
+ pSetPwd->SetSize(pSetPwd->GetWidth(), mainItemTextSize);
+ pSetPwd->AddTextEventListener(*this);
+ pSetPwd->SetTextSize(mainFontSize);
+ pSetPwd->SetFocus();
+ pSetPwd->SetOverlayKeypadCommandButtonVisible(false);
+ pSetPwd->SetKeypadActionEnabled(false);
+ pSetPwd->ShowKeypad();
+ }
+ return r;
+}
+
+void
+SettingsBarringPwdForm::InitializeHeaderAndFooter(void)
+{
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetStyle(HEADER_STYLE_TITLE);
+ pHeader->SetTitleText(AppUtility::GetResourceString(IDS_SETTING_SET_BARRING_PWD_TITLE));
+ }
+
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ //change style to show "save" in center
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ //'Save' item
+ String saveItemName;
+ saveItemName.Append(AppUtility::GetResourceString(IDS_SETTING_DONE_HEADER_ITEM));
+ FooterItem saveFooterItem;
+ saveFooterItem.Construct(IDA_SAVE_FOOTER_ITEMID);
+ saveFooterItem.SetText(saveItemName);
+ pFooter->AddItem(saveFooterItem);
+ pFooter->SetItemEnabled(0, false);
+
+ //'Cancel' item
+ SetFormBackEventListener(this);
+
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsBarringPwdForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SettingsBarringPwdForm::OnActionPerformed(const Control& source, int actionId)
+{
+ AppLog("Enter");
+ AppLog("%d %d",__callBarringCondition, __conditionState);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ case IDA_SAVE_FOOTER_ITEMID:
+ {
+ //save call barring settings
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ if (pSetPwd != null)
+ {
+ SettingsPresentationModel* pPresentor = SettingsPresentationModel::GetInstance();
+ String password = pSetPwd->GetText();
+ //set call barring status
+ int errorCode = pPresentor->SetCallBarringStatus(password, __callBarringCondition, __conditionState);
+ if(errorCode != ERROR_NONE)
+ {
+ AppLogDebug("ErrorCode %d",errorCode);
+ //This SetFocus was commented for bug# N_SE-56905
+ //Have to do setfocus to form only when we are going back to previous form to avoid keypad blink
+ //SetFocus();
+ ShowErrorMessage(errorCode);
+ return;
+ }
+ else
+ {
+ if(__conditionState == false)
+ {
+ if(__callBarringCondition == CALL_BARRING_ALL_OUTGOING)
+ {
+ pPresentor->SetCallBarringStatus(password, CALL_BARRING_INTERNATIONAL_OUTGOING, false);
+ pPresentor->SetCallBarringStatus(password, CALL_BARRING_INTERNATIONAL_EXCEPT_HOME, false);
+ }
+ if(__callBarringCondition == CALL_BARRING_ALL_INCOMING)
+ {
+ pPresentor->SetCallBarringStatus(password, CALL_BARRING_INCOMING_ROAMING, false);
+
+ }
+ }
+ }
+ }
+ //This is to avoid the keypad blink while going back to previous form
+ SetFocus();
+ //switch back to previous form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_BARRING_OPTIONS, SCENE_TRANSITION_ANIMATION_TYPE_NONE
+ ,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsBarringPwdForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ if (pArgs != null)
+ {
+ Integer* pIndexInt = static_cast<Integer*>(pArgs->GetAt(0));
+ switch (pIndexInt->ToInt())
+ {
+ case 0:
+ {
+ __callBarringCondition = CALL_BARRING_ALL_OUTGOING;
+ }
+ break;
+
+ case 1:
+ {
+ __callBarringCondition = CALL_BARRING_INTERNATIONAL_OUTGOING;
+ }
+ break;
+
+ case 2:
+ {
+ __callBarringCondition = CALL_BARRING_INTERNATIONAL_EXCEPT_HOME;
+ }
+ break;
+
+ case 3:
+ {
+ __callBarringCondition = CALL_BARRING_ALL_INCOMING;
+ }
+ break;
+
+ case 4:
+ {
+ __callBarringCondition = CALL_BARRING_INCOMING_ROAMING;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ Integer* pItemState = static_cast<Integer*>(pArgs->GetAt(1));
+ if (pItemState->ToInt() == LIST_ITEM_STATUS_CHECKED)
+ {
+ __conditionState = true;
+ }
+ else
+ {
+ __conditionState = false;
+ }
+
+ //Clear edit field and disable "save"
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ if (pSetPwd != null)
+ {
+ pSetPwd->SetPropagatedKeyEventListener(this);
+ pSetPwd->Clear();
+ pSetPwd->SetFocus();
+ pSetPwd->Invalidate(true);
+ }
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetItemEnabled(0, false);
+ pFooter->Invalidate(true);
+ }
+
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+}
+
+void
+SettingsBarringPwdForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ if (pSetPwd != null)
+ {
+ pSetPwd->SetPropagatedKeyEventListener(null);
+ pSetPwd->HideKeypad();
+ }
+}
+
+void
+SettingsBarringPwdForm::OnTextValueChanged(const Control& source)
+{
+ int textLen = -1;
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ Footer* pFooter = GetFooter();
+ if (pSetPwd != null && pFooter != null)
+ {
+ textLen = pSetPwd->GetTextLength();
+ if (textLen > 0)
+ {
+ //Enable save button
+ pFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ //disable
+ pFooter->SetItemEnabled(0, false);
+ }
+ pFooter->Invalidate(true);
+ }
+}
+
+void
+SettingsBarringPwdForm::OnTextValueChangeCanceled(const Control& source)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetItemEnabled(0, false);
+ pFooter->Invalidate(true);
+ }
+}
+
+void
+SettingsBarringPwdForm::ShowErrorMessage(int errorCode)
+{
+ //show error msg Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
+ }
+}
+
+void
+SettingsBarringPwdForm::HandlePopupClosed(void)
+{
+ Draw();
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ return;
+}
+
+void
+SettingsBarringPwdForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ //Initialize reject message editArea
+ EditField* pSetPwd = static_cast<EditField*>(GetControl(IDC_EDITFIELD));
+ if (pSetPwd != null)
+ {
+ pSetPwd->SetSize(pSetPwd->GetWidth(), mainItemTextSize);
+ pSetPwd->AddTextEventListener(*this);
+ pSetPwd->SetTextSize(mainFontSize);
+ pSetPwd->SetFocus();
+ pSetPwd->SetOverlayKeypadCommandButtonVisible(false);
+ pSetPwd->SetKeypadActionEnabled(false);
+ pSetPwd->ShowKeypad();
+ pSetPwd->Invalidate(true);
+ }
+
+}
+
+void
+SettingsBarringPwdForm::OnFormBackRequested(Form& source)
+{
+ //switch back to previous form
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_BARRING_OPTIONS), null);
+}
+
+bool
+SettingsBarringPwdForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ return false;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file SettingsCallAccessoryForm.cpp
+ * @brief Call setting tone form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnSettingsCallAccessoryForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDL_SETTINGS_CALL_ACCESSORY_FORM = L"IDL_SETTINGS_CALL_ACCESSORY_FORM";
+
+SettingsCallAccessoryForm::SettingsCallAccessoryForm(void)
+{
+ __pSettingsPresentor = null;
+ __isCallConditionOptionsExpanded = false;
+}
+
+SettingsCallAccessoryForm::~SettingsCallAccessoryForm(void)
+{
+}
+
+void
+SettingsCallAccessoryForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_CALL_ACCESSORY_FORM);
+}
+
+result
+SettingsCallAccessoryForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //initialize table view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsCallAccessoryForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsCallAccessoryForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallAccessoryForm::OnFormBackRequested(Controls::Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU), null);
+}
+
+void
+SettingsCallAccessoryForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ //update table view
+ GroupedTableView* pCallAccessoryTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (__pSettingsPresentor != null && pCallAccessoryTableView != null)
+ {
+ pCallAccessoryTableView->UpdateTableView();
+ //outgoing call status
+ bool isOutogingCallEnabledInLockedState = __pSettingsPresentor->IsOutgoingCallEnabledWhenLocked();
+ int checkedItem = OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE;
+ if (isOutogingCallEnabledInLockedState == false)
+ {
+ checkedItem = OUTCALL_CONDITION_MENUOPTION_UNLOCK_DEVICE;
+ }
+ pCallAccessoryTableView->SetItemChecked(GROUP_OUTCALL_CONDITION_OPTIONS, checkedItem, true);
+ //update subtext based on checked item
+ pCallAccessoryTableView->RefreshItem(GROUP_OUTCALL_CONDITION, OUTCALL_CONDITION_MENU, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
+
+void
+SettingsCallAccessoryForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ //Collapse all expanded options
+ GroupedTableView* pCallAccessoryTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(pCallAccessoryTableView != null)
+ {
+ //Collapsing individual groups in "OnSceneDeactivated()" was causing GUI issue,
+ //so we need to call below method instead.
+ CollapseSelectiveGroups(pCallAccessoryTableView);
+ __isCallConditionOptionsExpanded = false;
+ }
+}
+
+result
+SettingsCallAccessoryForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pCallAccessoryTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pCallAccessoryTableView != null)
+ {
+ //pCallAccessoryTableView->SetGroupedLookEnabled(true);
+ pCallAccessoryTableView->SetItemProvider(this);
+ r = pCallAccessoryTableView->AddGroupedTableViewItemEventListener(*this);
+ pCallAccessoryTableView->UpdateTableView();
+ CollapseSelectiveGroups(pCallAccessoryTableView);
+ pCallAccessoryTableView->SetItemEnabled(GROUP_OUTCALL_CONDITION, -1, false);
+ pCallAccessoryTableView->SetItemEnabled(GROUP_OUTCALL_CONDITION_OPTIONS, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsCallAccessoryForm::CollapseSelectiveGroups(GroupedTableView* pCallAccessoryTableView)
+{
+ //This function should be called only from "InitializeGroupedTableView()".
+ //since collapsing individual groups while GroupTableView construction causes flicker.
+ pCallAccessoryTableView->CollapseAllGroup();
+ //Expand other groups
+ pCallAccessoryTableView->ExpandGroup(GROUP_BT_SETTINGS_HEADING);
+ pCallAccessoryTableView->ExpandGroup(GROUP_OUTCALL_CONDITION);
+ pCallAccessoryTableView->ExpandGroup(GROUP_OUTCALL_CONDITION_HLPTXT);
+ pCallAccessoryTableView->UpdateTableView();
+}
+
+void
+SettingsCallAccessoryForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ switch (groupIndex)
+ {
+ case GROUP_OUTCALL_CONDITION:
+ {
+ if (tableView.IsGroupExpanded(GROUP_OUTCALL_CONDITION_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_OUTCALL_CONDITION_OPTIONS);
+ __isCallConditionOptionsExpanded = false;
+ }
+ else
+ {
+ tableView.ExpandGroup(GROUP_OUTCALL_CONDITION_OPTIONS);
+ __isCallConditionOptionsExpanded = true;
+ }
+ //Change icon
+ tableView.RefreshItem(GROUP_OUTCALL_CONDITION, OUTCALL_CONDITION_MENU, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
+
+ case GROUP_OUTCALL_CONDITION_OPTIONS:
+ {
+ HandleOutCallConditionOptionsSelected(tableView, itemIndex, status);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallAccessoryForm::HandleOutCallConditionOptionsSelected(GroupedTableView& tableView, int itemIndex, TableViewItemStatus state)
+{
+ //check if already checked item is selected, then return
+ if(state == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ tableView.SetItemChecked(GROUP_OUTCALL_CONDITION_OPTIONS, itemIndex, true);
+ return;
+ }
+
+ //determine outgoing call status
+ bool activate = false;
+ int unCheckItemIndex = OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE;
+ if (itemIndex == OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE)
+ {
+ activate = true;
+ unCheckItemIndex = OUTCALL_CONDITION_MENUOPTION_UNLOCK_DEVICE;
+ }
+ //update outgoing call status
+ result r = __pSettingsPresentor->EnableOutgoingCallWhenLocked(activate);
+ if (IsFailed(r))
+ {
+ //failed, revert status
+ tableView.SetItemChecked(GROUP_OUTCALL_CONDITION_OPTIONS, itemIndex, false);
+ return;
+ }
+ //un-check previous selected option and update subtext
+ tableView.SetItemChecked(GROUP_OUTCALL_CONDITION_OPTIONS, unCheckItemIndex, false);
+ tableView.RefreshItem(GROUP_OUTCALL_CONDITION_OPTIONS, unCheckItemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ tableView.RefreshItem(GROUP_OUTCALL_CONDITION, OUTCALL_CONDITION_MENU, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+}
+
+int
+SettingsCallAccessoryForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsCallAccessoryForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_OUTCALL_CONDITION:
+ {
+ itemCount = OUTCALL_CONDITION_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_OUTCALL_CONDITION_OPTIONS:
+ {
+ itemCount = OUTCALL_CONDITION_MENUOPTION_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_BT_SETTINGS_HEADING:
+ case GROUP_OUTCALL_CONDITION_HLPTXT:
+ {
+ itemCount = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsCallAccessoryForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ String helpText(L"");
+ int groupHeight = H_LIST_HIDDENGROUP_ITEM;
+ switch (groupIndex)
+ {
+ case GROUP_BT_SETTINGS_HEADING:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_BT_SETTINGS_HEADING_STRING));
+ groupHeight = H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_OUTCALL_CONDITION_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_OUTCALL_CONDITION_HLP_STRING));
+ groupHeight = H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ if (helpText.IsEmpty() == true)
+ {
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ }
+ else
+ {
+ //help text item rectangle
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, 0, (itemWidth - X_LIST_MENU_HLPTXT_ITEM), groupHeight);
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(helpItemRect, helpText);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(FONT_SIZE_HELP_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);
+ pItem->AddControl(pItemLbl);
+ pItem->SetEnabled(false);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ }
+ return pItem;
+}
+
+bool
+SettingsCallAccessoryForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallAccessoryForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsCallAccessoryForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ TableViewItem* pItem = null;
+
+ switch (groupIndex)
+ {
+ case GROUP_OUTCALL_CONDITION:
+ {
+ pItem = CreateExpandableItem(groupIndex, itemIndex, itemWidth);
+ }
+ break;
+
+ case GROUP_OUTCALL_CONDITION_OPTIONS:
+ {
+ pItem = CreateOutCallConditionOptionsItem(itemIndex, itemWidth);
+ }
+ break;
+
+ default:
+ break;
+ }
+ return pItem;
+}
+
+TableViewItem*
+SettingsCallAccessoryForm::CreateExpandableItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ String mainText = AppUtility::GetResourceString(IDS_SETTING_OUTCALL_CONDITION_MAIN_STRING);
+ String subText = FetchSubTextForOutCallConditionOptions();
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, itemRectSize), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //main text item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ mainItemTextSize);
+ Label* pMainTxtLbl = new (std::nothrow) Label();
+ pMainTxtLbl->Construct(mainItemRect, mainText);
+ pMainTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMainTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pMainTxtLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pMainTxtLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);
+ pItem->AddControl(pMainTxtLbl);
+
+ //sub text item
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, (Y_LIST_MENU_TEXT_ITEM + mainItemTextSize),
+ (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON), subItemTextSize);
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetName(IDC_SELECTEDOPTION_SUBTEXT_LABEL);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ pItem->AddControl(pSubTxtLbl);
+
+ //set background bitmap according to position in group
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_SINGLE_ITEM);
+ pItem->SetBackgroundColor(COLOR_LIST_MENU_ITEM, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isCallConditionOptionsExpanded);
+ return pItem;
+}
+
+String
+SettingsCallAccessoryForm::FetchSubTextForOutCallConditionOptions(void)
+{
+ //default text
+ String subText = AppUtility::GetResourceString(IDS_SETTING_OUTCALL_LOCKDEVICE_STRING);
+
+ //Fetch text for selected item
+ bool isOutgoingCallEnabledWhenLocked = __pSettingsPresentor->IsOutgoingCallEnabledWhenLocked();
+ if (isOutgoingCallEnabledWhenLocked == false)
+ {
+ subText.Clear();
+ subText.Append(AppUtility::GetResourceString(IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING));
+ }
+ return subText;
+}
+
+TableViewItem*
+SettingsCallAccessoryForm::CreateOutCallConditionOptionsItem(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ int rightMarginLengthForFonts = 90;
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+ pItem->SetBackgroundColor(COLOR_SECONDDEPTH_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ //text item rectangle
+ AppLog("%d %d %d %d %d",0, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - rightMarginLengthForFonts), H_LIST_NORMAL_MENU_ITEM, itemWidth);
+ Rectangle itemRect(0, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - rightMarginLengthForFonts), H_LIST_NORMAL_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ switch (itemIndex)
+ {
+ case OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_OUTCALL_LOCKDEVICE_STRING));
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case OUTCALL_CONDITION_MENUOPTION_UNLOCK_DEVICE:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+ }
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+bool
+SettingsCallAccessoryForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallAccessoryForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ if (groupIndex == GROUP_OUTCALL_CONDITION && itemIndex == OUTCALL_CONDITION_MENU)
+ {
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (pItem->GetWidth() - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ mainItemTextSize);
+ //sub text item
+ String subText = FetchSubTextForOutCallConditionOptions();
+ Label* pSubTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_SELECTEDOPTION_SUBTEXT_LABEL, true));
+ pSubTxtLbl->SetText(subText);
+ pSubTxtLbl->Invalidate(true);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isCallConditionOptionsExpanded);
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_SINGLE_ITEM);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(mainItemRect);
+ }
+
+ }
+ else if(groupIndex == GROUP_OUTCALL_CONDITION_OPTIONS)
+ {
+ int bufferLengthDifference = 5;
+ //Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (pItem->GetWidth() - X_LIST_MENU_TEXT_ITEM - rightMarginLengthForFonts), H_LIST_NORMAL_MENU_ITEM);
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ switch (itemIndex)
+ {
+ case OUTCALL_CONDITION_MENUOPTION_LOCK_DEVICE:
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case OUTCALL_CONDITION_MENUOPTION_UNLOCK_DEVICE:
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ AppLog("%d %d %d %d %d",pItemLbl->GetX(),pItemLbl->GetY(),pItem->GetWidth()-pItemLbl->GetX() + bufferLengthDifference,pItemLbl->GetHeight(),pItem->GetWidth());
+ pItemLbl->SetBounds(pItemLbl->GetX(),pItemLbl->GetY(),pItem->GetWidth() - pItemLbl->GetX() + bufferLengthDifference,pItemLbl->GetHeight());
+ }
+ }
+ pItem->Invalidate(true);
+
+ return;
+}
+
+int
+SettingsCallAccessoryForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsCallAccessoryForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsCallAccessoryForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pCallAccessoryTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pCallAccessoryTableView != null)
+ {
+ Rectangle tableBounds = GetClientAreaBounds();
+ tableBounds.x = 0;
+ tableBounds.y = 0;
+ pCallAccessoryTableView->SetBounds(tableBounds);
+ pCallAccessoryTableView->InvalidateBounds(tableBounds);
+ pCallAccessoryTableView->RefreshAllItems();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file SettingsCallAnsweringForm.cpp
+ * @brief Call setting tone form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnSettingsCallAnsweringForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDL_SETTINGS_CALL_ANSWERING_FORM = L"IDL_SETTINGS_CALL_ANSWERING_FORM";
+
+SettingsCallAnsweringForm::SettingsCallAnsweringForm(void)
+{
+}
+
+SettingsCallAnsweringForm::~SettingsCallAnsweringForm(void)
+{
+}
+
+void
+SettingsCallAnsweringForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_CALL_ANSWERING_FORM);
+}
+
+result
+SettingsCallAnsweringForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //Footer
+ Footer* pFooter = GetFooter();
+ if (pFooter)
+ {
+ pFooter->SetButtonColor(BUTTON_ITEM_STATUS_NORMAL, pFooter->GetColor());
+ pFooter->AddActionEventListener(*this);
+ }
+
+ //initialize table view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsCallAnsweringForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsCallAnsweringForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallAnsweringForm::OnFormBackRequested(Controls::Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU), null);
+}
+
+void
+SettingsCallAnsweringForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ //update table view
+ GroupedTableView* pCallAnswerKeyTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (__pSettingsPresentor != null && pCallAnswerKeyTableView != null)
+ {
+ //call answering key status
+ bool isAnswerKeyEnabled = __pSettingsPresentor->IsCallAnsweringKeyEnabled();
+ pCallAnswerKeyTableView->SetItemChecked(GROUP_ANSWER_CALL_KEY, ANSWER_CALL_KEY_HOMEKEY, isAnswerKeyEnabled);
+ //call ending key status
+ bool isEndKeyEnabled = __pSettingsPresentor->IsCallEndingKeyEnabled();
+ pCallAnswerKeyTableView->SetItemChecked(GROUP_END_CALL_KEY,END_CALL_KEY_POWERKEY, isEndKeyEnabled);
+ pCallAnswerKeyTableView->UpdateTableView();
+ }
+}
+
+void
+SettingsCallAnsweringForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+result
+SettingsCallAnsweringForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pCallAnswerKeyTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pCallAnswerKeyTableView != null)
+ {
+ //pCallAnswerKeyTableView->SetGroupedLookEnabled(true);
+ pCallAnswerKeyTableView->SetItemProvider(this);
+ r = pCallAnswerKeyTableView->AddGroupedTableViewItemEventListener(*this);
+ pCallAnswerKeyTableView->UpdateTableView();
+ }
+ return r;
+}
+
+void
+SettingsCallAnsweringForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ bool activateState = false;
+ if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+ {
+ activateState = true;
+ }
+
+ result r = E_FAILURE;
+ switch (groupIndex)
+ {
+ case GROUP_ANSWER_CALL_KEY:// for "ANSWER_CALL_KEY_HOMEKEY" item
+ {
+ r = __pSettingsPresentor->EnableCallAnsweringKey(activateState);
+ }
+ break;
+
+ case GROUP_END_CALL_KEY:// for "END_CALL_KEY_POWERKEY" item
+ {
+ r = __pSettingsPresentor->EnableCallEndingKey(activateState);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (IsFailed(r))
+ {
+ //vconf failed, revert state.
+ tableView.SetItemChecked(groupIndex, itemIndex, !activateState);
+ }
+}
+
+int
+SettingsCallAnsweringForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsCallAnsweringForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_ANSWER_CALL_KEY:
+ {
+ itemCount = ANSWER_CALL_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_END_CALL_KEY:
+ {
+ itemCount = END_CALL_KEY_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_ANSWER_CALL_KEY_HLPTXT:
+ case GROUP_END_CALL_KEY_HLPTXT:
+ {
+ itemCount = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsCallAnsweringForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ String helpText(L"");
+ int groupHeight = H_LIST_HIDDENGROUP_ITEM;
+ switch (groupIndex)
+ {
+ case GROUP_ANSWER_CALL_KEY_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_ANSWER_CALL_KEY_HLP_STRING));
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_END_CALL_KEY_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_END_CALL_KEY_HLP_STRING));
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ if (helpText.IsEmpty() == true)
+ {
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ }
+ else
+ {
+ //help text item rectangle
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, 0, (itemWidth - X_LIST_MENU_HLPTXT_ITEM), groupHeight);
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(helpItemRect, helpText);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(FONT_SIZE_HELP_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);
+ pItem->AddControl(pItemLbl);
+ pItem->SetEnabled(false);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ }
+ return pItem;
+}
+
+bool
+SettingsCallAnsweringForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallAnsweringForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsCallAnsweringForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ GroupedTableView* pCallAnswerKeyTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
+
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ //Set the item name and status for all menu items
+ String itemName(L"");
+ bool activateState = false;
+ switch (groupIndex)
+ {
+ case GROUP_ANSWER_CALL_KEY:// for "ANSWER_CALL_KEY_HOMEKEY" item
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_ANSWER_CALL_KEY_STRING));
+ activateState = __pSettingsPresentor->IsCallAnsweringKeyEnabled();
+ }
+ break;
+
+ case GROUP_END_CALL_KEY:// for "END_CALL_KEY_POWERKEY" item
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_END_CALL_KEY_STRING));
+ activateState = __pSettingsPresentor->IsCallEndingKeyEnabled();
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+
+ //set status
+ pCallAnswerKeyTableView->SetItemChecked(groupIndex, itemIndex, activateState);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+bool
+SettingsCallAnsweringForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallAnsweringForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ return;
+}
+
+int
+SettingsCallAnsweringForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsCallAnsweringForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsCallAnsweringForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pCallAnswerKeyTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pCallAnswerKeyTableView != null)
+ {
+ pCallAnswerKeyTableView->UpdateTableView();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallForwardWaitBarrForm.cpp
+ * @brief Call forwarding form
+ */
+#include <FApp.h>
+#include <TelSs.h>
+#include "PhnAppUtility.h"
+#include "PhnSettingsCallForwardWaitBarrForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//constants
+const int SLIDERLENGTH = 140;
+const int IDI_GROUP_TOTALCOUNT = 1;
+static const wchar_t* IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM = L"IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM";
+static const wchar_t* IDC_SLIDER_CHECKBUTTON = L"IDC_SLIDER_CHECKBUTTON";
+static const wchar_t* IDS_SETTING_WRONG_PASSWORD = L"IDS_SETTING_WRONG_PASSWORD";
+static const wchar_t* IDS_SETTING_SYSTEM_FAILURE = L"IDS_SETTING_SYSTEM_FAILURE";
+
+SettingsCallForwardWaitBarrForm::SettingsCallForwardWaitBarrForm(FormType formType)
+ : __formType(formType)
+ , __pSettingsPresentor(null)
+ , __pErrorMsgPopup(null)
+ , __isCallForwardAlwaysActivated(false)
+ , __pAnimationFrameList(null)
+ , __isCallWaitingStatusAvailable(false)
+ , __isCallWaitingEnabled(false)
+ , __isCallBarringAllOutStatusAvailable(false)
+ , __isCallBarringIntlCallStatusAvailable(false)
+ , __isCallBarringIntlCallExptHomeStatusAvailable(false)
+ , __isCallBarringIntlCallAllIncomingStatusAvailable(false)
+ , __isCallBarringIntlCallIncomingRoamStatusAvailable(false)
+ , __allOutGoingCalls(false)
+ , __internationalCalls(false)
+ , __internationalExceptHome(false)
+ , __allIncomingCalls(false)
+ , __incomingWhileRoaming(false)
+{
+}
+
+SettingsCallForwardWaitBarrForm::~SettingsCallForwardWaitBarrForm(void)
+{
+}
+
+void
+SettingsCallForwardWaitBarrForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_CALL_FORWARD_WAIT_BARRING_FORM);
+}
+
+result
+SettingsCallForwardWaitBarrForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ //set Title
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ String title(L"");
+ switch (__formType)
+ {
+ case FORMTYPE_CALLFORWARDING_TYPE:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_FORWARD_CALLTYPE_TITLE));
+ }
+ break;
+
+ case FORMTYPE_CALLBARRING_TYPE:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_BARRING_CALLTYPE_TITLE));
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE));
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_OPTIONS_TITLE));
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_WAITING_OPTIONS_TITLE));
+ }
+ break;
+
+ default:
+ break;
+ }
+ pHeader->SetTitleText(title);
+ }
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ ConstructAnimationList();
+ //Initialise table view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsCallForwardWaitBarrForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = null;
+
+ if(__pAnimationFrameList != null)
+ {
+ __pAnimationFrameList->RemoveAll();
+ delete __pAnimationFrameList;
+ __pAnimationFrameList = null;
+ }
+ return r;
+}
+
+void
+SettingsCallForwardWaitBarrForm::ConstructAnimationList(void)
+{
+ //Check if already created
+ if(__pAnimationFrameList != null)
+ {
+ return;
+ }
+ // Create AnimationList
+ __pAnimationFrameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pAnimationFrameList->Construct();
+
+ // Create Bitmap
+ AppResource *pAppResource = Application::GetInstance()->GetAppResource();
+ if (pAppResource != null)
+ {
+ for (int iconIndex = 1; iconIndex <= 30; iconIndex++)
+ {
+ //construct bitmap path
+ String bitmapPath(IDB_PROCESSING_ICONS);
+ String number(L"");
+ if(iconIndex < 10)
+ {
+ bitmapPath.Append(0);
+ }
+ bitmapPath.Append(iconIndex);
+ bitmapPath.Append(L".png");
+ //Create Animation icons - fetch bitmap
+ Bitmap *pBitmap = pAppResource->GetBitmapN(bitmapPath);
+ if(pBitmap != null)
+ {
+ // Create AnimationFrames
+ AnimationFrame *pAnimFrame = new (std::nothrow) AnimationFrame( *pBitmap,
+ (IDI_ANIM_DURATION / IDI_ANIM_PROGRESS_COUNT));
+ __pAnimationFrameList->Add(pAnimFrame);
+ delete pBitmap;
+ pBitmap = null;
+ }
+ }
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnFormBackRequested(Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (__formType)
+ {
+ case FORMTYPE_CALLFORWARDING_TYPE:
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU), null);
+ }
+ break;
+
+ case FORMTYPE_CALLBARRING_TYPE:
+ case FORMTYPE_CALL_WAITING:
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MORE_OPTIONS,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY), null);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ //switch to form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALLTYPE_FORWARD), null);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ //switch to form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALLTYPE_BARRING,SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ if(__formType == FORMTYPE_CALLBARRING_TYPE)
+ {
+ pMainMenuTableView->RefreshAllItems();
+ }
+ else
+ {
+ //Commented for the bug# N_SE-52011
+ //pMainMenuTableView->UpdateTableView();
+ SendUserEvent(REQUEST_UPDATE_TABLE,null);
+ }
+ if(__formType == FORMTYPE_CALL_WAITING)
+ {
+ pMainMenuTableView->RefreshItem(0, CALLWAITING_ITEM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ }
+ // Add your scene activate code here
+ __pSettingsPresentor->AddSettingEventListener(this);
+ int errorCode = ERROR_NONE;
+ switch (__formType)
+ {
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ //fetch status
+ __isCallForwardAlwaysActivated = false;
+ errorCode = __pSettingsPresentor->GetCallForwardStatus(CALL_FORWARD_ALL);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallForwardStatus(CALL_FORWARD_BUSY);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallForwardStatus(CALL_FORWARD_NO_REPLY);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallForwardStatus(CALL_FORWARD_NOT_REACHABLE);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ //fetch status
+ errorCode = __pSettingsPresentor->GetCallBarringStatus(CALL_BARRING_ALL_OUTGOING);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallBarringStatus(CALL_BARRING_INTERNATIONAL_OUTGOING);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallBarringStatus(CALL_BARRING_INTERNATIONAL_EXCEPT_HOME);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallBarringStatus(CALL_BARRING_ALL_INCOMING);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ errorCode = __pSettingsPresentor->GetCallBarringStatus(CALL_BARRING_INCOMING_ROAMING);
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ //fetch status
+ errorCode = __pSettingsPresentor->GetCallWaitingStatus();
+ TryCatch(errorCode == ERROR_NONE,,"TAPI error occurred");
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return;
+
+CATCH:
+ //Show error message popup
+ ShowErrorMessage(errorCode);
+ //in case of TAPI error, un-check all items
+ UncheckAllOptions();
+ return;
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ // Add your scene de-activate code here
+ __pSettingsPresentor->RemoveSettingEventListener();
+}
+
+/////////////////////////////////////////////////////////////////////
+////////////////// List View related functionality //////////////////
+/////////////////////////////////////////////////////////////////////
+result
+SettingsCallForwardWaitBarrForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //pMainMenuTableView->SetGroupedLookEnabled(true);
+ pMainMenuTableView->SetItemProvider(this);
+ r = pMainMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMainMenuTableView->UpdateTableView();
+ pMainMenuTableView->SetItemEnabled(0, -1, false);
+
+ }
+ return r;
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ AppLogDebug("Enter");
+ switch (__formType)
+ {
+ case FORMTYPE_CALLFORWARDING_TYPE: //decide voice/video type for forwarding / barring
+ case FORMTYPE_CALLBARRING_TYPE:
+ {
+ HandleCallTypeSelected(itemIndex);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ HandleCallForwardingOptionSelected(itemIndex, status);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ HandleCallBarringOptionSelected(itemIndex, status);
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ HandleCallWaitingOptionSelected(pItem, itemIndex, status);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+int
+SettingsCallForwardWaitBarrForm::GetGroupCount(void)
+{
+ return IDI_GROUP_TOTALCOUNT;
+}
+
+int
+SettingsCallForwardWaitBarrForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (__formType)
+ {
+ case FORMTYPE_CALLFORWARDING_TYPE: //decide voice/video type for forwarding
+ case FORMTYPE_CALLBARRING_TYPE: //decide voice/video type for barring
+ {
+ itemCount = CALLTYPE_TOTALCOUNT;
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLFORWARDING: //actual options for call forwarding
+ {
+ itemCount = CALLFORWARD_TOTALITEMCOUNT;
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING: //actual options for call barring
+ {
+ itemCount = CALLBARRING_TOTALCOUNT;
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ itemCount = CALLWAITING_TOTALCOUNT;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsCallForwardWaitBarrForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ return pItem;
+}
+
+bool
+SettingsCallForwardWaitBarrForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallForwardWaitBarrForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsCallForwardWaitBarrForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ AppLogDebug("%d",itemWidth);
+ TableViewItem* pItem = null;
+ switch (__formType)
+ {
+ case FORMTYPE_CALLFORWARDING_TYPE:
+ case FORMTYPE_CALLBARRING_TYPE:
+ {
+ pItem = CreateSettingCallTypeMenuItem(itemIndex, itemWidth);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ pItem = CreateCallForwardingOptions(itemIndex, itemWidth);
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ pItem = CreateCallBarringOptions(itemIndex, itemWidth);
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ pItem = CreateCallWaitingOptions(itemIndex, itemWidth);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return pItem;
+}
+
+bool
+SettingsCallForwardWaitBarrForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallForwardWaitBarrForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ Rectangle itemNameRect(0,0,0,0);
+ switch (__formType)
+ {
+
+ case FORMTYPE_CALLBARRING_TYPE:
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM,
+ 0, (pItem->GetWidth() - X_LIST_MENU_TEXT_ITEM - SLIDERLENGTH), H_LIST_NORMAL_MENU_ITEM);
+ switch (itemIndex)
+ {
+ case CALLBARRING_ALL_OUTGOING_CALL:
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case CALLBARRING_INTERNATIONAL_CALL:
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLBARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLBARRING_ALL_INCOMING_CALL:
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLBARRING_INCOMING_WHILE_ROAMING:
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+
+ default:
+ break;
+ }
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(itemNameRect);
+ }
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0,
+ (pItem->GetWidth() - X_LIST_MENU_TEXT_ITEM - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), H_LIST_NORMAL_MENU_ITEM);
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(itemNameRect);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return;
+}
+
+int
+SettingsCallForwardWaitBarrForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsCallForwardWaitBarrForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+TableViewItem*
+SettingsCallForwardWaitBarrForm::CreateSettingCallTypeMenuItem(int itemIndex, int itemWidth)
+{
+ //text item rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ String itemName(L"");
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch (itemIndex)
+ {
+ case CALLTYPE_VOICE_CALL:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALLTYPE_VOICE_STRING));
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleCallTypeSelected(int itemIndex)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (itemIndex)
+ {
+ case CALLTYPE_VOICE_CALL:
+ {
+ if (__formType == FORMTYPE_CALLFORWARDING_TYPE)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_FORWARD_OPTIONS), null);
+ }
+ else
+ {
+ //for FORMTYPE_CALLBARRING_TYPE
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_BARRING_OPTIONS), null);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+TableViewItem*
+SettingsCallForwardWaitBarrForm::CreateCallForwardingOptions(int itemIndex, int itemWidth)
+{
+ //sub text rectangle
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, H_LIST_NORMAL_TXT_ITEM,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_SUB_TXT_ITEM);
+ String subText = AppUtility::GetResourceString(IDS_SETTING_DEACTIVATE_STATUS);
+
+ //main text rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_TXT_ITEM);
+ String itemName;
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch (itemIndex)
+ {
+ case CALLFORWARD_ALWAYS:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEFORWARD_ALWAYS));
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case CALLFORWARD_IF_BUSY:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEFORWARD_IFBUSY));
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLFORWARD_IF_NO_REPLY:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEFORWARD_NOREPLY));
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLFORWARD_IF_OUT_OF_REACH:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEFORWARD_OUTOFREACH));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
+
+ //main text item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ pItem->AddControl(*pItemLbl);
+ //sub text item
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SUB_TXT);
+ pItem->AddControl(pSubTxtLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleCallForwardingOptionSelected(int itemIndex, TableViewItemStatus status)
+{
+ if(status == TABLE_VIEW_ITEM_STATUS_CHECKED || status == TABLE_VIEW_ITEM_STATUS_SELECTED)
+ {
+ //Do not activate any other call forwarding option, if 'CALLFORWARD_ALWAYS' is selected.
+ if((itemIndex != CALLFORWARD_ALWAYS) && (__isCallForwardAlwaysActivated == true))
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ pMainMenuTableView->SetItemChecked(CALLFORWARDING_GROUP, itemIndex, false);
+ pMainMenuTableView->Invalidate(true);
+ return;
+ }
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgs->Construct(1);
+ Integer* indexInt = new (std::nothrow) Integer(itemIndex);
+ pArgs->Add(indexInt);
+
+ switch (itemIndex)
+ {
+ case CALLFORWARD_IF_NO_REPLY:
+ {
+ //switch to "NOREPLY_ForwardToNumber" form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER), pArgs);
+ }
+ break;
+
+ default:
+ {
+ //switch to "ForwardToNumber" form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_FORWARD_TO_NUMBER), pArgs);
+ }
+ break;
+ }
+ }
+ else
+ {
+ __pSettingsPresentor->SetCallForwardStatus(String(L""),CallForwardCondition(itemIndex), false, 0);
+ }
+}
+
+TableViewItem*
+SettingsCallForwardWaitBarrForm::CreateCallBarringOptions(int itemIndex, int itemWidth)
+{
+ //text item rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - SLIDERLENGTH), H_LIST_NORMAL_MENU_ITEM);
+
+ String itemName(L"");
+ bool animationPlay = false;
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ switch (itemIndex)
+ {
+ case CALLBARRING_ALL_OUTGOING_CALL:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_OUTGOING));
+ position = TABLEVIEWITEMPOS_TOP;
+ if (__isCallBarringAllOutStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ else
+ {
+ animationPlay = true;
+ }
+ }
+ break;
+
+ case CALLBARRING_INTERNATIONAL_CALL:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_INTERNATIONAL));
+ position = TABLEVIEWITEMPOS_CENTER;
+ if (__isCallBarringIntlCallStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ else
+ {
+ animationPlay = true;
+ }
+ }
+ break;
+
+ case CALLBARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_EXCEPTHOME));
+ position = TABLEVIEWITEMPOS_CENTER;
+ if (__isCallBarringIntlCallExptHomeStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ else
+ {
+ animationPlay = true;
+ }
+ }
+ break;
+
+ case CALLBARRING_ALL_INCOMING_CALL:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_INCOMING));
+ position = TABLEVIEWITEMPOS_CENTER;
+ if (__isCallBarringIntlCallAllIncomingStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ else
+ {
+ animationPlay = true;
+ }
+ }
+ break;
+
+ case CALLBARRING_INCOMING_WHILE_ROAMING:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_VOICEBARRING_WHENROAMING));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ if (__isCallBarringIntlCallIncomingRoamStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ else
+ {
+ animationPlay = true;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), style);
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ pItem->AddControl(*pItemLbl);
+ if (animationPlay == true)
+ {
+ //animation icon
+ if(__pAnimationFrameList != null && __pAnimationFrameList->GetCount() > 0)
+ {
+ Rectangle animRect((itemNameRect.x + itemNameRect.width), ((H_LIST_NORMAL_MENU_ITEM - H_SLIDER_ICON) /2), W_EXPAND_ICON, H_SLIDER_ICON);
+ Animation* pAnimation = new (std::nothrow) Animation();
+ pAnimation->Construct(animRect, *__pAnimationFrameList);
+ pAnimation->SetName(IDC_ANIMATION_CONTROL);
+ pAnimation->SetRepeatCount(IDI_ANIM_DURATION * IDI_ANIM_PROGRESS_COUNT * IDI_ANIM_PROGRESS_COUNT);
+ pItem->AddControl(pAnimation);
+ pAnimation->Play();
+ }
+ }
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleCallBarringOptionSelected(int itemIndex, TableViewItemStatus status)
+{
+ AppLog("Enter");
+ AppLog("%d %d %d",itemIndex, status, __allOutGoingCalls);
+ bool multipleToggleStateChange = false;
+
+ //Don't change the item status and goto next form.
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ switch(itemIndex)
+ {
+ case CALLBARRING_ALL_OUTGOING_CALL:
+ {
+ if(__allOutGoingCalls == false && status == TABLE_VIEW_ITEM_STATUS_CHECKED )
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,false);
+ }
+ else if(__allOutGoingCalls == true && status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,true);
+
+ }
+ }
+ break;
+ case CALLBARRING_INTERNATIONAL_CALL:
+ {
+ if(__internationalCalls == false && status == TABLE_VIEW_ITEM_STATUS_CHECKED )
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,false);
+ }
+ else if(__internationalCalls == true && status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,true);
+
+ }
+
+ }
+ break;
+ case CALLBARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ if(__internationalExceptHome == false && status == TABLE_VIEW_ITEM_STATUS_CHECKED )
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,false);
+ }
+ else if(__internationalExceptHome == true && status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,true);
+
+ }
+
+ }
+ break;
+ case CALLBARRING_ALL_INCOMING_CALL:
+ {
+ if(__allIncomingCalls == false && status == TABLE_VIEW_ITEM_STATUS_CHECKED )
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,false);
+ }
+ else if(__allIncomingCalls == true && status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,true);
+
+ }
+
+ }
+ break;
+ case CALLBARRING_INCOMING_WHILE_ROAMING:
+ {
+ if(__incomingWhileRoaming == false && status == TABLE_VIEW_ITEM_STATUS_CHECKED )
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,false);
+ }
+ else if(__incomingWhileRoaming == true && status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ multipleToggleStateChange = true;
+ pMainMenuTableView->SetItemChecked(0,itemIndex,true);
+
+ }
+
+ }
+ break;
+ default:
+ break;
+
+ }
+
+ if(multipleToggleStateChange == true)
+ {
+ //Whether status is checked or unchecked, always goto BarringPwdForm form
+ //to take password from user. Activation / De-activation of barring happens from BarringPwdForm.
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ switch(itemIndex)
+ {
+ case CALLBARRING_ALL_OUTGOING_CALL:
+ {
+ __isCallBarringAllOutStatusAvailable = false;
+ __isCallBarringIntlCallStatusAvailable = false;
+ __isCallBarringIntlCallExptHomeStatusAvailable = false;
+ }
+ break;
+ case CALLBARRING_INTERNATIONAL_CALL:
+ {
+ __isCallBarringIntlCallStatusAvailable = false;
+ }
+ break;
+ case CALLBARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ __isCallBarringIntlCallExptHomeStatusAvailable = false;
+ }
+ break;
+ case CALLBARRING_ALL_INCOMING_CALL:
+ {
+ __isCallBarringIntlCallAllIncomingStatusAvailable = false;
+ __isCallBarringIntlCallIncomingRoamStatusAvailable = false;
+ }
+ break;
+ case CALLBARRING_INCOMING_WHILE_ROAMING:
+ {
+ __isCallBarringIntlCallIncomingRoamStatusAvailable = false;
+ }
+ break;
+ default:
+ break;
+ }
+
+ ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgs->Construct(2);
+ Integer* indexInt = new (std::nothrow) Integer(itemIndex);
+ pArgs->Add(indexInt);
+ Integer* itemState = new (std::nothrow) Integer(status);
+ pArgs->Add(itemState);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_SET_BARRING_PWD), pArgs);
+ }
+}
+
+TableViewItem*
+SettingsCallForwardWaitBarrForm::CreateCallWaitingOptions(int itemIndex, int itemWidth)
+{
+ //text item rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), H_LIST_NORMAL_MENU_ITEM);
+ String itemName(L"");
+ switch (itemIndex)
+ {
+ case CALLWAITING_ITEM:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_WAITING_OPTIONS));
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ if (__isCallWaitingStatusAvailable == true)
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ }
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), style);
+
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ pItem->AddControl(*pItemLbl);
+
+ if (__isCallWaitingStatusAvailable == false)
+ {
+ //animation icon
+ if(__pAnimationFrameList != null && __pAnimationFrameList->GetCount() > 0)
+ {
+ Rectangle animRect((itemNameRect.x + itemNameRect.width+ W_ANIMATION_MARGIN), ((H_LIST_NORMAL_MENU_ITEM - H_SLIDER_ICON) /2), W_EXPAND_ICON, H_SLIDER_ICON);
+ Animation* pAnimation = new (std::nothrow) Animation();
+ pAnimation->Construct(animRect, *__pAnimationFrameList);
+ pAnimation->SetName(IDC_ANIMATION_CONTROL);
+ pAnimation->SetRepeatCount(IDI_ANIM_DURATION * IDI_ANIM_PROGRESS_COUNT * IDI_ANIM_PROGRESS_COUNT);
+ pItem->AddControl(pAnimation);
+ pAnimation->Play();
+ }
+ }
+
+ //set background bitmap according to position in group
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_SINGLE_ITEM);
+ return pItem;
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleCallWaitingOptionSelected(TableViewItem* pItem, int itemIndex, TableViewItemStatus status)
+{
+ switch (itemIndex)
+ {
+ case CALLWAITING_ITEM:
+ {
+ //set the state based on response
+ if(__isCallWaitingStatusAvailable == true)
+ {
+ bool enableCallWaiting = false;
+ if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+ {
+ enableCallWaiting = true;
+ }
+ // send status change request to TAPI and change button status on callback
+ int errorCode = __pSettingsPresentor->SetCallWaitingStatus(enableCallWaiting);
+ if(errorCode != ERROR_NONE)
+ {
+ ShowErrorMessage(errorCode);
+ }
+ __isCallWaitingStatusAvailable = false;
+ SendUserEvent(REQUEST_UPDATE_TABLE,null);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ switch(requestId)
+ {
+ case REQUEST_UPDATE_TABLE:
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ pMainMenuTableView->UpdateTableView();
+ break;
+ }
+ default:
+ break;
+ }
+}
+//
+void
+SettingsCallForwardWaitBarrForm::HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated)
+{
+ if (__formType == FORMTYPE_CALL_WAITING)
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ //Hide animation and add on/Off checkbox by modifying item
+ __isCallWaitingEnabled = callWaitingActivated;
+ if (__isCallWaitingStatusAvailable == false)
+ {
+ __isCallWaitingStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLWAITING_ITEM, __isCallWaitingEnabled);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled)
+{
+ if (__formType == FORMTYPE_CALL_WAITING)
+ {
+ //Update status of "On/Off" slider button
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ __isCallWaitingEnabled = isCallWaitingEnabled;
+ if (__isCallWaitingStatusAvailable == false)
+ {
+ __isCallWaitingStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLWAITING_ITEM, __isCallWaitingEnabled);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime)
+{
+ if (__formType == FORMTYPE_VOICE_CALLFORWARDING)
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+
+ switch (callFwdCondition)
+ {
+ case CALL_FORWARD_ALL:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_ALWAYS, callForwardActivated);
+ __isCallForwardAlwaysActivated = callForwardActivated;
+ }
+ break;
+
+ case CALL_FORWARD_BUSY:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_BUSY, callForwardActivated);
+ }
+ break;
+
+ case CALL_FORWARD_NO_REPLY:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_NO_REPLY, callForwardActivated);
+ }
+ break;
+
+ case CALL_FORWARD_NOT_REACHABLE:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_OUT_OF_REACH, callForwardActivated);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime)
+{
+ if (__formType == FORMTYPE_VOICE_CALLFORWARDING)
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+
+ switch (callFwdCondition)
+ {
+ case CALL_FORWARD_ALL:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_ALWAYS, isCallForwardActivated);
+ __isCallForwardAlwaysActivated = isCallForwardActivated;
+ }
+ break;
+
+ case CALL_FORWARD_BUSY:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_BUSY, isCallForwardActivated);
+ }
+ break;
+
+ case CALL_FORWARD_NO_REPLY:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_NO_REPLY, isCallForwardActivated);
+ }
+ break;
+
+ case CALL_FORWARD_NOT_REACHABLE:
+ {
+ pMainMenuTableView->SetItemChecked(0, CALLFORWARD_IF_OUT_OF_REACH, isCallForwardActivated);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated)
+{
+
+ AppLogDebug("Enter %d",result);
+ //Update status of "On/Off" slider button
+
+ if(result == TAPI_SS_SUCCESS)
+ {
+ if (__formType == FORMTYPE_VOICE_CALLBARRING)
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ switch (callBarringType)
+ {
+ case CALL_BARRING_ALL_OUTGOING:
+ {
+ __allOutGoingCalls = isBarringActivated;
+ if (__isCallBarringAllOutStatusAvailable == false)
+ {
+ __isCallBarringAllOutStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_ALL_OUTGOING_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_OUTGOING:
+ {
+ __internationalCalls = isBarringActivated;
+ if (__isCallBarringIntlCallStatusAvailable == false)
+ {
+ __isCallBarringIntlCallStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INTERNATIONAL_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ __internationalExceptHome = isBarringActivated;
+ if (__isCallBarringIntlCallExptHomeStatusAvailable == false)
+ {
+ __isCallBarringIntlCallExptHomeStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INTERNATIONAL_EXCEPT_HOME, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_ALL_INCOMING:
+ {
+ __allIncomingCalls = isBarringActivated;
+ if (__isCallBarringIntlCallAllIncomingStatusAvailable == false)
+ {
+ __isCallBarringIntlCallAllIncomingStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_ALL_INCOMING_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INCOMING_ROAMING:
+ {
+ __incomingWhileRoaming = isBarringActivated;
+ if (__isCallBarringIntlCallIncomingRoamStatusAvailable == false)
+ {
+ __isCallBarringIntlCallIncomingRoamStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INCOMING_WHILE_ROAMING, isBarringActivated);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+ }
+ else if(result == TAPI_SS_NEGATIVEPWCHECK)
+ {
+ ShowErrorMessage(ERROR_WRONG_BARRING_PASSWORD);
+ }
+ else
+ {
+ ShowErrorMessage(ERROR_SYSTEM_FAILURE);
+ }
+}
+void
+SettingsCallForwardWaitBarrForm::HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated)
+{
+
+ AppLogDebug("Enter %d",result);
+ if (__formType == FORMTYPE_VOICE_CALLBARRING)
+ {
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ switch (callBarringType)
+ {
+ case CALL_BARRING_ALL_OUTGOING:
+ {
+ __allOutGoingCalls = isBarringActivated;
+ if (__isCallBarringAllOutStatusAvailable == false)
+ {
+ __isCallBarringAllOutStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_ALL_OUTGOING_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_OUTGOING:
+ {
+ __internationalCalls = isBarringActivated;
+ if (__isCallBarringIntlCallStatusAvailable == false)
+ {
+ __isCallBarringIntlCallStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INTERNATIONAL_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ __internationalExceptHome = isBarringActivated;
+ if (__isCallBarringIntlCallExptHomeStatusAvailable == false)
+ {
+ __isCallBarringIntlCallExptHomeStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INTERNATIONAL_EXCEPT_HOME, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_ALL_INCOMING:
+ {
+ __allIncomingCalls = isBarringActivated;
+ if (__isCallBarringIntlCallAllIncomingStatusAvailable == false)
+ {
+ __isCallBarringIntlCallAllIncomingStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_ALL_INCOMING_CALL, isBarringActivated);
+ }
+ break;
+
+ case CALL_BARRING_INCOMING_ROAMING:
+ {
+ __incomingWhileRoaming = isBarringActivated;
+ if (__isCallBarringIntlCallIncomingRoamStatusAvailable == false)
+ {
+ __isCallBarringIntlCallIncomingRoamStatusAvailable = true;
+ pMainMenuTableView->UpdateTableView();
+ }
+ pMainMenuTableView->SetItemChecked(0, CALLBARRING_INCOMING_WHILE_ROAMING, isBarringActivated);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::UncheckAllOptions(void)
+{
+ //un-check all items
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(pMainMenuTableView != null)
+ {
+ switch(__formType)
+ {
+ case FORMTYPE_VOICE_CALLFORWARDING:
+ {
+ for (int itemIndex = CALLFORWARD_ALWAYS; itemIndex < CALLFORWARD_TOTALITEMCOUNT; itemIndex++)
+ {
+ pMainMenuTableView->SetItemChecked(0, itemIndex, false);
+ }
+ }
+ break;
+
+ case FORMTYPE_VOICE_CALLBARRING:
+ {
+ for (int itemIndex = CALLBARRING_ALL_OUTGOING_CALL; itemIndex < CALLBARRING_TOTALCOUNT; itemIndex++)
+ {
+ pMainMenuTableView->SetItemChecked(0, itemIndex, false);
+ }
+ }
+ break;
+
+ case FORMTYPE_CALL_WAITING:
+ {
+ __isCallWaitingStatusAvailable = true;
+ __isCallWaitingEnabled = false;
+ pMainMenuTableView->RefreshItem(0, CALLWAITING_ITEM, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::ShowErrorMessage(int errorCode)
+{
+ //show error msg Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
+ }
+}
+
+void
+SettingsCallForwardWaitBarrForm::HandlePopupClosed(void)
+{
+ Draw();
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ return;
+}
+
+void
+SettingsCallForwardWaitBarrForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ pMainMenuTableView->RefreshAllItems();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsCallStatusTonesForm.cpp
+ * @brief Call Status tone setting form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnSettingsCallStatusTonesForm.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDL_SETTINGS_STATUS_TONES_FORM = L"IDL_SETTINGS_STATUS_TONES_FORM";
+const int SLIDERLENGTH = 140;
+
+SettingsCallStatusTonesForm::SettingsCallStatusTonesForm(void)
+{
+}
+
+SettingsCallStatusTonesForm::~SettingsCallStatusTonesForm(void)
+{
+}
+
+void
+SettingsCallStatusTonesForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_STATUS_TONES_FORM);
+}
+
+result
+SettingsCallStatusTonesForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //initialize table view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsCallStatusTonesForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsCallStatusTonesForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsCallStatusTonesForm::OnFormBackRequested(Controls::Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MORE_OPTIONS), null);
+}
+
+void
+SettingsCallStatusTonesForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ //update table view
+ GroupedTableView* pStatusTonesTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (__pSettingsPresentor != null && pStatusTonesTableView != null)
+ {
+ //call connect tone status
+ bool isConnectToneActive = __pSettingsPresentor->GetCallConnectToneStatus();
+ pStatusTonesTableView->SetItemChecked(GROUP_CALL_CONNECT, CALLCONNECT_CONNECT_TONE, isConnectToneActive);
+ //minute reminder tone status
+ bool isCallReminderActive = __pSettingsPresentor->GetMinuteMinderToneStatus();
+ pStatusTonesTableView->SetItemChecked(GROUP_CALL_REMINDER, CALLREMINDER_MINUTE_REMINDERS, isCallReminderActive);
+ //call end tone status
+ bool isCallEndActive = __pSettingsPresentor->GetCallEndToneStatus();
+ pStatusTonesTableView->SetItemChecked(GROUP_CALL_END, CALLEND_END_TONE, isCallEndActive);
+ pStatusTonesTableView->UpdateTableView();
+ }
+}
+
+void
+SettingsCallStatusTonesForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+result
+SettingsCallStatusTonesForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pStatusTonesTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pStatusTonesTableView != null)
+ {
+ //pStatusTonesTableView->SetGroupedLookEnabled(true);
+ pStatusTonesTableView->SetItemProvider(this);
+ r = pStatusTonesTableView->AddGroupedTableViewItemEventListener(*this);
+ pStatusTonesTableView->UpdateTableView();
+ pStatusTonesTableView->SetItemEnabled(GROUP_CALL_CONNECT, -1, false);
+ pStatusTonesTableView->SetItemEnabled(GROUP_CALL_REMINDER, -1, false);
+ pStatusTonesTableView->SetItemEnabled(GROUP_CALL_END, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsCallStatusTonesForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ bool activateState = false;
+ if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+ {
+ activateState = true;
+ }
+
+ result r = E_FAILURE;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_CONNECT:// for "CALLCONNECT_CONNECT_TONE" item
+ {
+ r = __pSettingsPresentor->SetCallConnectToneStatus(activateState);
+ }
+ break;
+
+ case GROUP_CALL_REMINDER:// for "CALLREMINDER_MINUTE_REMINDERS" item
+ {
+ r = __pSettingsPresentor->SetMinuteMinderToneStatus(activateState);
+ }
+ break;
+
+ case GROUP_CALL_END:// for "CALLEND_END_TONE" item
+ {
+ r = __pSettingsPresentor->SetCallEndToneStatus(activateState);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (IsFailed(r))
+ {
+ //revert status, vconf setting failed
+ tableView.SetItemChecked(groupIndex, itemIndex, !activateState);
+ }
+}
+
+int
+SettingsCallStatusTonesForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsCallStatusTonesForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_CONNECT:
+ {
+ itemCount = CALLCONNECT_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_REMINDER:
+ {
+ itemCount = CALLREMINDER_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_END:
+ {
+ itemCount = CALLEND_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_CONNECT_HLPTXT:
+ case GROUP_CALL_REMINDER_HLPTXT:
+ case GROUP_CALL_END_HLPTXT:
+ {
+ itemCount = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsCallStatusTonesForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ String helpText(L"");
+ int groupHeight = H_LIST_HIDDENGROUP_ITEM;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_CONNECT_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_CONNECTTONE_HLP_STRING));
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_CALL_REMINDER_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_REMINDERS_HLP_STRING));
+ groupHeight = H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_CALL_END_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_ENDTONE_HLP_STRING));
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ if (helpText.IsEmpty() == true)
+ {
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ }
+ else
+ {
+ //help text item rectangle
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, 0, (itemWidth - X_LIST_MENU_HLPTXT_ITEM), groupHeight);
+ pItem->Construct(Dimension(itemWidth, groupHeight));
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(helpItemRect, helpText);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(FONT_SIZE_HELP_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);
+ pItem->AddControl(pItemLbl);
+ pItem->SetEnabled(false);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ }
+ return pItem;
+}
+
+bool
+SettingsCallStatusTonesForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallStatusTonesForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ int groupHeight = H_LIST_HIDDENGROUP_ITEM;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_CONNECT_HLPTXT:
+ {
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_CALL_REMINDER_HLPTXT:
+ {
+ groupHeight = H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+ }
+ break;
+
+ case GROUP_CALL_END_HLPTXT:
+ {
+ groupHeight = H_LIST_MENU_TWOLINE_HLPTXT_ITEM;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, 0, (pItem->GetWidth() - X_LIST_MENU_HLPTXT_ITEM), groupHeight);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(helpItemRect);
+ }
+
+ return;
+}
+
+TableViewItem*
+SettingsCallStatusTonesForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ GroupedTableView* pStatusTonesTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM - SLIDERLENGTH ), H_LIST_NORMAL_MENU_ITEM);
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
+
+ //Set the item name and status for all menu items
+ String itemName(L"");
+ bool activateState = false;
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_CONNECT:// for "CALLCONNECT_CONNECT_TONE" item
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CONNECTTONE_STRING));
+ activateState = __pSettingsPresentor->GetCallConnectToneStatus();
+ }
+ break;
+
+ case GROUP_CALL_REMINDER:// for "CALLREMINDER_MINUTE_REMINDERS" item
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_REMINDERS_STRING));
+ activateState = __pSettingsPresentor->GetMinuteMinderToneStatus();
+ }
+ break;
+
+ case GROUP_CALL_END:// for "CALLEND_END_TONE" item
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_ENDTONE_STRING));
+ activateState = __pSettingsPresentor->GetCallEndToneStatus();
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+
+ //set status
+ pStatusTonesTableView->SetItemChecked(groupIndex, itemIndex, activateState);
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+bool
+SettingsCallStatusTonesForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsCallStatusTonesForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM,
+ 0, (pItem->GetWidth() - X_LIST_MENU_TEXT_ITEM - SLIDERLENGTH), H_LIST_NORMAL_MENU_ITEM);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(itemRect);
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return;
+}
+
+int
+SettingsCallStatusTonesForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsCallStatusTonesForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsCallStatusTonesForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pStatusTonesTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pStatusTonesTableView != null)
+ {
+ pStatusTonesTableView->RefreshAllItems();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsDeleteListForm.cpp
+ * @brief Settings Delete list form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsDeleteListForm.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//constants
+const int IDI_SELECT_ALL_ITEM_ELEMENT_ID = 20010;
+//by default, list has 1 item
+const int IDI_DEFAULT_LIST_COUNT = 1;
+//Element Id for main text used in List view item
+const int IDI_LIST_MAIN_TXT_ITEMID = 1000;
+//Right padding for the list view item
+const int IDI_LIST_ITEM_RIGHT_PADDING = 25;
+static const wchar_t* IDL_SETTINGS_DELETE_LIST_FORM = L"IDL_SETTINGS_DELETE_LIST_FORM";
+static const wchar_t* IDC_LABEL_DELETE_SELECTED = L"IDC_LABEL_DELETE_SELECTED";
+const int REJECTMSGLIST_ITEM_SIZE_DIFF = 120;
+static const int IDA_POPUP_DELETE_YES = 111;
+static const int IDA_POPUP_DELETE_NO = 112;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
+
+static const unsigned int COLOR_DELETE_LABEL_SELECTED = Color32<44, 44, 44, 255>::Value;
+
+SettingsDeleteListForm::SettingsDeleteListForm(ListOfType listOfType)
+ : __listOfType(listOfType)
+ , __pNumbersList(null)
+ , __pMsgsMap(null)
+ , __pSettingsPresentor(null)
+ , __checkedItemCount(0)
+ , __pSelectedLabel(null)
+ , __pConfirmationDeletePopup(null)
+{
+}
+
+SettingsDeleteListForm::~SettingsDeleteListForm(void)
+{
+}
+
+void
+SettingsDeleteListForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_DELETE_LIST_FORM);
+}
+
+bool
+SettingsDeleteListForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pConfirmationDeletePopup != null && __pConfirmationDeletePopup->GetShowState() == true)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+SettingsDeleteListForm::ShowDeleteConfirmationPopup(int deleteCommandIdYes)
+{
+ if(__pConfirmationDeletePopup != null)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ }
+
+ __pConfirmationDeletePopup = new (std::nothrow) Popup();
+ __pConfirmationDeletePopup->Construct(false, Dimension(688,230));
+ __pConfirmationDeletePopup->SetPropagatedKeyEventListener(this);
+ Label *pDeleteTitle = new Label();
+ pDeleteTitle->Construct(Rectangle(16,32,656,80), AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+ pDeleteTitle->SetTextConfig(38, LABEL_TEXT_STYLE_BOLD);
+ pDeleteTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pDeleteTitle->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ __pConfirmationDeletePopup->AddControl(pDeleteTitle);
+
+ //Yes button
+ Rectangle yesRect(354, 132, 318, 74);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_YES));
+ pYesButton->SetActionId(deleteCommandIdYes);
+ pYesButton->AddActionEventListener(*this);
+ pYesButton->SetColor(BUTTON_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ pYesButton->SetColor(BUTTON_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pConfirmationDeletePopup->AddControl(pYesButton);
+
+ //No button
+ Rectangle noRect(16, 132, 318, 74);
+ Button* pNoButton = new Button();
+ pNoButton->Construct(noRect, AppUtility::GetResourceString(IDS_DELETE_NO));
+ pNoButton->SetActionId(IDA_POPUP_DELETE_NO);
+ pNoButton->AddActionEventListener(*this);
+ __pConfirmationDeletePopup->AddControl(pNoButton);
+ __pConfirmationDeletePopup->SetShowState(true);
+ __pConfirmationDeletePopup->Show();
+}
+
+result
+SettingsDeleteListForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+
+ String title(L"");
+ switch (__listOfType)
+ {
+ case LISTOF_NUMBERS:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_DELETE_NUMBER_TITLE));
+ }
+ break;
+
+ case LISTOF_MESSAGES:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_DELETE_MSGS_TITLE));
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //set Title
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetTitleText(title);
+ }
+ //Initialize Footer
+ InitializeFooter();
+
+ //initialize list view
+ r = InitializeListView();
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ return r;
+}
+
+void
+SettingsDeleteListForm::InitializeSelectLabel()
+{
+ __pSelectedLabel = static_cast<Label*>(GetControl(IDC_LABEL_DELETE_SELECTED));
+ if(__pSelectedLabel != null)
+ {
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ __pSelectedLabel->SetText(AppUtility::GetResourceString(IDS_SELECT_NUMBER));
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ __pSelectedLabel->SetText(AppUtility::GetResourceString(IDS_SELECT_MESSAGE));
+ }
+
+ SetControlAlwaysOnTop(*__pSelectedLabel,true);
+ //Set background color
+ __pSelectedLabel->SetBackgroundColor(COLOR_DELETE_LABEL_SELECTED);
+ __pSelectedLabel->SetShowState(true);
+ }
+}
+void
+SettingsDeleteListForm::InitializeFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ String footerItemName(L"");
+ //Delete footer item
+ footerItemName.Append(AppUtility::GetResourceString(IDS_DELETE_BTN_STRING));
+ FooterItem delFooterItem;
+ delFooterItem.Construct(IDA_DELETE_FOOTER_ITEMID);
+ delFooterItem.SetText(footerItemName);
+ pFooter->InsertItemAt(0, delFooterItem);
+ pFooter->SetItemEnabled(0, false);
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsDeleteListForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pNumbersList)
+ {
+ delete __pNumbersList;
+ __pNumbersList = null;
+ }
+
+ if(__pConfirmationDeletePopup != null)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ }
+
+ if (__pMsgsMap)
+ {
+ delete __pMsgsMap;
+ __pMsgsMap = null;
+ }
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsDeleteListForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ case IDA_CANCEL_FOOTER_ITEMID:
+ {
+ if (__listOfType == LISTOF_NUMBERS)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTLIST_MENU), null);
+ }
+ else
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU), null);
+ }
+ }
+ break;
+ case IDA_DELETE_FOOTER_ITEMID:
+ {
+ ShowDeleteConfirmationPopup(IDA_POPUP_DELETE_YES);
+ }
+ break;
+ case IDA_POPUP_DELETE_YES:
+ {
+ if (__listOfType == LISTOF_NUMBERS)
+ {
+ DeleteRejectNumbersList();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTLIST_MENU), null);
+ }
+ else
+ {
+ DeleteRejectMsgsList();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU), null);
+ }
+
+ }
+ break;
+ case IDA_POPUP_DELETE_NO:
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+SettingsDeleteListForm::DeleteRejectNumbersList(void)
+{
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ if (pDelListView != null)
+ {
+ for (int index = 1; index < pDelListView->GetItemCount(); index++)
+ {
+ if (pDelListView->IsItemChecked(index) == true)
+ {
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt(index-1, rejectInfo);
+ __pSettingsPresentor->RemoveCallRejectRow(rejectInfo.rowId);
+ }
+ }
+ }
+}
+
+void
+SettingsDeleteListForm::DeleteRejectMsgsList(void)
+{
+ IListT<int> *pMsgKeyList = __pMsgsMap->GetKeysN();
+ //list of deleted keys
+ ArrayListT<int> *pDelKeyList = new (std::nothrow) ArrayListT<int>();
+ pDelKeyList->Construct();
+ //fetch checked messages to be deleted
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ if (pDelListView != null)
+ {
+ for (int index = 1; index < pDelListView->GetItemCount(); index++)
+ {
+ if (pDelListView->IsItemChecked(index) == true)
+ {
+ int key;
+ if(pMsgKeyList->GetAt(index-1, key) == E_SUCCESS)
+ {
+ pDelKeyList->Add(key);
+ }
+ }
+ }
+ }
+ delete pMsgKeyList;
+ //delete messages
+ if(pDelKeyList->GetCount() > 0)
+ {
+ __pSettingsPresentor->RemoveRejectMessage(*pDelKeyList);
+ }
+ delete pDelKeyList;
+}
+
+void
+SettingsDeleteListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ // Add your scene activate code here
+ switch (__listOfType)
+ {
+ case LISTOF_NUMBERS:
+ {
+ //fetch "reject numbers" or "reject msg" list
+ FetchNumbersRejectList();
+ }
+ break;
+
+ case LISTOF_MESSAGES:
+ {
+ //fetch "reject msgs" list
+ FetchRejectMsgsList();
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ if (pDelListView != null)
+ {
+ pDelListView->UpdateList();
+ int itemCount = pDelListView->GetItemCount();
+ for(int itemIndex = itemCount-1; itemIndex >=0 ; itemIndex--)
+ {
+ bool isSelected = pDelListView->IsItemChecked(itemIndex);
+ if(isSelected == true)
+ {
+ pDelListView->SetItemChecked(itemIndex,false);
+ }
+ }
+
+ //run a loop thru the map and if there is item with height 0 disable it
+ if(__listOfType == LISTOF_MESSAGES)
+ {
+ for(int index = 0; index < __pMsgsMap->GetCount(); index++)
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ String message;
+ pMsgList->GetAt(index, message);
+ if(message.Equals(L"",true) == true)
+ {
+ pDelListView->SetItemEnabled(index + 1,false);
+ }
+ else
+ {
+ pDelListView->SetItemEnabled(index + 1,true);
+ }
+ }
+ }
+ }
+ }
+ __checkedItemCount = 0;
+ Footer* pFooter = GetFooter();
+ if(pFooter != null)
+ {
+ pFooter->SetItemEnabled(0, false);
+ pFooter->Invalidate(true);
+ }
+ //to show selected msg or numbers
+ InitializeSelectLabel();
+}
+
+void
+SettingsDeleteListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+}
+
+void
+SettingsDeleteListForm::FetchNumbersRejectList(void)
+{
+ if (__pNumbersList != null)
+ {
+ delete __pNumbersList;
+ __pNumbersList = null;
+ }
+ __pNumbersList = static_cast<ArrayListT<CallRejectInfo>*>(__pSettingsPresentor->GetCallRejectList());
+}
+
+void
+SettingsDeleteListForm::FetchRejectMsgsList(void)
+{
+ if (__pMsgsMap != null)
+ {
+ delete __pMsgsMap;
+ __pMsgsMap = null;
+ }
+ //item to be fetched from Db
+ __pMsgsMap = __pSettingsPresentor->GetRejectMessageListN();
+}
+
+result
+SettingsDeleteListForm::InitializeListView(void)
+{
+ result r = E_FAILURE;
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ if (pDelListView != null)
+ {
+ pDelListView->SetBackgroundColor(this->GetBackgroundColor());
+ pDelListView->AddListViewItemEventListener(*this);
+ r = pDelListView->SetItemProvider(*this);
+ }
+ return r;
+}
+
+void
+SettingsDeleteListForm::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+ String text;
+ String selStr;
+ switch (index)
+ {
+ case 0://"Select All"
+ {
+ bool isSelect = (status == LIST_ITEM_STATUS_CHECKED);
+ SelectAllItems(isSelect);
+ }
+ break;
+
+ default:
+ {
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ bool isItemUnchecked = (status == LIST_ITEM_STATUS_UNCHECKED);
+ if(isItemUnchecked == true)
+ {
+ __checkedItemCount--;
+ //un-check "Select All", if it was checked earlier and any other item is unchecked.
+ if(pDelListView->IsItemChecked(0) == true)
+ {
+ pDelListView->SetItemChecked(0,false);
+ }
+ }
+ else
+ {
+ __checkedItemCount++;
+ int emptyItemCount = 0;
+ if(__pMsgsMap != null)
+ {
+ for(int index = 0; index < __pMsgsMap->GetCount(); index++)
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ String message;
+ pMsgList->GetAt(index, message);
+ if(message.Equals(L"",true) == true)
+ {
+ emptyItemCount++;
+ }
+ }
+ }
+ }
+ if(pDelListView->GetItemCount() == (__checkedItemCount+1+emptyItemCount))
+ {
+ pDelListView->SetItemChecked(0,true);
+ }
+ }
+ if (__checkedItemCount == 0)
+ {
+
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ selStr = AppUtility::GetResourceString(IDS_SELECT_NUMBER);
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ selStr = AppUtility::GetResourceString(IDS_SELECT_MESSAGE);
+ }
+ __pSelectedLabel->SetText(selStr);
+ }
+ else
+ {
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ //selStr = AppUtility::GetResourceString(IDS_NUMBER_SELECTED);
+ if(__checkedItemCount > 1)
+ {
+ selStr = AppUtility::GetResourceString(IDS_NUMBERS_SELECTED);
+ }
+ else
+ {
+ selStr = AppUtility::GetResourceString(IDS_NUMBER_SELECTED);
+ }
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ if(__checkedItemCount > 1)
+ {
+ selStr = AppUtility::GetResourceString(IDS_MESSAGES_SELECTED);
+ }
+ else
+ {
+ selStr = AppUtility::GetResourceString(IDS_MESSAGE_SELECTED);
+ }
+
+ }
+ text.Format(100, selStr.GetPointer(), __checkedItemCount);
+ __pSelectedLabel->SetText(text);
+ }
+ pDelListView->Invalidate(true);
+ __pSelectedLabel->Invalidate(false);
+ }
+ break;
+ }
+
+ Footer* pFooter = GetFooter();
+ if(pFooter != null)
+ {
+ if(__checkedItemCount > 0)
+ {
+ pFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ pFooter->SetItemEnabled(0, false);
+ }
+ pFooter->Invalidate(true);
+ }
+}
+
+void
+SettingsDeleteListForm::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
+{
+}
+void
+SettingsDeleteListForm::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId, ListContextItemStatus state)
+{
+}
+
+void
+SettingsDeleteListForm::OnListViewItemLongPressed(ListView& listView, int index, int elementId, bool& invokeListViewItemCallback)
+{
+}
+
+void
+SettingsDeleteListForm::SelectAllItems(bool isSelect)
+{
+ String text;
+ String selStr;
+ ListView* pDelListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW));
+ int itemCount = pDelListView->GetItemCount();
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ for (int index = 1; index < itemCount; index++)
+ {
+ pDelListView->SetItemChecked(index,isSelect);
+ }
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ for (int index = 0; index < itemCount; index++)
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ String message;
+ pMsgList->GetAt(index, message);
+ if(message.Equals(L"",true) == true)
+ {
+ pDelListView->SetItemChecked(index + 1,false);
+ }
+ else
+ {
+ pDelListView->SetItemChecked(index + 1,isSelect);
+ }
+ }
+ }
+ }
+ pDelListView->RequestRedraw();
+ if(isSelect)
+ {
+ __checkedItemCount = 0;
+ //First get the checked item count
+ if(__listOfType == LISTOF_MESSAGES)
+ {
+ for (int index = 0; index < itemCount; index++)
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ String message;
+ pMsgList->GetAt(index, message);
+ if(message.Equals(L"",true) == false)
+ {
+ __checkedItemCount++;
+ }
+ }
+ }
+ }
+ else if(__listOfType == LISTOF_NUMBERS)
+ {
+ __checkedItemCount = pDelListView->GetItemCount()-1;
+ }
+
+ //Then set the status message based on the list type
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ if(__checkedItemCount > 1)
+ {
+ selStr = AppUtility::GetResourceString(IDS_NUMBERS_SELECTED);
+ }
+ else
+ {
+ selStr = AppUtility::GetResourceString(IDS_NUMBER_SELECTED);
+ }
+
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ if(__checkedItemCount > 1)
+ {
+ selStr = AppUtility::GetResourceString(IDS_MESSAGES_SELECTED);
+ }
+ else
+ {
+ selStr = AppUtility::GetResourceString(IDS_MESSAGE_SELECTED);
+ }
+ }
+ text.Format(100, selStr.GetPointer(), __checkedItemCount);
+ __pSelectedLabel->SetText(text);
+ }
+ else
+ {
+ __checkedItemCount = 0;
+ if(__listOfType == LISTOF_NUMBERS)
+ {
+ selStr = AppUtility::GetResourceString(IDS_SELECT_NUMBER);
+ }
+ else if(__listOfType == LISTOF_MESSAGES)
+ {
+ selStr = AppUtility::GetResourceString(IDS_SELECT_MESSAGE);
+ }
+ __pSelectedLabel->SetText(selStr);
+
+ }
+
+ __pSelectedLabel->Invalidate(false);
+ Draw();
+}
+
+int
+SettingsDeleteListForm::GetItemCount(void)
+{
+ int itemCount = IDI_DEFAULT_LIST_COUNT;
+
+ switch (__listOfType)
+ {
+ case LISTOF_NUMBERS:
+ {
+ if (__pNumbersList != null)
+ {
+ itemCount += __pNumbersList->GetCount();
+ }
+ }
+ break;
+
+ case LISTOF_MESSAGES:
+ {
+ if (__pMsgsMap != null)
+ {
+ itemCount += __pMsgsMap->GetCount();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+ListItemBase*
+SettingsDeleteListForm::CreateItem(int index, int itemWidth)
+{
+ CustomItem* pItem = null;
+
+ if (index == 0)
+ {
+ //Default Item - "SELECT ALL"
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), LIST_ANNEX_STYLE_MARK);
+
+ String itemName = AppUtility::GetResourceString(IDS_SELECT_ALL_LIST_ITEM_STRING);
+ pItem->AddElement(Rectangle(X_DEL_LIST_ELEMENT, Y_DEL_LIST_ELEMENT, W_DELETE_LIST_ITEM, H_LIST_NORMAL_MENU_ITEM), IDI_SELECT_ALL_ITEM_ELEMENT_ID, itemName, false);
+ pItem->SetElementTextHorizontalAlignment(IDI_LIST_MAIN_TXT_ITEMID, ALIGNMENT_LEFT);
+ pItem->SetElementTextVerticalAlignment(IDI_LIST_MAIN_TXT_ITEMID, ALIGNMENT_MIDDLE);
+ pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, COLOR_SELECTALL_ITEM_BG);
+ }
+ else
+ {
+ switch (__listOfType)
+ {
+ case LISTOF_NUMBERS:
+ pItem = CreateListItemForNumbers(index, itemWidth);
+ break;
+
+ case LISTOF_MESSAGES:
+ pItem = CreateListItemForMsgs(index, itemWidth);
+ break;
+
+ default:
+ break;
+
+ }
+ }
+
+ return pItem;
+}
+
+CustomItem*
+SettingsDeleteListForm::CreateListItemForNumbers(int index, int itemWidth)
+{
+ CustomItem* pItem = null;
+ int listIndex = index - 1;
+
+ if (__pNumbersList != null && listIndex < __pNumbersList->GetCount())
+ {
+ //fetch number
+ String number;
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt(listIndex, rejectInfo);
+ number.Append(rejectInfo.phoneNumber);
+ //create list item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), LIST_ANNEX_STYLE_MARK);
+
+ pItem->AddElement(Rectangle(X_DEL_LIST_ELEMENT, Y_DEL_LIST_ELEMENT, itemWidth - REJECTMSGLIST_ITEM_SIZE_DIFF, H_LIST_NORMAL_MENU_ITEM), listIndex, number,
+ mainFontSize, COLOR_MAIN_TXT, COLOR_PRESS_MAIN_TXT, COLOR_PRESS_MAIN_TXT, false);
+ pItem->SetElementTextHorizontalAlignment(listIndex, ALIGNMENT_LEFT);
+ pItem->SetElementTextVerticalAlignment(listIndex, ALIGNMENT_MIDDLE);
+ }
+ return pItem;
+}
+
+CustomItem*
+SettingsDeleteListForm::CreateListItemForMsgs(int index, int itemWidth)
+{
+ CustomItem* pItem = null;
+ int listIndex = index - 1;
+
+ if (__pMsgsMap != null && listIndex < __pMsgsMap->GetCount())
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ //fetch number
+ String message;
+ pMsgList->GetAt(listIndex, message);
+
+ //create list item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ if(message.Equals(L"",true) == true)
+ {
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, 0), LIST_ANNEX_STYLE_MARK);
+ return pItem;
+ }
+ else
+ {
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), LIST_ANNEX_STYLE_MARK);
+
+ pItem->AddElement(Rectangle(X_DEL_LIST_ELEMENT, Y_DEL_LIST_ELEMENT, itemWidth-REJECTMSGLIST_ITEM_SIZE_DIFF, H_LIST_NORMAL_MENU_ITEM), listIndex, message,
+ mainFontSize, COLOR_MAIN_TXT, COLOR_PRESS_MAIN_TXT, COLOR_PRESS_MAIN_TXT, false);
+ pItem->SetElementTextHorizontalAlignment(listIndex, ALIGNMENT_LEFT);
+ pItem->SetElementTextVerticalAlignment(listIndex, ALIGNMENT_MIDDLE);
+ }
+ delete pMsgList;
+ }
+ }
+ return pItem;
+}
+
+bool
+SettingsDeleteListForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsDeleteListForm::OnFormBackRequested(Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ if (__listOfType == LISTOF_NUMBERS)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTLIST_MENU), null);
+ }
+ else
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU), null);
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsEditRejectMsgForm.cpp
+ * @brief Settings Edit reject message form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSettingsEditRejectMsgForm.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+static const wchar_t* IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM = L"IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM";
+
+SettingsEditRejectMsgForm::SettingsEditRejectMsgForm(FormMode formMode)
+ : __formMode(formMode),__pSettingsPresentor(null)
+{
+}
+
+SettingsEditRejectMsgForm::~SettingsEditRejectMsgForm(void)
+{
+}
+
+bool
+SettingsEditRejectMsgForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM);
+ return true;
+}
+
+result
+SettingsEditRejectMsgForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ //Initialize Header & Footer
+ InitializeHeaderAndFooter();
+ //Initialize reject message editArea
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA,true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs != null)
+ {
+ pEditMsgs->AddTextEventListener(*this);
+ pEditMsgs->SetTextSize(mainFontSize);
+ pEditMsgs->SetSize(pEditMsgs->GetWidth(), mainItemTextSize);
+ }
+
+ return r;
+}
+
+void
+SettingsEditRejectMsgForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA,true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs != null)
+ {
+ pEditMsgs->SetTextSize(mainFontSize);
+ pEditMsgs->SetSize(pEditMsgs->GetWidth(), mainItemTextSize);
+ pEditMsgs->Invalidate(true);
+ }
+}
+
+void
+SettingsEditRejectMsgForm::InitializeHeaderAndFooter(void)
+{
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetStyle(HEADER_STYLE_TITLE);
+ String title(L"");
+ switch (__formMode)
+ {
+ case FORMMODE_NEW_MESSAGE:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_ADD_REJECT_MSG_TITLE));
+ }
+ break;
+
+ case FORMMODE_EDIT_MESSAGE:
+ {
+ title.Append(AppUtility::GetResourceString(IDS_SETTING_EDIT_REJECT_MSG_TITLE));
+ }
+ break;
+ }
+ pHeader->SetTitleText(title);
+ }
+
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ //change style to show "save" in center
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ //'Save' item
+ String saveItemName;
+ saveItemName.Append(AppUtility::GetResourceString(IDS_SETTING_SAVE_HEADER_ITEM));
+ FooterItem saveFooterItem;
+ saveFooterItem.Construct(IDA_SAVE_FOOTER_ITEMID);
+ saveFooterItem.SetText(saveItemName);
+ pFooter->AddItem(saveFooterItem);
+ pFooter->SetItemEnabled(0,false);
+
+ //'Cancel' item
+ SetFormBackEventListener(this);
+
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsEditRejectMsgForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SettingsEditRejectMsgForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ case IDA_SAVE_FOOTER_ITEMID:
+ {
+ if (__itemIndex != -1)
+ {
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA,true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs != null)
+ {
+ String rejectMsg = pEditMsgs->GetText();
+ rejectMsg.Trim();
+ result r = __pSettingsPresentor->SetRejectMessage(__itemIndex, rejectMsg);
+ if (r == E_OBJ_ALREADY_EXIST)
+ {
+ SetFocus();
+ //show error Message box, in case of duplicate message error.
+ String errorMsg;
+ errorMsg.Append("\"");
+ errorMsg.Append(rejectMsg);
+ errorMsg.Append("\"\n");
+ errorMsg.Append(AppUtility::GetResourceString(IDS_DUPLICATE_REJECT_MSG_ERROR_STRING));
+
+ int msgResult;
+ MessageBox msgBox;
+ msgBox.Construct(L"", errorMsg, MSGBOX_STYLE_OK,300000);
+ msgBox.ShowAndWait(msgResult);
+ }
+ }
+ }
+ //switch back to previous form
+ pSceneManager->GoForward(
+ ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_ADD_HISTORY,
+ SCENE_DESTROY_OPTION_DESTROY), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsEditRejectMsgForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ __itemIndex = -1;
+ __editRejectMsg.Clear();
+ AddOrientationEventListener(*this);
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA,true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs != null && pArgs != null)
+ {
+ __itemIndex = (static_cast<Integer*>(pArgs->GetAt(0)))->ToInt();
+ if (__formMode == FORMMODE_EDIT_MESSAGE )
+ {
+ __editRejectMsg.Append(*(static_cast<String*>(pArgs->GetAt(1))));
+ }
+ pEditMsgs->SetText(__editRejectMsg);
+
+ //reset limit length.Since there is issue that ExpandableEditArea takes
+ //another 80 chars each time it is opened in edit mode.
+ //int limitLength = pEditMsgs->GetLimitLength() - __editRejectMsg.GetLength();
+ //pEditMsgs->SetLimitLength(limitLength);
+ pEditMsgs->SetTextSize(mainFontSize);
+ // pEditMsgs->SetSize(pEditMsgs->GetWidth(), mainItemTextSize);
+ pEditMsgs->SetPropagatedKeyEventListener(this);
+ pEditMsgs->SetFocus();
+ pEditMsgs->Invalidate(true);
+ }
+
+ //Disable save button
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetItemEnabled(0, false);
+ pFooter->Invalidate(true);
+ }
+
+ if (pArgs != null)
+ {
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+
+}
+
+void
+SettingsEditRejectMsgForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ // Add your scene de-activate code here
+ __pSettingsPresentor = null;
+ RemoveOrientationEventListener(*this);
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA, true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs != null)
+ {
+ pEditMsgs->HideKeypad();
+ pEditMsgs->SetPropagatedKeyEventListener(null);
+ }
+}
+
+void
+SettingsEditRejectMsgForm::OnTextValueChanged(const Control& source)
+{
+ AppLogDebug("Enter");
+ //ExpandableEditArea* pEditMsgs = static_cast<ExpandableEditArea*>(GetControl(IDC_REJECTMSG_EXPANDABLEEDITAREA, true));
+ EditField* pEditMsgs = static_cast<EditField*>(GetControl(IDC_REJECTMSG_EDITFIELD,true));
+ if (pEditMsgs)
+ {
+ String text = pEditMsgs->GetText();
+ text.Trim();
+ Footer* pFooter = GetFooter();
+ if ((text.IsEmpty() == false)
+ && (__editRejectMsg.Equals(text, true) == false))
+ {
+ //Enable save button
+ pFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ //disable
+ pFooter->SetItemEnabled(0, false);
+ }
+ pFooter->Invalidate(true);
+ }
+}
+
+bool
+SettingsEditRejectMsgForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ return false;
+}
+void
+SettingsEditRejectMsgForm::OnTextValueChangeCanceled(const Control& source)
+{
+}
+
+void
+SettingsEditRejectMsgForm::OnFormBackRequested(Form& source)
+{
+ //switch back to previous form
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_ADD_HISTORY,
+ SCENE_DESTROY_OPTION_DESTROY), null);
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsForwardToNumberForm.cpp
+ * @brief Setting Forward to number form
+ */
+#include <FApp.h>
+#include <FBase.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSettingsForwardToNumberForm.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const wchar_t* IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM = L"IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM";
+static const wchar_t* IDL_SETTINGS_FORWARDTO_NUMBER_FORM = L"IDL_SETTINGS_FORWARDTO_NUMBER_FORM";
+const int IDI_WAITTIMEOPTIONS_TOTALCOUNT = 6;
+
+SettingsForwardToNumberForm::SettingsForwardToNumberForm(ForwardCondition forwardCondition)
+ : __forwardCondition(forwardCondition)
+ , __pSettingsPresentor(null)
+ , __selectedWaitTime(WAITTIMEOPTIONS_THIRTY_SEC)
+ , __isWaitTimeOptionsMenuExpanded(false)
+ , __pErrorMsgPopup(null)
+{
+}
+
+SettingsForwardToNumberForm::~SettingsForwardToNumberForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+}
+
+bool
+SettingsForwardToNumberForm::Initialize(void)
+{
+ switch (__forwardCondition)
+ {
+ case FORWARDCONDITION_NOREPLY:
+ {
+ Construct(IDL_SETTINGS_NOREPLY_FORWARDTO_NUMBER_FORM);
+ }
+ break;
+
+ default:
+ {
+ Construct(IDL_SETTINGS_FORWARDTO_NUMBER_FORM);
+ }
+ break;
+ }
+
+ return true;
+}
+
+result
+SettingsForwardToNumberForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ //Initialize Header
+ InitializeHeader();
+ //Initialize list view
+ r = InitializeGroupedTableView();
+ TryReturn(r == E_SUCCESS,r,"GroupedTableView initialization failed");
+ //Initialize numeric edit field
+ InitializeNumberEditField();
+ return r;
+}
+
+void
+SettingsForwardToNumberForm::InitializeHeader(void)
+{
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetStyle(HEADER_STYLE_BUTTON);
+ //'Done' item
+ String doneItemName;
+ doneItemName.Append(AppUtility::GetResourceString(IDS_SETTING_DONE_HEADER_ITEM));
+ HeaderItem doneHeaderItem;
+ doneHeaderItem.Construct(IDA_SAVE_HEADER_ITEMID);
+ doneHeaderItem.SetText(doneItemName);
+ pHeader->AddItem(doneHeaderItem);
+ pHeader->SetItemEnabled(0, false);
+
+ //'Cancel' item
+ ButtonItem cancelHeaderItem;
+ cancelHeaderItem.Construct(BUTTON_ITEM_STYLE_ICON, IDA_CANCEL_HEADER_ITEMID);
+ Bitmap* pNormalBmp = AppUtility::GetBitmapFromResourcesN(IDB_CANCEL_HEADER_ITEM, W_HDR_FTR_ICON, H_HDR_FTR_ICON);
+ cancelHeaderItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pNormalBmp);
+ cancelHeaderItem.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pNormalBmp);
+ pHeader->SetButton(BUTTON_POSITION_RIGHT, cancelHeaderItem);
+ delete pNormalBmp;
+ pNormalBmp = null;
+
+ pHeader->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsForwardToNumberForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SettingsForwardToNumberForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ case IDA_CANCEL_HEADER_ITEMID:
+ {
+ //go back to previous form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_FORWARD_OPTIONS), null);
+ }
+ break;
+
+ case IDA_SAVE_HEADER_ITEMID:
+ {
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if (pEditFieldNumber != null)
+ {
+ //disable all other forwarding conditions, if 'CALL_FORWARD_ALL' is activated
+ /*if(__callForwardCondition == CALL_FORWARD_ALL)
+ {
+ __pSettingsPresentor->SetCallForwardStatus(L"", CALL_FORWARD_BUSY, false, 0);
+ __pSettingsPresentor->SetCallForwardStatus(L"", CALL_FORWARD_NO_REPLY, false, 0);
+ __pSettingsPresentor->SetCallForwardStatus(L"", CALL_FORWARD_NOT_REACHABLE, false, 0);
+ }*/
+
+ //enable status
+ String phoneNumber = pEditFieldNumber->GetText();
+ int errorCode = __pSettingsPresentor->SetCallForwardStatus(phoneNumber, __callForwardCondition, true, __selectedWaitTime);
+ if(errorCode != ERROR_NONE)
+ {
+ ShowErrorMessage(errorCode);
+ return;
+ }
+ }
+ //go back to previous form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_FORWARD_OPTIONS), null);
+ }
+ break;
+
+ case IDA_VOICEMAIL:
+ {
+ }
+ break;
+
+ case IDA_SELECT_CONTACT:
+ {
+ LaunchContactsAppControl();
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsForwardToNumberForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ __pSettingsPresentor->AddSettingEventListener(this);
+
+ if (pArgs != null)
+ {
+ int errorCode = ERROR_NONE;
+ Integer* indexInt = static_cast<Integer*>(pArgs->GetAt(0));
+ switch (indexInt->ToInt())
+ {
+ case 0:
+ {
+ __callForwardCondition = CALL_FORWARD_ALL;
+ }
+ break;
+
+ case 1:
+ {
+ __callForwardCondition = CALL_FORWARD_BUSY;
+ }
+ break;
+
+ case 2:
+ {
+ __callForwardCondition = CALL_FORWARD_NO_REPLY;
+ }
+ break;
+
+ case 3:
+ {
+ __callForwardCondition = CALL_FORWARD_NO_REPLY;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(pMainMenuTableView != null)
+ {
+ __selectedWaitTime = WAITTIMEOPTIONS_THIRTY_SEC;
+ int selectIndex = (__selectedWaitTime / 5) - 1;
+ //by default, "30 seconds" option is selected
+ pMainMenuTableView->SetItemChecked(GROUP_WAIT_TIME_OPTIONS, selectIndex, true);
+ //uncheck all other items
+ for (int deselectIndex = 0; deselectIndex < selectIndex; deselectIndex++)
+ {
+ pMainMenuTableView->SetItemChecked(GROUP_WAIT_TIME_OPTIONS, deselectIndex, false);
+ }
+ pMainMenuTableView->RefreshItem(GROUP_SELECT_WAIT_TIME, SELECTWAITTIME_WAIT_TIME, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ pMainMenuTableView->Invalidate(true);
+ }
+
+ //fetch forwarding status
+ errorCode = __pSettingsPresentor->GetCallForwardStatus(__callForwardCondition);
+ if(errorCode != ERROR_NONE)
+ {
+ //Show error message popup
+ ShowErrorMessage(errorCode);
+ }
+
+ //clear text field and disable "Done" button
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if(pEditFieldNumber != null)
+ {
+ pEditFieldNumber->Clear();
+ pEditFieldNumber->SetFocus();
+ }
+ Header* pHeader = GetHeader();
+ if (pHeader != null)
+ {
+ pHeader->SetItemEnabled(0, false);
+ }
+
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+}
+
+void
+SettingsForwardToNumberForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ __pSettingsPresentor->RemoveSettingEventListener();
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if (pEditFieldNumber != null)
+ {
+ pEditFieldNumber->HideKeypad();
+ }
+}
+
+void
+SettingsForwardToNumberForm::InitializeNumberEditField(void)
+{
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if (pEditFieldNumber != null)
+ {
+ pEditFieldNumber->AddKeypadEventListener(*this);
+ pEditFieldNumber->AddTextEventListener(*this);
+ pEditFieldNumber->SetOverlayKeypadCommandButtonVisible(false);
+ }
+
+ Button* pContactBtn = static_cast<Button*>(GetControl(IDC_SELECT_CONTACT_BUTTON));
+ if (pContactBtn != null)
+ {
+ pContactBtn->SetActionId(IDA_SELECT_CONTACT);
+ pContactBtn->AddActionEventListener(*this);
+ }
+
+ Button* pVoiceMailBtn = static_cast<Button*>(GetControl(IDC_VOICEMAIL_BUTTON));
+ if (pVoiceMailBtn != null)
+ {
+ pVoiceMailBtn->SetActionId(IDA_VOICEMAIL);
+ pVoiceMailBtn->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsForwardToNumberForm::InitializeGroupedTableView(void)
+{
+ result r = E_SUCCESS;
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //pMainMenuTableView->SetGroupedLookEnabled(true);
+ pMainMenuTableView->SetItemProvider(this);
+ r = pMainMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMainMenuTableView->UpdateTableView();
+ CollapseSelectiveGroups(pMainMenuTableView);
+ }
+ return r;
+}
+
+void
+SettingsForwardToNumberForm::CollapseSelectiveGroups(GroupedTableView* pMainMenuTableView)
+{
+ //This function should be called only from "InitializeGroupedTableView()".
+ //since collapsing individual groups while GroupTableView construction causes flicker.
+ pMainMenuTableView->CollapseAllGroup();
+ //Expand other groups
+ pMainMenuTableView->ExpandGroup(GROUP_SELECT_WAIT_TIME);
+ pMainMenuTableView->UpdateTableView();
+}
+
+void
+SettingsForwardToNumberForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ switch (groupIndex)
+ {
+ case GROUP_SELECT_WAIT_TIME:
+ {
+ //close overlay keypad
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if (pEditFieldNumber != null && pEditFieldNumber->HasFocus() == true)
+ {
+ //If Keyapd is open, then "CloseGroup" in OnKeypadClose() callback
+ pEditFieldNumber->HideKeypad();
+ }
+ else
+ {
+ //keypad is closed, directly expand group
+ ToggleGroupExpansion(tableView, itemIndex);
+ }
+ }
+ break;
+
+ case GROUP_WAIT_TIME_OPTIONS:
+ {
+ HandleSelectedWaitingTime(tableView, itemIndex, status);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+int
+SettingsForwardToNumberForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsForwardToNumberForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_SELECT_WAIT_TIME:
+ {
+ itemCount = SELECTWAITTIME_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_WAIT_TIME_OPTIONS:
+ {
+ itemCount = IDI_WAITTIMEOPTIONS_TOTALCOUNT;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsForwardToNumberForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ return pItem;
+}
+
+bool
+SettingsForwardToNumberForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsForwardToNumberForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsForwardToNumberForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ TableViewItem* pItem = null;
+
+ switch (groupIndex)
+ {
+ case GROUP_SELECT_WAIT_TIME:
+ {
+ pItem = CreateExpandableWaitingItem(itemWidth);
+ }
+ break;
+
+ case GROUP_WAIT_TIME_OPTIONS:
+ {
+ pItem = CreateWaitingTimeOptionsMenuItems(itemIndex, itemWidth);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return pItem;
+}
+
+bool
+SettingsForwardToNumberForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsForwardToNumberForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+ if(groupIndex == GROUP_SELECT_WAIT_TIME && itemIndex == SELECTWAITTIME_WAIT_TIME)
+ {
+ String subText = FetchTextForSelectedOption(__selectedWaitTime);
+ //sub text item
+ Label* pSubTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_SELECTEDOPTION_SUBTEXT_LABEL, true));
+ if(pSubTxtLbl != null)
+ {
+ pSubTxtLbl->SetText(subText);
+ pSubTxtLbl->Invalidate(true);
+ }
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isWaitTimeOptionsMenuExpanded);
+ }
+}
+
+int
+SettingsForwardToNumberForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsForwardToNumberForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+TableViewItem*
+SettingsForwardToNumberForm::CreateExpandableWaitingItem(int itemWidth)
+{
+ //main text
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ H_LIST_DROPDOWN_TXT_ITEM);
+ String mainText = AppUtility::GetResourceString(IDS_SETTING_WAITING_TIME_STRING);
+ //sub text
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, (Y_LIST_MENU_TEXT_ITEM + H_LIST_DROPDOWN_TXT_ITEM),
+ (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON), H_LIST_DROPDOWN_TXT_ITEM);
+ String subText = FetchTextForSelectedOption(__selectedWaitTime);
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_DROPDOWN_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //main text item
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pMainTxtLbl = new (std::nothrow) Label();
+ pMainTxtLbl->Construct(mainItemRect, mainText);
+ pMainTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMainTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pMainTxtLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pMainTxtLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);
+ pItem->AddControl(pMainTxtLbl);
+ //sub text item
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetName(IDC_SELECTEDOPTION_SUBTEXT_LABEL);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SUB_TXT);
+ pItem->AddControl(*pSubTxtLbl);
+
+ pItem->SetBackgroundColor(COLOR_LIST_MENU_ITEM, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, __isWaitTimeOptionsMenuExpanded);
+ return pItem;
+}
+
+String
+SettingsForwardToNumberForm::FetchTextForSelectedOption(int selectedWaitTimeOption)
+{
+ //default text
+ String subText(L"");
+ switch(selectedWaitTimeOption)
+ {
+ case WAITTIMEOPTIONS_FIVE_SEC:
+ subText.Append(L"5 ");
+ break;
+
+ case WAITTIMEOPTIONS_TEN_SEC:
+ subText.Append(L"10 ");
+ break;
+
+ case WAITTIMEOPTIONS_FIFTEEN_SEC:
+ subText.Append(L"15 ");
+ break;
+
+ case WAITTIMEOPTIONS_TWENTY_SEC:
+ subText.Append(L"20 ");
+ break;
+
+ case WAITTIMEOPTIONS_TWENTYFIVE_SEC:
+ subText.Append(L"25 ");
+ break;
+
+ case WAITTIMEOPTIONS_THIRTY_SEC:
+ default:
+ subText.Append(L"30 ");
+ break;
+ }
+ subText.Append(AppUtility::GetResourceString(IDS_SETTING_WAIT_INTERVAL_STRING));
+ return subText;
+}
+
+void
+SettingsForwardToNumberForm::ToggleGroupExpansion(GroupedTableView& tableView, int itemIndex)
+{
+ switch (itemIndex)
+ {
+ case SELECTWAITTIME_WAIT_TIME:
+ {
+ if (tableView.IsGroupExpanded(GROUP_WAIT_TIME_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_WAIT_TIME_OPTIONS);
+ __isWaitTimeOptionsMenuExpanded = false;
+ }
+ else
+ {
+ tableView.ExpandGroup(GROUP_WAIT_TIME_OPTIONS);
+ __isWaitTimeOptionsMenuExpanded = true;
+ }
+ //Change icon
+ tableView.RefreshItem(GROUP_SELECT_WAIT_TIME, SELECTWAITTIME_WAIT_TIME, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+}
+
+TableViewItem*
+SettingsForwardToNumberForm::CreateWaitingTimeOptionsMenuItems(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+ pItem->SetBackgroundColor(COLOR_SECONDDEPTH_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_DROPDOWN_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ GroupSelectWaitTimeItems selectedOption = (GroupSelectWaitTimeItems)((itemIndex + 1) * 5);
+ itemName.Append(FetchTextForSelectedOption(selectedOption));
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+ return pItem;
+}
+
+void
+SettingsForwardToNumberForm::HandleSelectedWaitingTime(GroupedTableView& tableView, int itemIndex, TableViewItemStatus status)
+{
+ GroupWaitTimeOptionsItems currentWaitTime = (GroupWaitTimeOptionsItems) ((itemIndex + 1) * 5);
+
+ //check if already checked item is selected
+ if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ tableView.SetItemChecked(GROUP_WAIT_TIME_OPTIONS, itemIndex, true);
+ __selectedWaitTime = currentWaitTime;
+ return;
+ }
+ //uncheck previously selected option
+ if(__selectedWaitTime != currentWaitTime)
+ {
+ int deselectIndex = ((__selectedWaitTime / 5) - 1);
+ tableView.SetItemChecked(GROUP_WAIT_TIME_OPTIONS, deselectIndex, false);
+ tableView.RefreshItem(GROUP_WAIT_TIME_OPTIONS, deselectIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ //update selected wait time for selected itemIndex
+ __selectedWaitTime = currentWaitTime;
+ //Change icon and sub text for wait time options menu
+ tableView.RefreshItem(GROUP_SELECT_WAIT_TIME, SELECTWAITTIME_WAIT_TIME, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ tableView.Invalidate(true);
+}
+
+void
+SettingsForwardToNumberForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
+{
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(pMainMenuTableView != null && __isWaitTimeOptionsMenuExpanded == true)
+ {
+ pMainMenuTableView->CollapseGroup(GROUP_WAIT_TIME_OPTIONS);
+ __isWaitTimeOptionsMenuExpanded = false;
+ //Change icon
+ pMainMenuTableView->RefreshItem(GROUP_SELECT_WAIT_TIME, SELECTWAITTIME_WAIT_TIME, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
+
+void
+SettingsForwardToNumberForm::OnKeypadClosed(Tizen::Ui::Control& source)
+{
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(pMainMenuTableView != null && __isWaitTimeOptionsMenuExpanded == false)
+ {
+ ToggleGroupExpansion(*pMainMenuTableView, SELECTWAITTIME_WAIT_TIME);
+ }
+}
+
+void
+SettingsForwardToNumberForm::ShowErrorMessage(int errorCode)
+{
+ //show error msg Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
+ }
+}
+
+void
+SettingsForwardToNumberForm::HandlePopupClosed(void)
+{
+ Draw();
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ return;
+}
+
+void
+SettingsForwardToNumberForm::HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime)
+{
+ if (callForwardActivated == true)
+ {
+ //update forward number in text field
+ if(callFwdNumber.IsEmpty() == false)
+ {
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ if (pEditFieldNumber != null)
+ {
+ pEditFieldNumber->SetText(callFwdNumber);
+ pEditFieldNumber->Invalidate(true);
+ }
+ }
+ //update No Reply Wait time status
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //un-check all waiting time options
+ int index = 0;
+ while(index < IDI_WAITTIMEOPTIONS_TOTALCOUNT)
+ {
+ pMainMenuTableView->SetItemChecked(GROUP_WAIT_TIME_OPTIONS, index, false);
+ index++;
+ }
+ //enable selected wait time option
+ if(noReplyWaitTime >= WAITTIMEOPTIONS_FIVE_SEC)
+ {
+ int selectedIndex = (noReplyWaitTime / WAITTIMEOPTIONS_FIVE_SEC) - 1;
+ pMainMenuTableView->SetItemChecked(GROUP_WAIT_TIME_OPTIONS, selectedIndex, true);
+ }
+ pMainMenuTableView->Invalidate(true);
+ }
+ }
+}
+
+void
+SettingsForwardToNumberForm::LaunchContactsAppControl(void)
+{
+ result r = E_SUCCESS;
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(SELECTION_MODE), new (std::nothrow) String(SELECTION_MODE_SINGLE));
+ extraData.Add(new (std::nothrow) String(RETURN_TYPE), new (std::nothrow) String(RETURN_TYPE_PHONE));
+
+ AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_PICK);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ delete pAc;
+ }
+ extraData.RemoveAll(true);
+}
+
+void
+SettingsForwardToNumberForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ if (appId.Equals(String(PROVIDER_ID_CONTACTS)) && operationId.Equals(String(OPERATION_ID_PICK))
+ && (appControlResult == APP_CTRL_RESULT_SUCCEEDED))
+ {
+ const String* rettype = static_cast<const String *>(pExtraData->GetValue( String(RETURN_TYPE)));
+ if (rettype->Equals(String(RETURN_TYPE_PHONE)))
+ {
+ const String* pPickResult = static_cast<const String *>(pExtraData->GetValue( String(RETURN_KEY_VALUE)));
+ if (pPickResult != null && pPickResult->IsEmpty() == false)
+ {
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ Header* pHeader = GetHeader();
+ if (pEditFieldNumber != null && pHeader != null)
+ {
+ pEditFieldNumber->SetText(*pPickResult);
+ pEditFieldNumber->Invalidate(true);
+ //enable "Done" button
+ pHeader->SetItemEnabled(0, true);
+ pHeader->Invalidate(true);
+ }
+ }
+ }
+ }
+
+}
+
+void
+SettingsForwardToNumberForm::OnTextValueChanged(const Control& source)
+{
+ //enable or disable "Done" button
+ EditField* pEditFieldNumber = static_cast<EditField*>(GetControl(IDC_FOWARDING_NUMBER_EDITFIELD));
+ Header* pHeader = GetHeader();
+ if (pEditFieldNumber != null && pHeader != null)
+ {
+ bool activate = false;
+ if(pEditFieldNumber->GetTextLength() > 0)
+ {
+ activate = true;
+ }
+ pHeader->SetItemEnabled(0, activate);
+ pHeader->Invalidate(true);
+ }
+}
+
+void
+SettingsForwardToNumberForm::OnTextValueChangeCanceled(const Control& source)
+{
+ //text change canceled, disable save button
+ const EditField* pEditFieldNumber = static_cast<const EditField*>(&source);
+ Header* pHeader = GetHeader();
+ if (pEditFieldNumber != null && pHeader != null)
+ {
+ pHeader->SetItemEnabled(0, false);
+ pHeader->Invalidate(true);
+ }
+}
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsMainMenuForm.cpp
+ * @brief Setting Main menu form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnSceneRegister.h"
+#include "PhnTypes.h"
+#include "PhnSettingsMainMenuForm.h"
+#include "PhnSettingsPresentationModel.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+
+static const wchar_t* IDL_SETTINGS_MAINMENU_FORM = L"IDL_SETTINGS_MAINMENU_FORM";
+static const wchar_t* IDC_MAIN_TABLE_ITEM_LABEL = L"IDC_MAIN_TABLE_ITEM_LABEL";
+
+SettingsMainMenuForm::SettingsMainMenuForm(void)
+{
+}
+
+SettingsMainMenuForm::~SettingsMainMenuForm(void)
+{
+}
+
+bool
+SettingsMainMenuForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_MAINMENU_FORM);
+ return true;
+}
+
+result
+SettingsMainMenuForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //initialize table view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsMainMenuForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SettingsMainMenuForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsMainMenuForm::OnFormBackRequested(Form& source)
+{
+ UiApp* pApp = UiApp::GetInstance();
+ AppAssert(pApp);
+ pApp->Terminate();
+}
+
+void
+SettingsMainMenuForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ pMainMenuTableView->RefreshAllItems();
+ //Commented for the bug# N_SE-53254
+ //pMainMenuTableView->ScrollToItem(0,0, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ }
+}
+
+void
+SettingsMainMenuForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+result
+SettingsMainMenuForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ //pMainMenuTableView->SetGroupedLookEnabled(true);
+ pMainMenuTableView->SetItemProvider(this);
+ r = pMainMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMainMenuTableView->UpdateTableView();
+ //disabling "call forwarding" option on emulator
+ pMainMenuTableView->SetItemEnabled(GROUP_MAIN_CALL_SETTINGS, MAINCALLSETTINGS_CALLFORWARDING, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_CALL_REJECTION, -1, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_REJECT_MSG, -1, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_CALL_ACCESSORY, -1, false);
+ pMainMenuTableView->SetItemEnabled(GROUP_MAIN_CALL_SETTINGS, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsMainMenuForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ if(groupIndex == GROUP_CALL_REJECTION)
+ {
+ //switch to call reject list form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTLIST_MENU), null);
+ }
+ else if(groupIndex == GROUP_REJECT_MSG)
+ {
+ //switch to reject msg list form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_REJECTMSGS_MENU), null);
+ }
+/* else if (groupIndex == GROUP_CALL_ANSWERING)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_ANSWER_OPTIONS), null);
+ }*/
+ else if (groupIndex == GROUP_CALL_ACCESSORY)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_ACCESSORY_OPTIONS), null);
+ }
+ else if(groupIndex == GROUP_MAIN_CALL_SETTINGS)
+ {
+ switch (itemIndex)
+ {
+ /*case MAINCALLSETTINGS_SPEEDDIAL:
+ {
+ //switch to speed dial form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_SPEED_DIAL), null);
+ }
+ break;*/
+
+ case MAINCALLSETTINGS_CALLFORWARDING:
+ {
+ //switch to form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALLTYPE_FORWARD), null);
+ }
+ break;
+
+ case MAINCALLSETTINGS_MORECALLSETTINGS:
+ {
+ //switch to speed dial form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MORE_OPTIONS), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+int
+SettingsMainMenuForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsMainMenuForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_CALL_REJECTION:
+ itemCount = CALLREJECTION_TOTALCOUNT;
+ break;
+
+ case GROUP_REJECT_MSG:
+ itemCount = REJECTMSG_TOTALCOUNT;
+ break;
+
+ /*case GROUP_CALL_ANSWERING:
+ itemCount = CALL_ANSWERING_TOTALCOUNT;
+ break;*/
+
+ case GROUP_CALL_ACCESSORY:
+ itemCount = CALL_ACCESSORY_TOTALCOUNT;
+ break;
+
+ case GROUP_MAIN_CALL_SETTINGS:
+ itemCount = MAINCALLSETTINGS_TOTALCOUNT;
+ break;
+
+ case GROUP_CALL_REJECTION_HLPTXT:
+ case GROUP_REJECT_MSG_HLPTXT:
+ //case GROUP_CALL_ANSWERING_HLPTXT:
+ case GROUP_CALL_ACCESSORY_HLPTXT:
+ itemCount = 0;
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsMainMenuForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ String helpText(L"");
+ switch (groupIndex)
+ {
+ case GROUP_CALL_REJECTION_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_REJECT_HLP_STRING));
+ }
+ break;
+
+ case GROUP_REJECT_MSG_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_REJECT_MSG_HLP_STRING));
+ }
+ break;
+
+ /*case GROUP_CALL_ANSWERING_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_ANSWER_MSG_HLP_STRING));
+ }*/
+ break;
+
+ case GROUP_CALL_ACCESSORY_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_ACCESSORY_MSG_HLP_STRING));
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ if (helpText.IsEmpty() == true)
+ {
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ }
+ else
+ {
+ //help text item rectangle
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, Y_LIST_MENU_HLPTXT_ITEM, (itemWidth - X_LIST_MENU_HLPTXT_ITEM),
+ (H_LIST_MENU_SINGLELINE_HLPTXT_ITEM - Y_LIST_MENU_HLPTXT_ITEM));
+ pItem->Construct(Dimension(itemWidth, H_LIST_MENU_SINGLELINE_HLPTXT_ITEM));
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(helpItemRect, helpText);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(FONT_SIZE_HELP_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);
+ pItem->AddControl(pItemLbl);
+ pItem->SetEnabled(false);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ }
+ return pItem;
+}
+
+bool
+SettingsMainMenuForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsMainMenuForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsMainMenuForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+
+ //text item rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+
+ String itemName(L"");
+ if(groupIndex == GROUP_CALL_REJECTION)
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_REJECT_STRING));
+ }
+ else if(groupIndex == GROUP_REJECT_MSG)
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_REJECT_MSG_STRING));
+ }
+ /*else if(groupIndex == GROUP_CALL_ANSWERING)
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_ANSWERING_STRING));
+ }*/
+ else if(groupIndex == GROUP_CALL_ACCESSORY)
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_ACCESSORY_STRING));
+ }
+ else if(groupIndex == GROUP_MAIN_CALL_SETTINGS)
+ {
+ switch (itemIndex)
+ {
+ /*case MAINCALLSETTINGS_SPEEDDIAL:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_SPEEDDIAL_STRING));
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;*/
+
+ case MAINCALLSETTINGS_CALLFORWARDING:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_FORWARDING_STRING));
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case MAINCALLSETTINGS_MORECALLSETTINGS:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_MORE_MAIN_STRING));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ //Item Name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetName(IDC_MAIN_TABLE_ITEM_LABEL);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//Normal Text Color
+ if(groupIndex == GROUP_MAIN_CALL_SETTINGS)
+ {
+ if(itemIndex == MAINCALLSETTINGS_CALLFORWARDING)
+ {
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);//Disabled Text Color for Call Forwarding
+ }
+ }
+ pItem->AddControl(pItemLbl);
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+bool
+SettingsMainMenuForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsMainMenuForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(IDC_MAIN_TABLE_ITEM_LABEL, true));
+ if (pItemLbl != null)
+ {
+ int itemWidth = pItem->GetWidth();
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ pItemLbl->SetBounds(itemNameRect);
+ }
+
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ if(groupIndex == GROUP_MAIN_CALL_SETTINGS)
+ {
+ switch (itemIndex)
+ {
+ /*case MAINCALLSETTINGS_SPEEDDIAL:
+ position = TABLEVIEWITEMPOS_TOP;
+ break;*/
+
+ case MAINCALLSETTINGS_CALLFORWARDING:
+ position = TABLEVIEWITEMPOS_TOP;
+ break;
+
+ case MAINCALLSETTINGS_MORECALLSETTINGS:
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ break;
+ }
+ }
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return;
+}
+
+int
+SettingsMainMenuForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsMainMenuForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsMainMenuForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ UpdateTableViewBounds(orientationStatus);
+}
+
+void
+SettingsMainMenuForm::UpdateTableViewBounds(OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ Rectangle tableBounds = GetClientAreaBounds();
+ tableBounds.x = 0;
+ tableBounds.y = 0;
+ pMainMenuTableView->SetBounds(tableBounds);
+ pMainMenuTableView->RefreshAllItems();
+ }
+ AppLog("EXIT");
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsManager.cpp
+ * @brief Setting Manager class
+ */
+#include <libintl.h>
+#include <FApp.h>
+#include <FSocial.h>
+#include <FBaseColIList.h>
+#include "vconf.h"
+#include "vconf-internal-ciss-keys.h"
+#include "PhnAppUtility.h"
+#include "PhnSettingsManager.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+
+#define REJECTMESSAGECOUNT 6
+
+SettingsManager* SettingsManager::__pInstance = null;
+
+SettingsManager::SettingsManager(void)
+ : __pTapiHandle(null)
+ , __pSettingsEventListener(null)
+ , __pCallSettingDataService(null)
+ ,__pMsgHandle(null)
+ ,__pNumberFilterIndex(null)
+{
+
+}
+
+SettingsManager::~SettingsManager(void)
+{
+ //De-initialize the TAPI Library
+ if(__pTapiHandle != null)
+ {
+ tel_deinit(__pTapiHandle);
+ }
+ if (__pCallSettingDataService)
+ {
+ __pCallSettingDataService->CloseDatabase();
+ delete __pCallSettingDataService;
+ }
+ if (__pSettingsEventListener != null)
+ {
+ delete __pSettingsEventListener;
+ }
+ if(__pNumberFilterIndex != null)
+ {
+ delete __pNumberFilterIndex;
+ __pNumberFilterIndex = null;
+ }
+ RemoveSystemEventListener();
+ CloseMsgHandleSession();
+}
+
+void SettingsManager::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) SettingsManager();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+ std::atexit(&(SettingsManager::DestroyInstance));
+}
+
+void SettingsManager::DestroyInstance(void)
+{
+ delete __pInstance;
+}
+
+result
+SettingsManager::Construct(void)
+{
+ __pCallSettingDataService = CallSettingDataService::CreateInstance();
+ result r = __pCallSettingDataService->OpenDatabase();
+ if(IsFailed(r))
+ {
+ return E_FAILURE;
+ }
+ //initialize telephony
+ __pTapiHandle = tel_init(null);
+ AddSystemEventListener();
+
+ if(__pNumberFilterIndex == null)
+ {
+ __pNumberFilterIndex = new (std::nothrow) ArrayListT< int>();
+ __pNumberFilterIndex->Construct();
+ }
+
+ return E_SUCCESS;
+}
+
+SettingsManager*
+SettingsManager::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+SettingsManager::AddSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ if (__pSettingsEventListener == null)
+ {
+ __pSettingsEventListener = new (std::nothrow) ArrayListT<ISettingsEventListener*>();
+ }
+
+ //Add to listeners, if not already in list.
+ if ( (pSettingsEventListener != null)
+ && !(__pSettingsEventListener->Contains(pSettingsEventListener)) )
+ {
+ __pSettingsEventListener->Add(pSettingsEventListener);
+ }
+}
+
+void
+SettingsManager::RemoveSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ if ((__pSettingsEventListener != null) && (pSettingsEventListener != null)
+ && __pSettingsEventListener->Contains(pSettingsEventListener))
+ {
+ __pSettingsEventListener->Remove(pSettingsEventListener);
+ }
+}
+
+void
+SettingsManager::NotifyForwardingEventListeners(ForwardResponseType responseType, bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLFORWARD_RESPONSE)
+ {
+ pListener->HandleSetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+ else
+ {
+ pListener->HandleGetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+ }
+ }
+}
+
+void
+SettingsManager::NotifyBarringEventListeners(BarringResponseType responseType, int result, CallBarringType callBarringType, bool isBarringActivated)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ unsigned long r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLBARRING_RESPONSE)
+ {
+ pListener->HandleSetCallBarringResponse(result, callBarringType, isBarringActivated);
+ }
+ else
+ {
+ pListener->HandleGetCallBarringResponse(result, callBarringType, isBarringActivated);
+ }
+ }
+ }
+}
+
+void
+SettingsManager::NotifyWaitingEventListeners(WaitingResponseType responseType, bool isCallSuccessful, bool isCallWaitingActivated)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLWAITING_RESPONSE)
+ {
+ pListener->HandleSetCallWaitingResponse(isCallSuccessful, isCallWaitingActivated);
+ }
+ else
+ {
+ pListener->HandleGetCallWaitingResponse(isCallSuccessful, isCallWaitingActivated);
+ }
+ }
+ delete pListenerEnum;
+ }
+}
+
+int
+SettingsManager::SetCallForwardStatus(const String& phoneNumber, CallForwardCondition callFwdCondition, bool activateFwding, int noReplyTime)
+{
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null, ERROR_TAPI_INIT_FAILED, "Telephony initialization failed");
+
+ TelSsForwardInfo_t forwardInfo;
+ memset(&forwardInfo, 0, sizeof(TelSsForwardInfo_t));
+ forwardInfo.Class = TAPI_SS_CLASS_VOICE;
+ if (activateFwding == true)
+ {
+ forwardInfo.Mode = TAPI_SS_CF_MODE_REGISTRATION_EV;
+ }
+ else
+ {
+ forwardInfo.Mode = TAPI_SS_CF_MODE_ERASURE_EV;
+ }
+ const wchar_t* pContact = phoneNumber.GetPointer();
+ int len = phoneNumber.GetLength()+1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+ strncpy(forwardInfo.szPhoneNumber, pNumber, len);
+ delete []pNumber;
+ pNumber = null;
+ switch (callFwdCondition)
+ {
+ case CALL_FORWARD_ALL:
+ {
+ forwardInfo.Condition = TAPI_SS_CF_WHEN_CFU;
+ }
+ break;
+
+ case CALL_FORWARD_BUSY:
+ {
+ forwardInfo.Condition = TAPI_SS_CF_WHEN_CFB;
+ }
+ break;
+
+ case CALL_FORWARD_NO_REPLY:
+ {
+ forwardInfo.Condition = TAPI_SS_CF_WHEN_CFNRy;
+ forwardInfo.NoReplyConditionTimer = TelSsNoReplyTime_t(noReplyTime);
+ }
+ break;
+
+ case CALL_FORWARD_NOT_REACHABLE:
+ {
+ forwardInfo.Condition = TAPI_SS_CF_WHEN_CFNRc;
+ }
+ break;
+
+ default:
+ {
+ return ERROR_INVALID_INPUT;
+ }
+ break;
+ }
+
+ int retStatus = tel_set_ss_forward(__pTapiHandle, &forwardInfo, &HandleSetForwardResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+ return errorCode;
+}
+
+void
+SettingsManager::HandleSetForwardResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ TelSsForwardResp_t* pResponse = (TelSsForwardResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ if (pResponse != null)
+ {
+ int count = pResponse->record_num;
+ for (int index = 0; index < count; index++)
+ {
+ CallForwardCondition callFwdCondition = CALL_FORWARD_ALL;
+ bool isActivated = false;
+ int noReplyWaitTime = 0;
+ //Check if status is "Active or Quiescent" and forwarding number is available
+ if ((pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE
+ || pResponse->record[index].Status == TAPI_SS_STATUS_QUIESCENT
+ || pResponse->record[index].Status == TAPI_SS_STATUS_REGISTERED)
+ && (pResponse->record[index].bCallForwardingNumberPresent != 0))
+ {
+ isActivated = true;
+ }
+ switch (pResponse->record[index].ForwardCondition)
+ {
+ case TAPI_SS_CF_WHEN_CFU:
+ {
+ callFwdCondition = CALL_FORWARD_ALL;
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFB:
+ {
+ callFwdCondition = CALL_FORWARD_BUSY;
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFNRy:
+ {
+ callFwdCondition = CALL_FORWARD_NO_REPLY;
+ //fetch WaitTime
+ noReplyWaitTime = (pResponse->record[index].NoReplyWaitTime);
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFNRc:
+ {
+ callFwdCondition = CALL_FORWARD_NOT_REACHABLE;
+ }
+ break;
+
+ default:
+ break;
+ }
+ //fetch forwarding number
+ char* pTmpNumberPtr = new (std::nothrow) char[TAPI_CALL_DIALDIGIT_LEN_MAX];
+ strncpy(pTmpNumberPtr, (char*) (pResponse->record[index].szCallForwardingNumber), TAPI_CALL_DIALDIGIT_LEN_MAX);
+ String callFwdNumber(pTmpNumberPtr);
+ delete []pTmpNumberPtr;
+ pTmpNumberPtr = null;
+
+ //notify event listeners
+ pSettingsManager->NotifyForwardingEventListeners(SET_CALLFORWARD_RESPONSE,(result == TAPI_SS_SUCCESS),callFwdCondition, callFwdNumber, isActivated, noReplyWaitTime);
+ }
+ }
+}
+
+int
+SettingsManager::GetCallForwardStatus(CallForwardCondition callFwdCondition)
+{
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null,ERROR_TAPI_INIT_FAILED,"Telephony initialization failed");
+
+ TelSsForwardWhen_t condition;
+ switch (callFwdCondition)
+ {
+ case CALL_FORWARD_ALL:
+ {
+ condition = TAPI_SS_CF_WHEN_CFU;
+ }
+ break;
+
+ case CALL_FORWARD_BUSY:
+ {
+ condition = TAPI_SS_CF_WHEN_CFB;
+ }
+ break;
+
+ case CALL_FORWARD_NO_REPLY:
+ {
+ condition = TAPI_SS_CF_WHEN_CFNRy;
+ }
+ break;
+
+ case CALL_FORWARD_NOT_REACHABLE:
+ {
+ condition = TAPI_SS_CF_WHEN_CFNRc;
+ }
+ break;
+
+ default:
+ {
+ return ERROR_INVALID_INPUT;
+ }
+ break;
+ }
+ int retStatus = tel_get_ss_forward_status(__pTapiHandle, TAPI_SS_CLASS_VOICE, condition, &HandleGetForwardResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+
+ return errorCode;
+}
+
+void
+SettingsManager::HandleGetForwardResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ TelSsForwardResp_t* pResponse = (TelSsForwardResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ if (pResponse != null)
+ {
+ int count = pResponse->record_num;
+ for (int index = 0; index < count; index++)
+ {
+ CallForwardCondition callFwdCondition = CALL_FORWARD_ALL;
+ bool isActivated = false;
+ int noReplyWaitTime = 0;
+ //Check if status is "ACTIVE or QUIESCENT or REGISTERED" and forwarding number is available
+ if ((pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE
+ || pResponse->record[index].Status == TAPI_SS_STATUS_QUIESCENT
+ || pResponse->record[index].Status == TAPI_SS_STATUS_REGISTERED)
+ && (pResponse->record[index].bCallForwardingNumberPresent != 0))
+ {
+ isActivated = true;
+ }
+ switch (pResponse->record[index].ForwardCondition)
+ {
+ case TAPI_SS_CF_WHEN_CFU:
+ {
+ callFwdCondition = CALL_FORWARD_ALL;
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFB:
+ {
+ callFwdCondition = CALL_FORWARD_BUSY;
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFNRy:
+ {
+ callFwdCondition = CALL_FORWARD_NO_REPLY;
+ noReplyWaitTime = (pResponse->record[index].NoReplyWaitTime);
+ }
+ break;
+
+ case TAPI_SS_CF_WHEN_CFNRc:
+ {
+ callFwdCondition = CALL_FORWARD_NOT_REACHABLE;
+ }
+ break;
+
+ default:
+ break;
+ }
+ char* pTmpNumberPtr = new (std::nothrow) char[TAPI_CALL_DIALDIGIT_LEN_MAX];
+ strncpy(pTmpNumberPtr, (char*) (pResponse->record[index].szCallForwardingNumber), TAPI_CALL_DIALDIGIT_LEN_MAX);
+ String callFwdNumber(pTmpNumberPtr);
+ //notify event listeners
+ pSettingsManager->NotifyForwardingEventListeners(GET_CALLFORWARD_RESPONSE, (result == TAPI_SS_SUCCESS), callFwdCondition, callFwdNumber, isActivated, noReplyWaitTime);
+ delete []pTmpNumberPtr;
+ pTmpNumberPtr = null;
+ }
+ }
+}
+
+int
+SettingsManager::SetCallBarringStatus(const String& password, CallBarringType callBarringType, bool activateBarring)
+{
+ AppLog("%d %d",callBarringType,activateBarring);
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null, ERROR_TAPI_INIT_FAILED, "Telephony initialization failed");
+
+ TelSsBarringInfo_t barringInfo;
+ memset(&barringInfo, 0, sizeof(TelSsBarringInfo_t));
+ barringInfo.Class = TAPI_SS_CLASS_VOICE;
+ if (activateBarring == true)
+ {
+ barringInfo.Mode = TAPI_SS_CB_MODE_ACTIVATE;
+ }
+ else
+ {
+ barringInfo.Mode = TAPI_SS_CB_MODE_DEACTIVATE;
+ }
+ const wchar_t* pContact = password.GetPointer();
+ int len = password.GetLength();
+ if (len > 4)
+ {
+ return ERROR_BARRING_PWD_TOO_LONG;
+ }
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+ strncpy(barringInfo.szPassword, pNumber, len);
+ delete []pNumber;
+ pNumber = null;
+ switch (callBarringType)
+ {
+ case CALL_BARRING_ALL_OUTGOING:
+ {
+ barringInfo.Type = TAPI_SS_CB_TYPE_BAOC;
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_OUTGOING:
+ {
+ barringInfo.Type = TAPI_SS_CB_TYPE_BOIC;
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ barringInfo.Type = TAPI_SS_CB_TYPE_BOIC_NOT_HC;
+ }
+ break;
+
+ case CALL_BARRING_ALL_INCOMING:
+ {
+ barringInfo.Type = TAPI_SS_CB_TYPE_BAIC;
+ }
+ break;
+
+ case CALL_BARRING_INCOMING_ROAMING:
+ {
+ barringInfo.Type = TAPI_SS_CB_TYPE_BIC_ROAM;
+ }
+ break;
+
+ default:
+ {
+ return ERROR_INVALID_INPUT;
+ }
+ break;
+ }
+ int retStatus = tel_set_ss_barring(__pTapiHandle, &barringInfo, &HandleSetBarringResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+
+ return errorCode;
+}
+
+void
+SettingsManager::HandleSetBarringResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ AppLogDebug("%d",result);
+ TelSsBarringResp_t* pResponse = (TelSsBarringResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ CallBarringType callBarringType = CALL_BARRING_ALL_OUTGOING;
+ bool isActivated = false;
+ if (pResponse != null)
+ {
+ int count = pResponse->record_num;
+ for (int index = 0; index < count; index++)
+ {
+ if (pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE)
+ {
+ isActivated = true;
+ }
+ switch (pResponse->record[index].Flavour)
+ {
+ case TAPI_SS_CB_TYPE_BAOC:
+ {
+ callBarringType = CALL_BARRING_ALL_OUTGOING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BOIC:
+ {
+ callBarringType = CALL_BARRING_INTERNATIONAL_OUTGOING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BOIC_NOT_HC:
+ {
+ callBarringType = CALL_BARRING_INTERNATIONAL_EXCEPT_HOME;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BAIC:
+ {
+ callBarringType = CALL_BARRING_ALL_INCOMING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BIC_ROAM:
+ {
+ callBarringType = CALL_BARRING_INCOMING_ROAMING;
+ }
+ break;
+
+ default:
+ break;
+ }
+ //notify event listeners
+ }
+ }
+ pSettingsManager->NotifyBarringEventListeners(SET_CALLBARRING_RESPONSE, result, callBarringType, isActivated);
+}
+
+int
+SettingsManager::GetCallBarringStatus(CallBarringType callBarringType)
+{
+ AppLogDebug("Enter");
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null, ERROR_TAPI_INIT_FAILED, "Telephony initialization failed");
+
+ TelSsBarringType_t barringType;
+ switch (callBarringType)
+ {
+ case CALL_BARRING_ALL_OUTGOING:
+ {
+ barringType = TAPI_SS_CB_TYPE_BAOC;
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_OUTGOING:
+ {
+ barringType = TAPI_SS_CB_TYPE_BOIC;
+ }
+ break;
+
+ case CALL_BARRING_INTERNATIONAL_EXCEPT_HOME:
+ {
+ barringType = TAPI_SS_CB_TYPE_BOIC_NOT_HC;
+ }
+ break;
+
+ case CALL_BARRING_ALL_INCOMING:
+ {
+ barringType = TAPI_SS_CB_TYPE_BAIC;
+ }
+ break;
+
+ case CALL_BARRING_INCOMING_ROAMING:
+ {
+ barringType = TAPI_SS_CB_TYPE_BIC_ROAM;
+ }
+ break;
+
+ default:
+ {
+ return ERROR_INVALID_INPUT;
+ }
+ break;
+ }
+ int retStatus = tel_get_ss_barring_status(__pTapiHandle, TAPI_SS_CLASS_VOICE, barringType, &HandleGetBarringResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+
+ return errorCode;
+}
+
+void
+SettingsManager::HandleGetBarringResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ TelSsBarringResp_t* pResponse = (TelSsBarringResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ if (pResponse != null)
+ {
+ CallBarringType callBarringType = CALL_BARRING_ALL_OUTGOING;
+ bool isActivated = false;
+ int count = pResponse->record_num;
+ for (int index = 0; index < count; index++)
+ {
+ if (pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE)
+ {
+ isActivated = true;
+ }
+ switch (pResponse->record[index].Flavour)
+ {
+ case TAPI_SS_CB_TYPE_BAOC:
+ {
+ callBarringType = CALL_BARRING_ALL_OUTGOING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BOIC:
+ {
+ callBarringType = CALL_BARRING_INTERNATIONAL_OUTGOING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BOIC_NOT_HC:
+ {
+ callBarringType = CALL_BARRING_INTERNATIONAL_EXCEPT_HOME;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BAIC:
+ {
+ callBarringType = CALL_BARRING_ALL_INCOMING;
+ }
+ break;
+
+ case TAPI_SS_CB_TYPE_BIC_ROAM:
+ {
+ callBarringType = CALL_BARRING_INCOMING_ROAMING;
+ }
+ break;
+
+ default:
+ break;
+ }
+ //notify event listeners
+ pSettingsManager->NotifyBarringEventListeners(GET_CALLBARRING_RESPONSE, result, callBarringType, isActivated);
+ }
+ }
+}
+
+int
+SettingsManager::SetCallWaitingStatus(bool activateWaiting)
+{
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null, ERROR_TAPI_INIT_FAILED,"Telephony initialization failed");
+
+ TelSsWaitingInfo_t waitingInfo;
+ memset(&waitingInfo, 0, sizeof(TelSsWaitingInfo_t));
+ waitingInfo.Class = TAPI_SS_CLASS_VOICE;
+ if (activateWaiting == true)
+ {
+ waitingInfo.Mode = TAPI_SS_CW_MODE_ACTIVATE;
+ }
+ else
+ {
+ waitingInfo.Mode = TAPI_SS_CW_MODE_DEACTIVATE;
+ }
+ int retStatus = tel_set_ss_waiting(__pTapiHandle, &waitingInfo, &HandleSetWaitingResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+
+ return errorCode;
+}
+
+void
+SettingsManager::HandleSetWaitingResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ TelSsWaitingResp_t* pResponse = (TelSsWaitingResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ bool isCallSuccessful = false;
+ if (result == TAPI_SS_SUCCESS)
+ {
+ isCallSuccessful = true;
+ }
+ if (pResponse != null)
+ {
+
+ int count = pResponse->record_num;
+ if (pSettingsManager->__pSettingsEventListener != null)
+ {
+ for (int index = 0; index < count; index++)
+ {
+ //notify event listeners
+ bool isCallWaitingEnabled = (pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE);
+ pSettingsManager->NotifyWaitingEventListeners(SET_CALLWAITING_RESPONSE, isCallSuccessful, isCallWaitingEnabled);
+ }
+ }
+ }
+}
+
+int
+SettingsManager::GetCallWaitingStatus(void)
+{
+ int errorCode = ERROR_NONE;
+ TryReturn(__pTapiHandle != null, ERROR_TAPI_INIT_FAILED,"Telephony initialization failed");
+
+ int retStatus = tel_get_ss_waiting_status(__pTapiHandle, TAPI_SS_CLASS_VOICE, &HandleGetWaitingResponse, this);
+ if (retStatus != TAPI_API_SUCCESS)
+ {
+ errorCode = ERROR_TAPI_ERROR;
+ }
+
+ return errorCode;
+}
+
+void
+SettingsManager::HandleGetWaitingResponse(TapiHandle* pHandle, int result, void* pData, void* pUserData)
+{
+ TelSsWaitingResp_t* pResponse = (TelSsWaitingResp_t*) pData;
+ SettingsManager* pSettingsManager = (SettingsManager*) pUserData;
+ if (pResponse != null)
+ {
+ bool isCallSuccessful = false;
+ if (result == TAPI_SS_SUCCESS)
+ {
+ isCallSuccessful = true;
+ }
+ int count = pResponse->record_num;
+ if (pSettingsManager->__pSettingsEventListener != null)
+ {
+ for (int index = 0; index < count; index++)
+ {
+ //notify event listeners
+ bool isCallWaitingEnabled = (pResponse->record[index].Status == TAPI_SS_STATUS_ACTIVE);
+ pSettingsManager->NotifyWaitingEventListeners(GET_CALLWAITING_RESPONSE, isCallSuccessful, isCallWaitingEnabled);
+ }
+ }
+ }
+}
+
+void
+SettingsManager::SetRejectMessageListCount(void)
+{
+ int retval = vconf_set_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, REJECTMESSAGECOUNT);
+ if(retval == -1)
+ {
+ AppLogDebug("vconf_set_int() returned error");
+ }
+}
+
+IMapT<int,String>*
+SettingsManager::GetRejectMessageListN(void)
+{
+ int messagesCount;
+ char* pMessage = null;
+ HashMapT<int, String> *pMessageMap = null;
+
+ int retval = vconf_get_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, &messagesCount);
+ if (retval == 0 && messagesCount > 0)
+ {
+ pMessageMap = new (std::nothrow) HashMapT<int, String>();
+ pMessageMap->Construct(messagesCount);
+ for (int index = 0; index < messagesCount; index++)
+ {
+ int keyForMsg = index;
+ pMessage = null;
+ switch (index)
+ {
+ case 0:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG1_STR);
+ }
+ break;
+
+ case 1:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG2_STR);
+ }
+ break;
+
+ case 2:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG3_STR);
+ }
+ break;
+
+ case 3:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG4_STR);
+ }
+ break;
+
+ case 4:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG5_STR);
+ }
+ break;
+
+ case 5:
+ {
+ pMessage = vconf_get_str( VCONFKEY_CISSAPPL_USER_CREATE_MSG6_STR);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Chk if this is allowed outside the call settings library
+ if ((pMessage != null) && (String(pMessage).IsEmpty() == false))
+ {
+ bindtextdomain("ug-setting-call-efl", "/usr/ug/res/locale");
+ String *pMessageStr = new (std::nothrow) String();
+ pMessageStr->Append(dgettext("ug-setting-call-efl", pMessage));
+ pMessageMap->Add(keyForMsg, *pMessageStr);
+ }
+ else if((pMessage != null) && (String(pMessage).IsEmpty() == true))
+ {
+ String *pMessageStr = new (std::nothrow) String();
+ pMessageStr->Append(pMessage);
+ pMessageMap->Add(keyForMsg, *pMessageStr);
+ }
+ }
+ }
+ return pMessageMap;
+}
+
+result
+SettingsManager::SetRejectMessage(int messageIndex, const String& rejectMessage)
+{
+ result r = E_FAILURE;
+ //convert to char*
+ const wchar_t* pRejectMessage = rejectMessage.GetPointer();
+ int len = (rejectMessage.GetLength()*sizeof(wchar_t));
+ char* pMessageToBeSet = new (std::nothrow) char[len + 1];
+ memset(pMessageToBeSet, 0, (len + 1) * sizeof(char));
+ wcstombs(pMessageToBeSet, pRejectMessage, len);
+ //save to vconf
+ int retval = -1;
+
+ switch (messageIndex)
+ {
+ case 0:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG1_STR, pMessageToBeSet);
+ }
+ break;
+
+ case 1:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG2_STR, pMessageToBeSet);
+ }
+ break;
+
+ case 2:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG3_STR, pMessageToBeSet);
+ }
+ break;
+
+ case 3:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG4_STR, pMessageToBeSet);
+ }
+ break;
+
+ case 4:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG5_STR, pMessageToBeSet);
+ }
+ break;
+
+ case 5:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG6_STR, pMessageToBeSet);
+ }
+ break;
+
+ default:
+ break;
+ }
+ delete []pMessageToBeSet;
+ pMessageToBeSet = null;
+
+ if (retval == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::RemoveRejectMessage(const IListT<int>& deleteKeyList)
+{
+ result r = E_FAILURE;
+ int retval = -1;
+ int newMsgCount = 0;
+ //Fetch old message count
+ int oldMsgCount = 0;
+ vconf_get_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, &oldMsgCount);
+ //fetch old messages
+ IMapT<int,String> *pRejectMsgMap = GetRejectMessageListN();
+ if(pRejectMsgMap != null)
+ {
+ //Second, delete messages to be deleted from fetched old Message map
+ for (int index = 0; index < deleteKeyList.GetCount(); index++)
+ {
+ int keyForMsg = -1;
+ if (deleteKeyList.GetAt(index, keyForMsg) == E_SUCCESS)
+ {
+ pRejectMsgMap->Remove(keyForMsg);
+ switch (keyForMsg)
+ {
+ case 0:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG1_STR,"");
+ break;
+
+ case 1:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG2_STR,"");
+ break;
+
+ case 2:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG3_STR,"");
+ break;
+
+ case 3:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG4_STR,"");
+ break;
+
+ case 4:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG5_STR,"");
+ break;
+
+ case 5:
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG6_STR,"");
+ break;
+ }
+
+ }
+ }
+ delete pRejectMsgMap;
+
+ }
+
+ //todo: retVal from vconf_unset is always -1. to be checked
+ if (retval == 0)
+ {
+ r = E_SUCCESS;
+ }
+
+ return r;
+}
+
+IList*
+SettingsManager::GetPrefixDialListN(void)
+{
+ int phoneNumberCount;
+ char* pPhoneNumber = null;
+ ArrayList* pPhoneNumberList = null;
+
+ int retval = vconf_get_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_INT, &phoneNumberCount);
+ if (retval == 0)
+ {
+ pPhoneNumberList = new (std::nothrow) ArrayList();
+ for (int index = 0; index < phoneNumberCount; index++)
+ {
+ String* phoneNumberStr = new (std::nothrow) String();
+ switch (index)
+ {
+ case 0:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM1_STR);
+ }
+ break;
+
+ case 1:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM2_STR);
+ }
+ break;
+
+ case 2:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM3_STR);
+ }
+ break;
+
+ case 3:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM4_STR);
+ }
+ break;
+
+ case 4:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM5_STR);
+ }
+ break;
+
+ default:
+ {
+ delete pPhoneNumberList;
+ pPhoneNumberList = null;
+ return null;
+ }
+ break;
+ }
+ phoneNumberStr->Append(pPhoneNumber);
+ pPhoneNumberList->Add(*phoneNumberStr);
+ }
+ }
+ else
+ {
+ return null;
+ }
+ return pPhoneNumberList;
+}
+
+result
+SettingsManager::SetPrefixDialNumber(int phoneNumberIndex, const String& phoneNumber)
+{
+ result r = E_FAILURE;
+ int phoneNumberCount = 0;
+
+ int retval = -1;
+ const wchar_t* pRejectMessage = phoneNumber.GetPointer();
+ int len = phoneNumber.GetLength();
+ char* pTmpPhonePtr = new (std::nothrow) char[len + 1];
+ memset(pTmpPhonePtr, 0, (len + 1) * sizeof(char));
+ wcstombs(pTmpPhonePtr, pRejectMessage, len);
+ char* pNumberToBeSet = new (std::nothrow) char[len + 1];
+ memset(pNumberToBeSet, 0, (len + 1) * sizeof(char));
+ strncpy(pNumberToBeSet, pTmpPhonePtr, len);
+ delete []pTmpPhonePtr;
+ pTmpPhonePtr = null;
+ vconf_get_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_INT, &phoneNumberCount);
+ switch (phoneNumberIndex)
+ {
+ case 0:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM1_STR, pNumberToBeSet);
+ }
+ break;
+
+ case 1:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM2_STR, pNumberToBeSet);
+ }
+ break;
+
+ case 2:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM3_STR, pNumberToBeSet);
+ }
+ break;
+
+ case 3:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM4_STR, pNumberToBeSet);
+ }
+ break;
+
+ case 4:
+ {
+ retval = vconf_set_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM5_STR, pNumberToBeSet);
+ }
+ break;
+
+ default:
+ {
+ delete []pNumberToBeSet;
+ pNumberToBeSet = null;
+ return r;
+ }
+ break;
+ }
+
+ delete []pNumberToBeSet;
+ pNumberToBeSet = null;
+
+ if (retval == 0)
+ {
+ if (phoneNumberCount < 5)
+ {
+ phoneNumberCount++;
+ }
+ vconf_set_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_INT, phoneNumberCount);
+ r = E_SUCCESS;
+ }
+
+ return r;
+}
+
+result
+SettingsManager::GetPrefixDialNumberAtIndex(int phoneNumberIndex, String& phoneNumber)
+{
+ result r = E_FAILURE;
+
+ int phoneNumberCount = 0;
+ vconf_get_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_INT, &phoneNumberCount);
+
+ //check valid index
+ if(phoneNumberCount > 0 && phoneNumberIndex < phoneNumberCount)
+ {
+ char* pPhoneNumber = null;
+ switch (phoneNumberIndex)
+ {
+ case 0:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM1_STR);
+ }
+ break;
+
+ case 1:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM2_STR);
+ }
+ break;
+
+ case 2:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM3_STR);
+ }
+ break;
+
+ case 3:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM4_STR);
+ }
+ break;
+
+ case 4:
+ {
+ pPhoneNumber = vconf_get_str(VCONFKEY_CISSAPPL_PREFIX_DIAL_NUM5_STR);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if(pPhoneNumber != null)
+ {
+ r = phoneNumber.Append(pPhoneNumber);
+ }
+ }
+ return r;
+}
+
+result
+SettingsManager::SetPrefixDialingStatus(bool enablePrefixDialing)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_PREFIX_DIAL_BOOL, enablePrefixDialing);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::SetActivePrefixDialingValue(int prefixDialIndex)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_VALUE_INT, prefixDialIndex);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::GetActivePrefixDialingValue(int& prefixDialIndex)
+{
+ result r = E_FAILURE;
+ int indexPos = -1;
+ int retVal = vconf_get_int(VCONFKEY_CISSAPPL_PREFIX_DIAL_VALUE_INT, &indexPos);
+ if (retVal == 0)
+ {
+ prefixDialIndex = indexPos;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::GetPrefixDialingStatus(void)
+{
+ int isPrefixDialingEnabled = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_PREFIX_DIAL_BOOL, &isPrefixDialingEnabled);
+
+ bool retVal = isPrefixDialingEnabled;
+ return retVal;
+}
+
+result
+SettingsManager::SetVideoCallImagePath(const String& imagePath)
+{
+ result r = E_FAILURE;
+ const wchar_t* pRejectMessage = imagePath.GetPointer();
+ int len = imagePath.GetLength();
+ char* pTmpPath = new (std::nothrow) char[len + 1];
+ memset(pTmpPath, 0, (len + 1) * sizeof(char));
+ wcstombs(pTmpPath, pRejectMessage, len);
+ char* pPathToBeSet = new (std::nothrow) char[len + 1];
+ memset(pPathToBeSet, 0, (len + 1) * sizeof(char));
+ strncpy(pPathToBeSet, pTmpPath, len);
+ int retVal = vconf_set_str(VCONFKEY_CISSAPPL_VIDEO_IMAGE_PATH_STR, pPathToBeSet);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ delete []pTmpPath;
+ pTmpPath = null;
+ delete []pPathToBeSet;
+ pPathToBeSet = null;
+ return r;
+}
+
+result
+SettingsManager::GetVideoCallImagePath(String& imagePath)
+{
+ result r = E_FAILURE;
+ char* pVideoImagePath = null;
+ pVideoImagePath = vconf_get_str(VCONFKEY_CISSAPPL_VIDEO_IMAGE_PATH_STR);
+ if (pVideoImagePath != null)
+ {
+ imagePath.Clear();
+ imagePath.Append(pVideoImagePath);
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::SetCallLineIdentity(CallLineIdentity identity)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_int(VCONFKEY_CISSAPPL_SHOW_MY_NUMBER_INT, identity);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::GetCallLineIdentity(CallLineIdentity& identity)
+{
+ result r = E_FAILURE;
+ int lineIdentity = -1;
+ int retVal = vconf_get_int(VCONFKEY_CISSAPPL_SHOW_MY_NUMBER_INT, &lineIdentity);
+ if (retVal == 0)
+ {
+ identity = (CallLineIdentity) lineIdentity;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::AddToCallRejectList(const String& phoneNumber, CallRejectMatchCondition rejectCondition, bool isActivated)
+{
+ //construct CallRejectInfo.
+ CallRejectInfo rejInfo;
+ rejInfo.phoneNumber = phoneNumber;
+ rejInfo.rejectCondition = rejectCondition;
+ rejInfo.isActivated = isActivated;
+
+ //Fetch call reject list
+ IListT<CallRejectInfo>* pRejNumbersList = GetCallRejectList();
+ //Check if this is not already present in database.
+ bool isDuplicate = false;
+ if (pRejNumbersList != null)
+ {
+ IEnumeratorT<CallRejectInfo>* pRejectEnum = pRejNumbersList->GetEnumeratorN();
+ if (pRejectEnum != null)
+ {
+ while (pRejectEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo fetchedInfo;
+ if (( pRejectEnum->GetCurrent(fetchedInfo) == E_SUCCESS) && (fetchedInfo == rejInfo))
+ {
+ isDuplicate = true;
+ }
+ }
+ delete pRejectEnum;
+ }
+ delete pRejNumbersList;
+ }
+
+ result r = E_OBJ_ALREADY_EXIST;
+ if (isDuplicate == false)
+ {
+ r = __pCallSettingDataService->AddCallRejectInfoToDatabase(&rejInfo);
+ }
+ return r;
+}
+
+IListT<CallRejectInfo>*
+SettingsManager::GetCallRejectList(void)
+{
+ int rejectCount = 0;
+ __pCallSettingDataService->GetCallRejectCount(rejectCount);
+
+ if (rejectCount > 0)
+ {
+ ArrayListT<CallRejectInfo>* pCallRejectList = new (std::nothrow) ArrayListT<CallRejectInfo>();
+ pCallRejectList->Construct(rejectCount);
+ __pCallSettingDataService->GetAllCallRejectInfoFromDatabaseN(*pCallRejectList);
+ return pCallRejectList;
+ }
+ return null;
+}
+
+result
+SettingsManager::UpdateCallRejectRow(int rowId, const String& phoneNumber, bool activate, CallRejectMatchCondition rejectCondition)
+{
+ result r = E_FAILURE;
+ CallRejectInfo* rejInfo = new (std::nothrow) CallRejectInfo();
+ rejInfo->rowId = rowId;
+ rejInfo->phoneNumber.Append(phoneNumber);
+ rejInfo->rejectCondition = rejectCondition;
+ rejInfo->isActivated = activate;
+ r = __pCallSettingDataService->UpdateCallRejectInfoDatabase(rowId,rejInfo);
+ delete rejInfo;
+ return r;
+}
+
+result
+SettingsManager::RemoveCallRejectRow(int rowId)
+{
+ return __pCallSettingDataService->DeleteCallRejectInfoFromDatabase(rowId);
+}
+
+result
+SettingsManager::SetUnknownRejectStatus(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_AUTO_REJECT_UNKNOWN_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::IsCallToBeRejected(String& phoneNumber)
+{
+ return __pCallSettingDataService->IsCallToBeRejected(phoneNumber);
+}
+
+bool
+SettingsManager::GetUnknownRejectStatus(void)
+{
+ int unknownRejectStatus = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_AUTO_REJECT_UNKNOWN_BOOL, &unknownRejectStatus);
+
+ bool retVal = unknownRejectStatus;
+ return retVal;
+}
+
+result
+SettingsManager::SetCallAlertStatus(CallAlertStatus callAlertStatus)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_int(VCONFKEY_CISSAPPL_ALERT_ON_CALL_INT, callAlertStatus);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::GetCallAlertStatus(CallAlertStatus& callAlertStatus)
+{
+ result r = E_FAILURE;
+ int alertStatus = -1;
+ int retVal = vconf_get_int(VCONFKEY_CISSAPPL_ALERT_ON_CALL_INT, &alertStatus);
+ if (retVal == 0)
+ {
+ callAlertStatus = (CallAlertStatus) alertStatus;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::SetCallConnectToneStatus(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::GetCallConnectToneStatus(void)
+{
+ int unknownRejectStatus = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &unknownRejectStatus);
+
+ bool retVal = unknownRejectStatus;
+ return retVal;
+}
+
+result
+SettingsManager::SetMinuteMinderToneStatus(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::GetMinuteMinderToneStatus(void)
+{
+ int unknownRejectStatus = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
+
+ bool retVal = unknownRejectStatus;
+ return retVal;
+}
+
+result
+SettingsManager::SetCallEndToneStatus(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_CALL_END_TONE_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::GetCallEndToneStatus(void)
+{
+ int unknownRejectStatus = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_CALL_END_TONE_BOOL, &unknownRejectStatus);
+
+ bool retVal = unknownRejectStatus;
+ return retVal;
+}
+
+result
+SettingsManager::SetSpeedDialMapping(const String& contactId, int numberToMap)
+{
+ result r = E_FAILURE;
+ SpeedDialInfo mappingInfo;;
+ mappingInfo.keyMapping = numberToMap;
+ mappingInfo.contactId = contactId;
+ r = __pCallSettingDataService->AddSpeedDialInfoToDatabase(&mappingInfo);
+ return r;
+}
+
+IMapT<int,SpeedDialInfo>*
+SettingsManager::GetSpeedDialMappingN(void)
+{
+ return (__pCallSettingDataService->GetAllSpeedDialInfoMapFromDatabaseN());
+}
+
+result
+SettingsManager::RemoveSpeedDialMapping(int rowId)
+{
+ return __pCallSettingDataService->DeleteSpeedDialInfoFromDatabase(rowId);
+}
+
+result
+SettingsManager::UpdateSpeedDialMapping(int rowId, const String& contactId, int numberToMap)
+{
+ result r = E_FAILURE;
+ SpeedDialInfo* mappingInfo = new (std::nothrow) SpeedDialInfo();
+ mappingInfo->rowId = rowId;
+ mappingInfo->contactId.Append(contactId);
+ mappingInfo->keyMapping = numberToMap;
+ r = __pCallSettingDataService->UpdateSpeedDialInfoDatabase(rowId,mappingInfo);
+ delete mappingInfo;
+ return r;
+}
+
+String*
+SettingsManager::GetMappedSpeedDialNumberN(int aIndex)
+{
+ String* contactNumber = null;
+
+ //Fetch contactId for mapped speed dial
+ String* contactId = __pCallSettingDataService->GetSpeedDialContactN(aIndex);
+ if(contactId != null && contactId->IsEmpty() == false)
+ {
+ RecordId recordId = INVALID_RECORD_ID;
+ Integer::Parse(*contactId, recordId);
+ //check if recordId is correct
+ if (recordId != Tizen::Social::INVALID_RECORD_ID)
+ {
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if (pAddressbook != null)
+ {
+ Contact* pMappedContact = pAddressbook->GetContactN(recordId);
+ if (pMappedContact != null)
+ {
+ IList* pPhoneNumberList = pMappedContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ PhoneNumber* pPhoneNumber = static_cast<PhoneNumber*>(pPhoneNumberList->GetAt(0));
+ if(pPhoneNumber != null)
+ {
+ contactNumber = new (std::nothrow) String(pPhoneNumber->GetPhoneNumber());
+ }
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ delete pMappedContact;
+ }
+ delete pAddressbook;
+ }
+ }
+ }
+ delete contactId;
+ contactId = null;
+ return contactNumber;
+}
+
+Contact*
+SettingsManager::FetchContactDetailsN(const String& contactId)
+{
+ Contact* pFetchedContact = null;
+
+ RecordId recordId = INVALID_RECORD_ID;
+ Integer::Parse(contactId, recordId);
+ //check if recordId is correct
+ if (recordId != Tizen::Social::INVALID_RECORD_ID)
+ {
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ Addressbook* pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if (pAddressbook != null)
+ {
+ pFetchedContact = pAddressbook->GetContactN(recordId);
+ delete pAddressbook;
+ }
+ }
+ return pFetchedContact;
+}
+
+result
+SettingsManager::SetCallState(CallState callState)
+{
+ AppLogDebug("Enter %d",callState);
+ result r = E_FAILURE;
+ int retVal = vconf_set_int(VCONFKEY_CALL_STATE, callState);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::GetCallState(CallState& callState)
+{
+ AppLogDebug("Enter %d",callState);
+ int Status = 0;
+ result r = E_FAILURE;
+ int retVal = vconf_get_int(VCONFKEY_CALL_STATE, &Status);
+ if (retVal == 0)
+ {
+ callState = (CallState) Status;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+result
+SettingsManager::EnableCallAnsweringKey(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::IsCallAnsweringKeyEnabled(void)
+{
+ int isAcceptCallByHomeKeyEnabled = -1;
+ //read vconf settings
+ vconf_get_bool(VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, &isAcceptCallByHomeKeyEnabled);
+ return (bool)isAcceptCallByHomeKeyEnabled;
+}
+
+result
+SettingsManager::EnableCallEndingKey(bool activate)
+{
+ result r = E_FAILURE;
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, activate);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::IsCallEndingKeyEnabled(void)
+{
+ int isEndCallByPowerKeyEnabled = -1;
+ //read vconf settings
+ vconf_get_bool(VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, &isEndCallByPowerKeyEnabled);
+ return (bool)isEndCallByPowerKeyEnabled;
+}
+
+result
+SettingsManager::EnableOutgoingCallWhenLocked(bool activate)
+{
+ result r = E_FAILURE;
+
+ int enableOutgoingCall = 1;
+ if (activate == true)
+ {
+ //0 : Even when device locked
+ //1 : Only when device unlocked
+ enableOutgoingCall = 0;
+ }
+ int retVal = vconf_set_bool(VCONFKEY_CISSAPPL_OUTGOING_CALL_CONDITIONS_INT, enableOutgoingCall);
+ if (retVal == 0)
+ {
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+bool
+SettingsManager::IsOutgoingCallEnabledWhenLocked(void)
+{
+ //read vconf settings
+ int isOutgoingCallPossibleWhenLocked = -1;
+ vconf_get_bool(VCONFKEY_CISSAPPL_OUTGOING_CALL_CONDITIONS_INT, &isOutgoingCallPossibleWhenLocked);
+ if (isOutgoingCallPossibleWhenLocked == 0)
+ {
+ //0 : Even when device locked
+ return true;
+ }
+ //1 : Only when device unlocked
+ return false;
+}
+
+void
+SettingsManager::AddSystemEventListener(void)
+{
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+}
+
+void
+SettingsManager::RemoveSystemEventListener(void)
+{
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+}
+
+void
+SettingsManager::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLogDebug("Enter");
+ //Flight mode changed
+ if(key.Equals(String(SETTINGS_FLIGHT_MODE_STR)))
+ {
+ bool flightMode = false;
+ SettingInfo::GetValue(key, flightMode);
+ if(flightMode == true)
+ {
+ // Notify if some active call is going on
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ pListener->HandleFlightMode(true);
+
+ }
+ }
+
+ }
+ }
+}
+
+bool
+SettingsManager::GetFlightModeStatus(void)
+{
+ result r = E_SUCCESS;
+
+ String key(SETTINGS_FLIGHT_MODE_STR);
+ bool flightMode = false;
+
+ r = SettingInfo::GetValue(key, flightMode);
+ TryCatch(r == E_SUCCESS, , "GetFlightModeStatus: To get a value is failed");
+
+ return flightMode;
+
+ CATCH:
+ return flightMode;
+}
+
+result
+SettingsManager::AddToMessageRejectList(const String& phoneNumber, _MSG_FILTER_TYPE_E matchType) //result SettingPresentationModel::AddToFilter(const String& strFilter, int matchType)
+{
+
+ AppLogDebug("ENTER");
+
+ msg_error_t err = MSG_SUCCESS;
+ result r = E_SUCCESS;
+ msg_struct_t pFilter = msg_create_struct(MSG_STRUCT_FILTER);
+ // Set filter type
+ switch (matchType)
+ {
+ case MSG_FILTER_BY_WORD:
+ case MSG_FILTER_BY_ADDRESS_SAME:
+ case MSG_FILTER_BY_ADDRESS_START:
+ case MSG_FILTER_BY_ADDRESS_INCLUDE:
+ {
+ err = msg_set_int_value(pFilter, MSG_FILTER_TYPE_INT, matchType);
+ }
+ break;
+ }
+ if (err != MSG_SUCCESS)
+ {
+ r = E_FAILURE;
+ msg_release_struct(&pFilter);
+ AppLogDebug("EXIT: r = %S", GetErrorMessage(r));
+ return r;
+ }
+ // Set filter string.
+ char* pfilterString = AppUtility::ConvertStringToPointerCharArrayN(phoneNumber);
+ err = msg_set_str_value(pFilter, MSG_FILTER_VALUE_STR, pfilterString, (int) strlen(pfilterString));
+ if (err != MSG_SUCCESS)
+ {
+ result r = E_FAILURE;
+ AppLogDebug("EXIT: r = %s", GetErrorMessage(r));
+ delete[] pfilterString;
+ msg_release_struct(&pFilter);
+ return r;
+ }
+
+ r = OpenMsgHandleSession();
+ if(r == E_FAILURE)
+ {
+ AppLogDebug("Open messageing session failed!");
+ return r;
+ }
+
+ err = msg_add_filter(__pMsgHandle, (const msg_struct_t) pFilter);
+ if (err != MSG_SUCCESS)
+ {
+ delete[] pfilterString;
+ r = E_FAILURE;
+ msg_release_struct(&pFilter);
+ AppLogDebug("EXIT: r = %s", GetErrorMessage(r));
+ return r;
+ }
+ delete[] pfilterString;
+
+ msg_release_struct(&pFilter);
+ CloseMsgHandleSession();
+ AppLogDebug("EXIT: r = %s", GetErrorMessage(r));
+ return r;
+}
+
+bool
+SettingsManager::GetMsgFilterListIndex(const String& phoneNumber)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("phoneNumber=%ls", phoneNumber.GetPointer());
+ bool ret_value = false;
+
+ msg_error_t r = msg_open_msg_handle(&__pMsgHandle);
+ if (r != MSG_SUCCESS)
+ {
+ AppLogDebug("msg_open_msg_handle err = %d", (int) r);
+ return false;
+ }
+ __pFilterList = new (std::nothrow) msg_struct_list_s();
+ __pFilterList->msg_struct_info = null;
+ __pFilterList->nCount = 0;
+ msg_get_filter_list(__pMsgHandle, __pFilterList);
+
+ if(__pFilterList->nCount == 0)
+ {
+ AppLogDebug("Filter list is empty!");
+ delete __pFilterList;
+ __pFilterList = null;
+ return false;
+ }
+ AppLog("Total Filters = %d", __pFilterList->nCount);
+ if(__pNumberFilterIndex == null)
+ {
+ __pNumberFilterIndex = new (std::nothrow) ArrayListT< int>();
+ __pNumberFilterIndex->Construct();
+ }
+ __pNumberFilterIndex->RemoveAll();
+
+
+ // Filter out index based on filter typed.
+ for (int index = 0; index < __pFilterList->nCount; index++)
+ {
+ int filterType(-1);
+ msg_get_int_value(__pFilterList->msg_struct_info[index], MSG_FILTER_TYPE_INT, &filterType);
+ if (filterType == MSG_FILTER_BY_ADDRESS_SAME)
+ {
+ __pNumberFilterIndex->Add(index);
+ }
+ }
+ int count = __pNumberFilterIndex->GetCount();
+ for (int filterIndex = 0; filterIndex < count; filterIndex++)
+ {
+ String *fltText = GetFilterText(filterIndex, MSG_FILTER_BY_ADDRESS_SAME);
+ AppLogDebug("Filter Text=%ls", fltText->GetPointer());
+ if (phoneNumber.CompareTo(*fltText) == 0)
+ {
+ ret_value = true;
+ delete fltText;
+ fltText = null;
+ break;
+ }
+ delete fltText;
+ }
+
+ msg_release_list_struct(__pFilterList);
+ delete __pFilterList;
+ __pFilterList = null;
+ __pNumberFilterIndex->RemoveAll();
+ CloseMsgHandleSession();
+
+ AppLogDebug("EXIT: r = %s", GetErrorMessage(GetLastResult()));
+
+ return ret_value;
+}
+
+String*
+SettingsManager::GetFilterText(int index, int type)
+{
+ AppLogDebug("ENTER");
+
+ result res = E_SUCCESS;
+ msg_error_t err = MSG_SUCCESS;
+ char filterText[MAX_FILTER_VALUE_LEN] = {0};
+ // Get filter ID
+ int filterIndex(-1);
+ if (type == MSG_FILTER_BY_ADDRESS_SAME)
+ {
+ __pNumberFilterIndex->GetAt(index, filterIndex);
+ }
+ AppLogDebug("filterIndex=%d", filterIndex);
+ err = msg_get_str_value(__pFilterList->msg_struct_info[filterIndex], MSG_FILTER_VALUE_STR, filterText, sizeof(filterText));
+ if (err != MSG_SUCCESS)
+ {
+ AppLogDebug("Filter text fetching err = %d", (int) err);
+ res = E_FAILURE;
+ }
+
+ AppLogDebug("EXIT: r = %s", GetErrorMessage(res));
+ return new String(filterText);
+ //return filterText;
+}
+
+result
+SettingsManager::OpenMsgHandleSession()
+{
+ AppLogDebug("ENTER");
+
+ result r = E_SUCCESS;
+ msg_error_t err = MSG_SUCCESS;
+ // Open session with message service.
+ err = msg_open_msg_handle(&__pMsgHandle);
+ if (err != MSG_SUCCESS)
+ {
+ AppLogDebug("msg_open_msg_handle err = %d", (int) err);
+ result r = E_FAILURE;
+ return r;
+ }
+ // On filter operation if it is disabled
+ bool filterFlag(false);
+ err = msg_get_filter_operation(__pMsgHandle, &filterFlag);
+ AppLogDebug("msg_get_filter_operation err = %d", (int) err);
+ if (!filterFlag)
+ {
+ err = msg_set_filter_operation(__pMsgHandle, true);
+ AppLogDebug("msg_set_filter_operation err = %d", (int) err);
+ }
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+SettingsManager::CloseMsgHandleSession()
+{
+ if (__pMsgHandle != null)
+ {
+ // Close open handle with message service
+ msg_close_msg_handle(&__pMsgHandle);
+ }
+}
+
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsMoreOptionsForm.cpp
+ * @brief Setting More option form
+ */
+#include <FApp.h>
+#include "PhnSettingsMoreOptionsForm.h"
+#include "PhnTypes.h"
+#include "PhnAppUtility.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+
+static const wchar_t* IDL_SETTINGS_MOREOPTIONS_FORM = L"IDL_SETTINGS_MOREOPTIONS_FORM";
+static const wchar_t* IDC_TABLE_ITEM_MAIN_TXT = L"IDC_TABLE_ITEM_MAIN_TXT";
+static const wchar_t* IDC_TABLE_GROUP_LBL = L"IDC_TABLE_GROUP_LBL";
+
+SettingsMoreOptionsForm::SettingsMoreOptionsForm(void)
+ : __pSettingsPresentor(null)
+ , __isCallerIdExpanded(false)
+ , __isCallAlertExpanded(false)
+ , __autoAreaCode(L"")
+{
+}
+
+SettingsMoreOptionsForm::~SettingsMoreOptionsForm(void)
+{
+}
+
+bool
+SettingsMoreOptionsForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_MOREOPTIONS_FORM);
+ return true;
+}
+
+result
+SettingsMoreOptionsForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //Initialize list view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+result
+SettingsMoreOptionsForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsMoreOptionsForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ default:
+ break;
+ }
+}
+
+void
+SettingsMoreOptionsForm::OnFormBackRequested(Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ GroupedTableView* pMoreOptionsTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMoreOptionsTableView->IsGroupExpanded(GROUP_CALLERID_OPTIONS))
+ {
+ pMoreOptionsTableView->CollapseGroup(GROUP_CALLERID_OPTIONS);
+ __isCallerIdExpanded = false;
+ }
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY
+ ), null);
+}
+
+void
+SettingsMoreOptionsForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ __autoAreaCode.Clear();
+ GroupedTableView* pMoreOptionsTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if(__pSettingsPresentor != null && pMoreOptionsTableView != null)
+ {
+ pMoreOptionsTableView->RefreshAllItems();
+ //Commented for the bug# N_SE-53254
+ //pMoreOptionsTableView->ScrollToItem(0,0, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
+ //collapse groups and reset flags
+ if (pMoreOptionsTableView->IsGroupExpanded(GROUP_CALLERID_OPTIONS))
+ {
+ pMoreOptionsTableView->CollapseGroup(GROUP_CALLERID_OPTIONS);
+ }
+ //pMoreOptionsTableView->CollapseGroup(GROUP_CALL_ALERT_OPTIONS);
+ __isCallerIdExpanded = false;
+ __isCallAlertExpanded = false;
+ //set status for 'GROUP_CALLERID_OPTIONS'
+ CallLineIdentity lineIdentity;
+ __pSettingsPresentor->GetCallLineIdentity(lineIdentity);
+ pMoreOptionsTableView->SetItemChecked(GROUP_CALLERID_OPTIONS, (GroupCallerIdOptionsItems) lineIdentity, true);
+ pMoreOptionsTableView->RefreshItem(GROUP_CALLERID, CALLERID_CALLER_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ //set status for 'GROUP_CALL_ALERT_OPTIONS'
+ CallAlertStatus alertStatus;
+ __pSettingsPresentor->GetCallAlertStatus(alertStatus);
+ //pMoreOptionsTableView->SetItemChecked(GROUP_CALL_ALERT_OPTIONS, (GroupCallAlertOptionsItems) alertStatus, true);
+ //pMoreOptionsTableView->RefreshItem(GROUP_CALL_ALERT, CALLALERT_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ //update auto area code status
+ result r = __pSettingsPresentor->GetActivePrefixDialNumber(__autoAreaCode);
+ if (r == E_SUCCESS)
+ {
+ pMoreOptionsTableView->RefreshItem(GROUP_AREACODE, AREACODE_AUTO_AREA_CODE, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ }
+}
+
+void
+SettingsMoreOptionsForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+result
+SettingsMoreOptionsForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pMoreOptionsTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMoreOptionsTableView != null)
+ {
+ //pMoreOptionsTableView->SetGroupedLookEnabled(true);
+ pMoreOptionsTableView->SetItemProvider(this);
+ r = pMoreOptionsTableView->AddGroupedTableViewItemEventListener(*this);
+ pMoreOptionsTableView->UpdateTableView();
+ pMoreOptionsTableView->SetItemEnabled(GROUP_CALLERID, -1, false);
+ pMoreOptionsTableView->SetItemEnabled(GROUP_CALLERID_OPTIONS, -1, false);
+ pMoreOptionsTableView->SetItemEnabled(GROUP_CALL_SETTINGS, -1, false);
+ pMoreOptionsTableView->SetItemEnabled(GROUP_CALL_REMINDER, -1, false);
+ pMoreOptionsTableView->SetItemEnabled(GROUP_AREACODE, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsMoreOptionsForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ switch (groupIndex)
+ {
+ case GROUP_CALLERID:
+ {
+ if (tableView.IsGroupExpanded(GROUP_CALLERID_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_CALLERID_OPTIONS);
+ __isCallerIdExpanded = false;
+ }
+ else
+ {
+ tableView.ExpandGroup(GROUP_CALLERID_OPTIONS);
+ __isCallerIdExpanded = true;
+ }
+ //Change icon
+ tableView.RefreshItem(GROUP_CALLERID, CALLERID_CALLER_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;
+
+ case GROUP_CALLERID_OPTIONS:
+ {
+ /* if (tableView.IsGroupExpanded(GROUP_CALLERID_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_CALLERID_OPTIONS);
+ __isCallerIdExpanded = false;
+ }*/
+ HandleSelectedCallerIdOptions(tableView, itemIndex, status);
+ }
+ break;
+
+ /*case GROUP_CALL_ALERT:
+ {
+ if (tableView.IsGroupExpanded(GROUP_CALL_ALERT_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_CALL_ALERT_OPTIONS);
+ __isCallAlertExpanded = false;
+ }
+ else
+ {
+ tableView.ExpandGroup(GROUP_CALL_ALERT_OPTIONS);
+ __isCallAlertExpanded = true;
+ }
+ //Change icon
+ tableView.RefreshItem(GROUP_CALL_ALERT, CALLALERT_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ break;*/
+
+ /*case GROUP_CALL_ALERT_OPTIONS:
+ {
+ HandleSelectedCallAlertOptions(tableView, itemIndex, status);
+ }
+ break;*/
+
+ case GROUP_CALL_SETTINGS:
+ case GROUP_CALL_REMINDER:
+ case GROUP_AREACODE:
+ {
+ if (tableView.IsGroupExpanded(GROUP_CALLERID_OPTIONS))
+ {
+ tableView.CollapseGroup(GROUP_CALLERID_OPTIONS);
+ __isCallerIdExpanded = false;
+ }
+ HandleSelectedSettings(groupIndex, itemIndex);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+int
+SettingsMoreOptionsForm::GetGroupCount(void)
+{
+ return GROUP_TOTALCOUNT;
+}
+
+int
+SettingsMoreOptionsForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ switch (groupIndex)
+ {
+ case GROUP_CALLERID:
+ {
+ itemCount = CALLERID_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALLERID_OPTIONS:
+ {
+ itemCount = CALLEROPTIONS_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_SETTINGS:
+ {
+ itemCount = CALLSETTINGS_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_REMINDER:
+ {
+ itemCount = CALLREMINDER_TOTALCOUNT;
+ }
+ break;
+
+/* case GROUP_CALL_ALERT:
+ {
+ itemCount = CALLALERT_TOTALCOUNT;
+ }
+ break;*/
+
+ /*case GROUP_CALL_ALERT_OPTIONS:
+ {
+ itemCount = CALLALERT_OPTIONS_TOTALCOUNT;
+ }
+ break;*/
+
+ case GROUP_AREACODE:
+ {
+ itemCount = AREACODE_TOTALCOUNT;
+ }
+ break;
+
+ case GROUP_CALL_SETTINGS_HLPTXT:
+ case GROUP_CALL_REMINDER_HLPTXT:
+ case GROUP_AREACODE_HLPTXT:
+ {
+ itemCount = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsMoreOptionsForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ String helpText(L"");
+ switch (groupIndex)
+ {
+ case GROUP_CALL_SETTINGS_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_WAITING_HLP_STRING));
+ }
+ break;
+
+ case GROUP_CALL_REMINDER_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_STATUS_TONES_HLP_STRING));
+ }
+ break;
+
+ case GROUP_AREACODE_HLPTXT:
+ {
+ helpText.Append(AppUtility::GetResourceString(IDS_SETTING_AUTO_AREACODE_HLP_STRING));
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ if (helpText.IsEmpty() == true)
+ {
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ }
+ else
+ {
+ pItem->Construct(Dimension(itemWidth, H_LIST_MENU_SINGLELINE_HLPTXT_ITEM));
+ //help text item rectangle
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, Y_LIST_MENU_HLPTXT_ITEM,
+ (itemWidth - X_LIST_MENU_HLPTXT_ITEM), (H_LIST_MENU_SINGLELINE_HLPTXT_ITEM - Y_LIST_MENU_HLPTXT_ITEM));
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(helpItemRect, helpText);
+ pItemLbl->SetName(IDC_TABLE_GROUP_LBL);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(FONT_SIZE_HELP_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_HELP_TXT);
+ pItem->AddControl(pItemLbl);
+ pItem->SetEnabled(false);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+ pItem->SetBackgroundColor(COLOR_HELP_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+ }
+
+ return pItem;
+}
+
+bool
+SettingsMoreOptionsForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsMoreOptionsForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ if (groupIndex == GROUP_AREACODE_HLPTXT)
+ {
+ //help text item rectangle
+ int itemWidth = pItem->GetWidth();
+ Rectangle helpItemRect(X_LIST_MENU_HLPTXT_ITEM, Y_LIST_MENU_HLPTXT_ITEM,
+ (itemWidth - X_LIST_MENU_HLPTXT_ITEM), (H_LIST_MENU_SINGLELINE_HLPTXT_ITEM - Y_LIST_MENU_HLPTXT_ITEM));
+ Label* pGrpItemLbl = static_cast<Label*>(pItem->GetControl(IDC_TABLE_GROUP_LBL, true));
+ pGrpItemLbl->SetBounds(helpItemRect);
+ }
+ return;
+}
+
+TableViewItem*
+SettingsMoreOptionsForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ TableViewItem* pItem = null;
+
+ switch (groupIndex)
+ {
+ case GROUP_CALLERID:
+ //case GROUP_CALL_ALERT:
+ {
+ pItem = CreateExpandableItem(groupIndex, itemIndex, itemWidth);
+ }
+ break;
+
+ case GROUP_CALLERID_OPTIONS:
+ {
+ pItem = CreateCallerIdOptionsItem(itemIndex, itemWidth);
+ }
+ break;
+
+ /*case GROUP_CALL_ALERT_OPTIONS:
+ {
+ pItem = CreateCallerAlertOptionsItem(itemIndex, itemWidth);
+
+ }
+ break;*/
+
+ case GROUP_CALL_SETTINGS:
+ case GROUP_CALL_REMINDER:
+ case GROUP_AREACODE:
+ {
+ pItem = CreateSettingMenuItem(groupIndex, itemIndex, itemWidth);
+ }
+ break;
+
+ default:
+ break;
+ }
+ return pItem;
+}
+
+bool
+SettingsMoreOptionsForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsMoreOptionsForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ AppLog("%d %d %d",itemRectSize, mainItemTextSize, subItemTextSize);
+ int itemWidth = pItem->GetWidth();
+ if(groupIndex == GROUP_CALLERID /*|| groupIndex == GROUP_CALL_ALERT*/)
+ {
+ //main text label
+ Label* pMainTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_TABLE_ITEM_MAIN_TXT, true));
+ if (pMainTxtLbl != null)
+ {
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ mainItemTextSize);
+ pMainTxtLbl->SetBounds(mainItemRect);
+ }
+
+ String subText(L"");
+ bool isExpanded = false;
+ switch (groupIndex)
+ {
+ case GROUP_CALLERID:
+ {
+ subText.Append(FetchSubTextForSelectedCallerId());
+ isExpanded = __isCallerIdExpanded;
+ }
+ break;
+
+ /* case GROUP_CALL_ALERT:
+ {
+ subText.Append(FetchSubTextForSelectedCallerAlert());
+ isExpanded = __isCallAlertExpanded;
+ }
+ break;*/
+ }
+ //sub text item
+ Label* pSubTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_SELECTEDOPTION_SUBTEXT_LABEL, true));
+ if (pSubTxtLbl != null)
+ {
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, mainItemTextSize,
+ (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON), subItemTextSize);
+ pSubTxtLbl->SetBounds(subItemRect);
+ pSubTxtLbl->SetText(subText);
+ pSubTxtLbl->Invalidate(true);
+ }
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, isExpanded);
+ //set background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_TOP;
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+ else if (groupIndex == GROUP_CALLERID_OPTIONS /*|| groupIndex == GROUP_CALL_ALERT_OPTIONS*/)
+ {
+ //NOTE:- Do Not set label bound for drop-down items as it overlaps with radio button,
+ //on changing orientation in expanded mode.
+ //set background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ switch (itemIndex)
+ {
+ case CALLEROPTIONS_BY_NETWORK:
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case CALLEROPTIONS_SHOW:
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLEROPTIONS_HIDE:
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+ default:
+ break;
+ }
+
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+ else if (groupIndex == GROUP_CALL_SETTINGS || groupIndex == GROUP_CALL_REMINDER)
+ {
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(IDC_TABLE_ITEM_MAIN_TXT, true));
+ if (pItemLbl != null)
+ {
+ pItemLbl->SetBounds(itemNameRect);
+ }
+ //set background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ if(groupIndex == GROUP_CALL_SETTINGS)
+ {
+ switch (itemIndex)
+ {
+ case CALLSETTINGS_CALL_BARRING:
+ position = TABLEVIEWITEMPOS_CENTER;
+ break;
+ case CALLSETTINGS_CALL_WAITING:
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ break;
+ }
+ }
+ else
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+ else if (groupIndex == GROUP_AREACODE)
+ {
+ //main text item
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM ), mainItemTextSize);
+ Label* pMainItemLbl = static_cast<Label*>(pItem->GetControl(IDC_TABLE_ITEM_MAIN_TXT, true));
+ if (pMainItemLbl != null)
+ {
+ pMainItemLbl->SetBounds(itemNameRect);
+ }
+
+ //sub text item
+ String subText(L"");
+ if(__autoAreaCode.IsEmpty() == true)
+ {
+ subText.Append(AppUtility::GetResourceString(IDS_AREA_CODE_OFF_STR));
+ }
+ else
+ {
+ subText.Append(__autoAreaCode);
+ }
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, mainItemTextSize,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), subItemTextSize);
+ Label* pSubTxtLbl = static_cast<Label*>(pItem->GetControl(IDC_SELECTEDOPTION_SUBTEXT_LABEL, true));
+ if (pSubTxtLbl != null)
+ {
+ pSubTxtLbl->SetBounds(subItemRect);
+ pSubTxtLbl->SetText(subText);
+ pSubTxtLbl->Invalidate(true);
+ }
+ //set background bitmap
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+ pItem->Invalidate(true);
+}
+
+int
+SettingsMoreOptionsForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsMoreOptionsForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+TableViewItem*
+SettingsMoreOptionsForm::CreateExpandableItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ String mainText(L"");
+ String subText(L"");
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ AppLog("%d %d %d",itemRectSize, mainItemTextSize, subItemTextSize);
+
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_TOP;
+ bool isExpanded = false;
+ switch (groupIndex)
+ {
+ case GROUP_CALLERID:
+ {
+ mainText.Append(AppUtility::GetResourceString(IDS_SETTING_CALLERID_MAIN_STR));
+ subText.Append(FetchSubTextForSelectedCallerId());
+ isExpanded = __isCallerIdExpanded;
+ }
+ break;
+
+ /*case GROUP_CALL_ALERT:
+ {
+ mainText.Append(AppUtility::GetResourceString(IDS_SETTING_CALL_ALERT_MAIN_STR));
+ subText.Append(FetchSubTextForSelectedCallerAlert());
+ isExpanded = __isCallAlertExpanded;
+ }
+ break;*/
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, itemRectSize), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //main text item
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON),
+ mainItemTextSize);
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pMainTxtLbl = new (std::nothrow) Label();
+ pMainTxtLbl->Construct(mainItemRect, mainText);
+ pMainTxtLbl->SetName(IDC_TABLE_ITEM_MAIN_TXT);
+ pMainTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMainTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pMainTxtLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pMainTxtLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);
+ pItem->AddControl(*pMainTxtLbl);
+
+ //sub text item
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, mainItemTextSize,
+ (itemWidth - (2 * X_LIST_MENU_TEXT_ITEM) - W_EXPAND_ICON), subItemTextSize);
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetName(IDC_SELECTEDOPTION_SUBTEXT_LABEL);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ pItem->AddControl(*pSubTxtLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ //set Drop-down icon to item
+ AppUtility::SetExpandIconToTableItem(pItem, isExpanded);
+ return pItem;
+}
+
+String
+SettingsMoreOptionsForm::FetchSubTextForSelectedCallerId()
+{
+ //default text
+ String subText(L"");
+ CallLineIdentity lineIdentity;
+ __pSettingsPresentor->GetCallLineIdentity(lineIdentity);
+ //Fetch text for selected item
+ GroupCallerIdOptionsItems selectedIndex = (GroupCallerIdOptionsItems)lineIdentity;
+ switch(selectedIndex)
+ {
+ case CALLEROPTIONS_BY_NETWORK:
+ subText.Append(AppUtility::GetResourceString(IDS_CALLERID_BYNETWORK_STRING));
+ break;
+
+ case CALLEROPTIONS_SHOW:
+ subText.Append(AppUtility::GetResourceString(IDS_CALLERID_SHOW_STRING));
+ break;
+
+ case CALLEROPTIONS_HIDE:
+ subText.Append(AppUtility::GetResourceString(IDS_CALLERID_HIDE_STRING));
+ break;
+
+ default:
+ break;
+ }
+ return subText;
+}
+
+String
+SettingsMoreOptionsForm::FetchSubTextForSelectedCallerAlert()
+{
+ //default text
+ String subText(L"");
+ CallAlertStatus alertStatus;
+ __pSettingsPresentor->GetCallAlertStatus(alertStatus);
+ //Fetch text for selected item
+ GroupCallAlertOptionsItems selectedIndex = (GroupCallAlertOptionsItems) alertStatus;
+ switch(selectedIndex)
+ {
+ case CALLALERT_OPTIONS_OFF:
+ subText.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_OFF_STRING));
+ break;
+
+ case CALLALERT_OPTIONS_SOUND:
+ subText.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_SOUND_STRING));
+ break;
+
+ case CALLALERT_OPTIONS_VIBRATION:
+ subText.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_VIBRATE_STRING));
+ break;
+
+ default:
+ break;
+ }
+ return subText;
+}
+
+TableViewItem*
+SettingsMoreOptionsForm::CreateCallerIdOptionsItem(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ TableViewItemPos position = TABLEVIEWITEMPOS_CENTER;
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+ pItem->SetBackgroundColor(COLOR_SECONDDEPTH_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ switch (itemIndex)
+ {
+ case CALLEROPTIONS_BY_NETWORK:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_CALLERID_BYNETWORK_STRING));
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ break;
+
+ case CALLEROPTIONS_SHOW:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_CALLERID_SHOW_STRING));
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLEROPTIONS_HIDE:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_CALLERID_HIDE_STRING));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+ default:
+ break;
+ }
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetName(IDC_TABLE_ITEM_MAIN_TXT);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(*pItemLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+TableViewItem*
+SettingsMoreOptionsForm::CreateCallerAlertOptionsItem(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_RADIO);
+ pItem->SetBackgroundColor(COLOR_SECONDDEPTH_ITEM_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ //text item rectangle
+ Rectangle itemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ //Option item name
+ String itemName(L"");
+ switch (itemIndex)
+ {
+ case CALLALERT_OPTIONS_OFF:
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_OFF_STRING));
+ break;
+
+ case CALLALERT_OPTIONS_SOUND:
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_SOUND_STRING));
+ break;
+
+ case CALLALERT_OPTIONS_VIBRATION:
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_CALLALERT_VIBRATE_STRING));
+ break;
+ }
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemRect, itemName);
+ pItemLbl->SetName(IDC_TABLE_ITEM_MAIN_TXT);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(*pItemLbl);
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, TABLEVIEWITEMPOS_CENTER);
+ return pItem;
+}
+
+TableViewItem*
+SettingsMoreOptionsForm::CreateSettingMenuItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ AppLog("%d %d %d",itemRectSize, mainItemTextSize, subItemTextSize);
+ //text item rectangle
+ Rectangle itemNameRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_NORMAL_MENU_ITEM);
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ if(groupIndex == GROUP_AREACODE)
+ {
+ pItem->Construct(Dimension(itemWidth, itemRectSize), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ }
+ else
+ {
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM ), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ }
+
+ String itemName(L"");
+ String subText(L"");
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ if(groupIndex == GROUP_CALL_SETTINGS)
+ {
+ switch (itemIndex)
+ {
+ case CALLSETTINGS_CALL_BARRING:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_BARRING_STRING));
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ break;
+
+ case CALLSETTINGS_CALL_WAITING:
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_WAITING_STRING));
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else if(groupIndex == GROUP_CALL_REMINDER)
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_STATUS_TONES_STRING));
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ else if(groupIndex == GROUP_AREACODE)
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ itemName.Append(AppUtility::GetResourceString(IDS_SETTING_AUTO_AREACODE_STRING));
+ if(__autoAreaCode.IsEmpty() == true)
+ {
+ subText.Append(AppUtility::GetResourceString(IDS_AREA_CODE_OFF_STR));
+ }
+ else
+ {
+ subText.Append(__autoAreaCode);
+ }
+ //update itemName rectangle
+ itemNameRect.y = 0;
+ itemNameRect.height = mainItemTextSize;
+ //itemNameRect.width = (itemWidth - X_LIST_MENU_TEXT_ITEM );
+ }
+
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemNameRect, itemName);
+ pItemLbl->SetName(IDC_TABLE_ITEM_MAIN_TXT);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_MAIN_TXT);//COLOR_PRESS_MAIN_TXT
+ pItem->AddControl(pItemLbl);
+ pItem->SetBackgroundColor(COLOR_LIST_MENU_ITEM, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
+
+ if(subText.IsEmpty() == false)
+ {
+ //sub text item
+ Rectangle subItemRect(X_LIST_MENU_TEXT_ITEM, mainItemTextSize,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), subItemTextSize);
+ Label* pSubTxtLbl = new (std::nothrow) Label();
+ pSubTxtLbl->Construct(subItemRect, subText);
+ pSubTxtLbl->SetName(IDC_SELECTEDOPTION_SUBTEXT_LABEL);
+ pSubTxtLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pSubTxtLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pSubTxtLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pSubTxtLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ pItem->AddControl(pSubTxtLbl);
+ }
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+void
+SettingsMoreOptionsForm::HandleSelectedCallerIdOptions(GroupedTableView& tableView, int itemIndex, TableViewItemStatus state)
+{
+ //check if already checked item is selected
+ if(state == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ tableView.SetItemChecked(GROUP_CALLERID_OPTIONS, itemIndex, true);
+ return;
+ }
+ //uncheck previous selection
+ CallLineIdentity oldLineIdentity;
+ __pSettingsPresentor->GetCallLineIdentity(oldLineIdentity);
+ tableView.SetItemChecked(GROUP_CALLERID_OPTIONS, oldLineIdentity, false);
+ tableView.RefreshItem(GROUP_CALLERID_OPTIONS, oldLineIdentity, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ //send information to network / save data for checked item index.
+ CallLineIdentity updateLineIndentity = (CallLineIdentity)itemIndex;
+ __pSettingsPresentor->SetCallLineIdentity(updateLineIndentity);
+ //update status for group
+ tableView.RefreshItem(GROUP_CALLERID, CALLERID_CALLER_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+}
+
+void
+SettingsMoreOptionsForm::HandleSelectedCallAlertOptions(GroupedTableView& tableView, int itemIndex, TableViewItemStatus state)
+{
+ //check if already checked item is selected
+/* if(state == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ tableView.SetItemChecked(GROUP_CALL_ALERT_OPTIONS, itemIndex, true);
+ return;
+ }
+ //uncheck previous selection
+ CallAlertStatus oldAlertStatus;
+ __pSettingsPresentor->GetCallAlertStatus(oldAlertStatus);
+ tableView.SetItemChecked(GROUP_CALL_ALERT_OPTIONS, oldAlertStatus, false);
+ tableView.RefreshItem(GROUP_CALL_ALERT_OPTIONS, oldAlertStatus, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+ //send information to network / save data for checked item index.
+ CallAlertStatus updateAlertStatus = (CallAlertStatus)itemIndex;
+ __pSettingsPresentor->SetCallAlertStatus(updateAlertStatus);
+ //update status for group
+ tableView.RefreshItem(GROUP_CALL_ALERT, CALLALERT_SETTING, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);*/
+}
+
+void
+SettingsMoreOptionsForm::HandleSelectedSettings(int groupIndex, int itemIndex)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (groupIndex)
+ {
+ case GROUP_CALL_SETTINGS:
+ {
+ if(itemIndex == CALLSETTINGS_CALL_BARRING)
+ {
+ //switch to form - CALLSETTINGS_CALL_BARRING
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALLTYPE_BARRING), null);
+ }
+ else
+ {
+ //switch to form - CALLSETTINGS_CALL_WAITING
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_WAITING_OPTIONS), null);
+ }
+ }
+ break;
+
+ case GROUP_CALL_REMINDER:
+ {
+ //switch to form - CALLREMINDER_STATUS_TONES
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CALL_STATUSTONES), null);
+ }
+ break;
+
+ case GROUP_AREACODE:
+ {
+ //switch to form - AREACODE_AUTO_AREA_CODE
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_AUTO_AREA_CODE), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsMoreOptionsForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ UpdateTableViewBounds(orientationStatus);
+}
+
+void
+SettingsMoreOptionsForm::UpdateTableViewBounds(OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMoreOptionsTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMoreOptionsTableView != null)
+ {
+ Rectangle tableBounds = GetClientAreaBounds();
+ tableBounds.x = 0;
+ tableBounds.y = 0;
+ pMoreOptionsTableView->SetBounds(tableBounds);
+ pMoreOptionsTableView->RefreshAllItems();
+ }
+ AppLog("EXIT");
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsPresentationModel.cpp
+ * @brief Setting Presentation model
+ */
+#include "PhnTypes.h"
+#include "PhnSettingsManager.h"
+#include "PhnSettingsPresentationModel.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Social;
+
+SettingsPresentationModel* SettingsPresentationModel::__pInstance = null;
+
+SettingsPresentationModel::SettingsPresentationModel()
+{
+ __pSettingsMgr = null;
+ __pSettingsEventListener = null;
+}
+
+SettingsPresentationModel::~SettingsPresentationModel()
+{
+}
+
+void
+SettingsPresentationModel::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) SettingsPresentationModel();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+ atexit(&(SettingsPresentationModel::DestroyInstance));
+}
+
+SettingsPresentationModel*
+SettingsPresentationModel::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+SettingsPresentationModel::DestroyInstance(void)
+{
+ if (__pInstance->__pSettingsMgr != null)
+ {
+ __pInstance->__pSettingsMgr->RemoveSettingEventListener(__pInstance);
+ __pInstance->__pSettingsMgr = null;
+ }
+ delete __pInstance;
+}
+
+result
+SettingsPresentationModel::Construct(void)
+{
+ //Construct Settings Manager
+ __pSettingsMgr = SettingsManager::GetInstance();
+ if(__pSettingsMgr != null)
+ {
+ __pSettingsMgr->AddSettingEventListener(this);
+ }
+ return E_SUCCESS;
+}
+
+result
+SettingsPresentationModel::AddSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ result r = E_FAILURE;
+ if (__pSettingsEventListener == null && pSettingsEventListener != null)
+ {
+ __pSettingsEventListener = pSettingsEventListener;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+void
+SettingsPresentationModel::RemoveSettingEventListener(void)
+{
+ __pSettingsEventListener = null;
+}
+
+void
+SettingsPresentationModel::SetRejectMessageListCount(void)
+{
+ __pSettingsMgr->SetRejectMessageListCount();
+}
+
+IMapT<int,String>*
+SettingsPresentationModel::GetRejectMessageListN(void)
+{
+ return __pSettingsMgr->GetRejectMessageListN();
+}
+
+result
+SettingsPresentationModel::AddToCallRejectList(const String& phoneNumber, CallRejectMatchCondition rejectCondition,bool isActivated)
+{
+ return __pSettingsMgr->AddToCallRejectList(phoneNumber, rejectCondition, isActivated);
+}
+
+result
+SettingsPresentationModel::AddToMessageRejectList(const String& phoneNumber, _MSG_FILTER_TYPE_E matchType)
+{
+ return __pSettingsMgr->AddToMessageRejectList(phoneNumber, matchType);
+}
+
+bool
+SettingsPresentationModel::GetMsgFilterListIndex(const String& phoneNumber)
+{
+ return __pSettingsMgr->GetMsgFilterListIndex(phoneNumber);
+}
+
+IListT<CallRejectInfo>*
+SettingsPresentationModel::GetCallRejectList(void)
+{
+ return __pSettingsMgr->GetCallRejectList();
+}
+
+result
+SettingsPresentationModel::SetPrefixDialNumber(int phoneNumberIndex, const String& phoneNumber)
+{
+ return __pSettingsMgr->SetPrefixDialNumber(phoneNumberIndex, phoneNumber);
+}
+
+result
+SettingsPresentationModel::SetActivePrefixDialingValue(int prefixDialIndex)
+{
+ return __pSettingsMgr->SetActivePrefixDialingValue(prefixDialIndex);
+}
+
+result
+SettingsPresentationModel::SetPrefixDialingStatus(bool enablePrefixDialing)
+{
+ return __pSettingsMgr->SetPrefixDialingStatus(enablePrefixDialing);
+}
+
+result
+SettingsPresentationModel::GetActivePrefixDialNumber(Tizen::Base::String& phoneNumber)
+{
+ result r = E_FAILURE;
+ if(__pSettingsMgr->GetPrefixDialingStatus() == true)
+ {
+ int activePrefixIndex = -1;
+ //fetch active prefix index
+ r = __pSettingsMgr->GetActivePrefixDialingValue(activePrefixIndex);
+ TryReturn(r == E_SUCCESS, r, "Error while fetching Active Prefix Dialing Index");
+
+ //fetch phone number mapped to fetched index
+ r = __pSettingsMgr->GetPrefixDialNumberAtIndex(activePrefixIndex, phoneNumber);
+ }
+ return r;
+}
+
+int
+SettingsPresentationModel::SetCallBarringStatus(const String& password, CallBarringType callBarringType, bool activateBarring)
+{
+ return __pSettingsMgr->SetCallBarringStatus(password, callBarringType, activateBarring);
+}
+
+int
+SettingsPresentationModel::GetCallForwardStatus(CallForwardCondition callFwdCondition)
+{
+ return __pSettingsMgr->GetCallForwardStatus(callFwdCondition);
+}
+
+int
+SettingsPresentationModel::SetCallForwardStatus(const String& phoneNumber, CallForwardCondition callFwdCondition, bool activateFwding, int noReplyTime)
+{
+ return __pSettingsMgr->SetCallForwardStatus(phoneNumber, callFwdCondition, activateFwding, noReplyTime);
+}
+
+int
+SettingsPresentationModel::GetCallBarringStatus(CallBarringType callBarringType)
+{
+ return __pSettingsMgr->GetCallBarringStatus(callBarringType);
+}
+
+int
+SettingsPresentationModel::SetCallWaitingStatus(bool activateWaiting)
+{
+ return __pSettingsMgr->SetCallWaitingStatus(activateWaiting);
+}
+
+int
+SettingsPresentationModel::GetCallWaitingStatus(void)
+{
+ return __pSettingsMgr->GetCallWaitingStatus();
+}
+
+result
+SettingsPresentationModel::SetCallConnectToneStatus(bool activate)
+{
+ return __pSettingsMgr->SetCallConnectToneStatus(activate);
+}
+bool
+SettingsPresentationModel::GetCallConnectToneStatus(void)
+{
+ return __pSettingsMgr->GetCallConnectToneStatus();
+}
+
+result
+SettingsPresentationModel::SetMinuteMinderToneStatus(bool activate)
+{
+ return __pSettingsMgr->SetMinuteMinderToneStatus(activate);
+}
+
+bool
+SettingsPresentationModel::GetMinuteMinderToneStatus(void)
+{
+ return __pSettingsMgr->GetMinuteMinderToneStatus();
+}
+
+result
+SettingsPresentationModel::SetCallEndToneStatus(bool activate)
+{
+ return __pSettingsMgr->SetCallEndToneStatus(activate);
+}
+
+bool
+SettingsPresentationModel::GetCallEndToneStatus(void)
+{
+ return __pSettingsMgr->GetCallEndToneStatus();
+}
+
+result
+SettingsPresentationModel::UpdateCallRejectRow(int rowId, const String& phoneNumber, bool activate, CallRejectMatchCondition rejectCondition)
+{
+ return __pSettingsMgr->UpdateCallRejectRow(rowId, phoneNumber, activate, rejectCondition);
+}
+
+result
+SettingsPresentationModel::RemoveCallRejectRow(int rowId)
+{
+ return __pSettingsMgr->RemoveCallRejectRow(rowId);
+}
+
+result
+SettingsPresentationModel::SetRejectMessage(int messageIndex, const String& rejectMessage)
+{
+ result r = E_SUCCESS;
+
+ //check if this is duplicate string
+ IMapT<int, String>* pRejectMsgMap = GetRejectMessageListN();
+ if (pRejectMsgMap != null)
+ {
+ IMapEnumeratorT<int, String>* pMsgEnum = pRejectMsgMap->GetMapEnumeratorN();
+ if (pMsgEnum != null)
+ {
+ while (pMsgEnum->MoveNext() == E_SUCCESS)
+ {
+ String savedMsg(L"");
+ pMsgEnum->GetValue(savedMsg);
+ if (savedMsg.Equals(rejectMessage, true) == true)
+ {
+ //reject msg already in use.
+ r = E_OBJ_ALREADY_EXIST;
+ break;
+ }
+ }
+ delete pMsgEnum;
+ }
+ delete pRejectMsgMap;
+ }
+
+ if(r != E_OBJ_ALREADY_EXIST)
+ {
+ //save to vconf
+ r = __pSettingsMgr->SetRejectMessage(messageIndex, rejectMessage);
+ }
+ return r;
+}
+
+result
+SettingsPresentationModel::RemoveRejectMessage(const Tizen::Base::Collection::IListT<int>& deleteKeyList)
+{
+ return __pSettingsMgr->RemoveRejectMessage(deleteKeyList);
+}
+
+result
+SettingsPresentationModel::SetSpeedDialMapping(const String& contactId, int numberToMap)
+{
+ return __pSettingsMgr->SetSpeedDialMapping(contactId,numberToMap);
+}
+
+IMapT<int,SpeedDialInfo>*
+SettingsPresentationModel::GetSpeedDialMappingN(void)
+{
+ return __pSettingsMgr->GetSpeedDialMappingN();
+}
+
+bool
+SettingsPresentationModel::IsCallToBeRejected(Tizen::Base::String& phoneNumber)
+{
+ return __pSettingsMgr->IsCallToBeRejected(phoneNumber);
+}
+
+result
+SettingsPresentationModel::RemoveSpeedDialMapping(int rowId)
+{
+ return __pSettingsMgr->RemoveSpeedDialMapping(rowId);
+}
+
+result
+SettingsPresentationModel::UpdateSpeedDialMapping(int rowId, const String& contactId, int numberToMap)
+{
+ return __pSettingsMgr->UpdateSpeedDialMapping(rowId, contactId, numberToMap);
+}
+
+result
+SettingsPresentationModel::SetCallLineIdentity(CallLineIdentity identity)
+{
+ return __pSettingsMgr->SetCallLineIdentity(identity);
+}
+
+result
+SettingsPresentationModel::GetCallLineIdentity(CallLineIdentity& identity)
+{
+ return __pSettingsMgr->GetCallLineIdentity(identity);
+}
+
+result
+SettingsPresentationModel::SetCallAlertStatus(CallAlertStatus callAlertStatus)
+{
+ return __pSettingsMgr->SetCallAlertStatus(callAlertStatus);
+}
+
+result
+SettingsPresentationModel::GetCallAlertStatus(CallAlertStatus& callAlertStatus)
+{
+ return __pSettingsMgr->GetCallAlertStatus(callAlertStatus);
+}
+
+result
+SettingsPresentationModel::SetUnknownRejectStatus(bool activate)
+{
+ return __pSettingsMgr->SetUnknownRejectStatus(activate);
+}
+
+bool
+SettingsPresentationModel::GetUnknownRejectStatus(void)
+{
+ return __pSettingsMgr->GetUnknownRejectStatus();
+}
+
+Contact*
+SettingsPresentationModel::FetchContactDetailsN(const String& contactId)
+{
+ return __pSettingsMgr->FetchContactDetailsN(contactId);
+}
+
+//////////////////////////////////////////////////
+// Settings Event Listener Methods //
+//////////////////////////////////////////////////
+
+void
+SettingsPresentationModel::HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallWaitingResponse(isCallSuccessful, callWaitingActivated);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallWaitingResponse(isCallSuccessful, isCallWaitingEnabled);
+ }
+}
+
+void
+SettingsPresentationModel::HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, callForwardActivated, noReplyWaitTime);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+}
+
+void
+SettingsPresentationModel::HandleGetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallBarringResponse(result, callBarringType, isBarringActivated);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallBarringResponse(int result, CallBarringType callBarringType, bool isBarringActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallBarringResponse(result, callBarringType, isBarringActivated);
+ }
+}
+
+result
+SettingsPresentationModel::SetCallState(CallState callState)
+{
+ return __pSettingsMgr->SetCallState(callState);
+}
+
+result
+SettingsPresentationModel::GetCallState(CallState& callState)
+{
+ return __pSettingsMgr->GetCallState(callState);
+}
+
+bool
+SettingsPresentationModel::GetFlightModeStatus(void)
+{
+ return __pSettingsMgr->GetFlightModeStatus();
+}
+
+result
+SettingsPresentationModel::EnableCallAnsweringKey(bool activate)
+{
+ return __pSettingsMgr->EnableCallAnsweringKey(activate);
+}
+
+bool
+SettingsPresentationModel::IsCallAnsweringKeyEnabled(void)
+{
+ return __pSettingsMgr->IsCallAnsweringKeyEnabled();
+}
+
+result
+SettingsPresentationModel::EnableCallEndingKey(bool activate)
+{
+ return __pSettingsMgr->EnableCallEndingKey(activate);
+}
+
+bool
+SettingsPresentationModel::IsCallEndingKeyEnabled(void)
+{
+ return __pSettingsMgr->IsCallEndingKeyEnabled();
+}
+
+result
+SettingsPresentationModel::EnableOutgoingCallWhenLocked(bool activate)
+{
+ return __pSettingsMgr->EnableOutgoingCallWhenLocked(activate);
+}
+
+bool
+SettingsPresentationModel::IsOutgoingCallEnabledWhenLocked(void)
+{
+ return __pSettingsMgr->IsOutgoingCallEnabledWhenLocked();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsRejectListForm.cpp
+ * @brief Setting Reject list form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnPhoneApp.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSettingsRejectListForm.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//constants
+const int IDI_TOTAL_GROUP_COUNT = 1;
+const int IDI_DEFAULT_LIST_ITEMID = 500;
+//by default, list has 1 item
+const int IDI_DEFAULT_LIST_COUNT = 1;
+const int IDI_ADD_FOOTER_INDEX = 0;
+const int IDI_DEL_FOOTER_INDEX = 1;
+static const wchar_t* IDL_SETTINGS_REJECTLIST_FORM = L"IDL_SETTINGS_REJECTLIST_FORM";
+
+SettingsRejectListForm::SettingsRejectListForm(void)
+ : __pNumbersList(null)
+ , __pSettingsPresentor(null)
+{
+}
+
+SettingsRejectListForm::~SettingsRejectListForm(void)
+{
+}
+
+bool
+SettingsRejectListForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_REJECTLIST_FORM);
+ return true;
+}
+
+result
+SettingsRejectListForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //Initialize Footer
+ InitializeFooter();
+ //initialize list view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+void
+SettingsRejectListForm::InitializeFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ //Add footer item
+ String footerItemName(L"");
+ footerItemName.Append(AppUtility::GetResourceString(IDS_ADD_BTN_STRING));
+ FooterItem addFooterItem;
+ addFooterItem.Construct(IDA_ADD_FOOTER_ITEMID);
+ addFooterItem.SetText(footerItemName);
+ pFooter->InsertItemAt(IDI_ADD_FOOTER_INDEX,addFooterItem);
+
+ //Delete footer item
+ footerItemName.Clear();
+ footerItemName.Append(AppUtility::GetResourceString(IDS_DELETE_BTN_STRING));
+ FooterItem delFooterItem;
+ delFooterItem.Construct(IDA_DELETE_FOOTER_ITEMID);
+ delFooterItem.SetText(footerItemName);
+ pFooter->InsertItemAt(IDI_DEL_FOOTER_INDEX,delFooterItem);
+ //back button
+
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsRejectListForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pNumbersList)
+ {
+ delete __pNumbersList;
+ __pNumbersList = null;
+ }
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsRejectListForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ case IDA_ADD_FOOTER_ITEMID:
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ADD_REJECT_NUMBER), null);
+ }
+ break;
+
+ case IDA_DELETE_FOOTER_ITEMID:
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_DEL_NUMBER), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsRejectListForm::OnFormBackRequested(Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU), null);
+}
+
+void
+SettingsRejectListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+ UpdateRejectTableView();
+}
+
+void
+SettingsRejectListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+void
+SettingsRejectListForm::FetchNumbersRejectList(void)
+{
+ if (__pNumbersList != null)
+ {
+ delete __pNumbersList;
+ __pNumbersList = null;
+ }
+ __pNumbersList = static_cast<ArrayListT<CallRejectInfo>*>(__pSettingsPresentor->GetCallRejectList());
+}
+
+result
+SettingsRejectListForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView != null)
+ {
+ //pMenuTableView->SetGroupedLookEnabled(true);
+ pMenuTableView->SetItemProvider(this);
+ r = pMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMenuTableView->UpdateTableView();
+ pMenuTableView->SetItemEnabled(0, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsRejectListForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ AppLog("%d %d",groupIndex,itemIndex);
+ if(status == TABLE_VIEW_ITEM_STATUS_SELECTED)
+ {
+ if(itemIndex == 0)
+ {
+ if(tableView.IsItemChecked(groupIndex,itemIndex) == true)
+ {
+ tableView.SetItemChecked(groupIndex,itemIndex,false);
+ __pSettingsPresentor->SetUnknownRejectStatus(false);
+ }
+ else
+ {
+ tableView.SetItemChecked(groupIndex,itemIndex,true);
+ __pSettingsPresentor->SetUnknownRejectStatus(true);
+ }
+ }
+ else
+ {
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt((itemIndex -1), rejectInfo);
+ // "unknown number" element status changed
+ if (tableView.IsItemChecked(groupIndex,itemIndex) == true)
+ {
+ tableView.SetItemChecked(groupIndex,itemIndex,false);
+ __pSettingsPresentor->UpdateCallRejectRow(rejectInfo.rowId,rejectInfo.phoneNumber,false,rejectInfo.rejectCondition);
+ }
+ else
+ {
+ tableView.SetItemChecked(groupIndex,itemIndex,true);
+ __pSettingsPresentor->UpdateCallRejectRow(rejectInfo.rowId,rejectInfo.phoneNumber,true,rejectInfo.rejectCondition);
+ }
+
+ }
+
+ }
+ if (itemIndex == 0)
+ {
+ // "unknown number" element status changed
+ if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+ {
+ __pSettingsPresentor->SetUnknownRejectStatus(true);
+ }
+ else if(status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ __pSettingsPresentor->SetUnknownRejectStatus(false);
+ }
+ }
+ else
+ {
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt((itemIndex -1), rejectInfo);
+ // "unknown number" element status changed
+ if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
+ {
+ __pSettingsPresentor->UpdateCallRejectRow(rejectInfo.rowId,rejectInfo.phoneNumber,true,rejectInfo.rejectCondition);
+ }
+ else if(status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
+ {
+ __pSettingsPresentor->UpdateCallRejectRow(rejectInfo.rowId,rejectInfo.phoneNumber,false,rejectInfo.rejectCondition);
+ }
+ }
+}
+
+int
+SettingsRejectListForm::GetGroupCount(void)
+{
+ return IDI_TOTAL_GROUP_COUNT;
+}
+
+int
+SettingsRejectListForm::GetItemCount(int groupIndex)
+{
+ int itemCount = IDI_DEFAULT_LIST_COUNT;
+ if (__pNumbersList != null)
+ {
+ itemCount += __pNumbersList->GetCount();
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsRejectListForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ return pItem;
+}
+
+bool
+SettingsRejectListForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsRejectListForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsRejectListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ int itemRectSize = AppUtility::GetSettingsItemRectSize();
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+ int subItemTextSize = AppUtility::GetSettingsSubItemSize();
+ //sub text rectangle
+ Rectangle criteriaRect(X_LIST_MENU_TEXT_ITEM, mainItemTextSize,
+ (itemWidth - X_LIST_MENU_TEXT_ITEM), H_LIST_SUB_TXT_ITEM);
+ String criteria(L"");
+ //text item rectangle
+ Rectangle itemLabelRect(X_LIST_MENU_TEXT_ITEM, Y_LIST_MENU_TEXT_ITEM, (itemWidth - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), mainItemTextSize);
+ String itemName(L"");
+
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ switch (itemIndex)
+ {
+ case 0:
+ {
+ //default "unknown" item
+ itemName.Append(AppUtility::GetResourceString(IDS_DEFAULT_REJECT_ITEM_STRING));
+ if (__pNumbersList != null && __pNumbersList->GetCount() > 0)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ else if(__pNumbersList != null && __pNumbersList->GetCount() == 0)
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ }
+ break;
+
+ default:
+ {
+ int listIndex = itemIndex - 1;
+ if (__pNumbersList != null && listIndex < __pNumbersList->GetCount())
+ {
+ //numbers from fetched list
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt(listIndex, rejectInfo);
+ itemName.Append(rejectInfo.phoneNumber);
+ //criteria string
+ switch (rejectInfo.rejectCondition)
+ {
+ case CALL_REJECT_MATCH_EXACTLY:
+ {
+ criteria.Append(AppUtility::GetResourceString(IDS_MATCHCRITERIA_EXACT));
+ }
+ break;
+
+ case CALL_REJECT_MATCH_START:
+ {
+ criteria.Append(AppUtility::GetResourceString(IDS_MATCHCRITERIA_START));
+ }
+ break;
+
+ case CALL_REJECT_MATCH_END:
+ {
+ criteria.Append(AppUtility::GetResourceString(IDS_MATCHCRITERIA_END));
+ }
+ break;
+
+ case CALL_REJECT_MATCH_INCLUDE:
+ {
+ criteria.Append(AppUtility::GetResourceString(IDS_MATCHCRITERIA_INCLUDE));
+ }
+ break;
+ default:
+ break;
+ }
+
+ //check if this is last item
+ if (listIndex == __pNumbersList->GetCount() -1)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ }
+ }
+ break;
+ }
+
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ if(itemIndex == 0)
+ {
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
+ }
+ else
+ {
+ pItem->Construct(Dimension(itemWidth, itemRectSize), TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING);
+ }
+ //item name
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(itemLabelRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ pItem->AddControl(pItemLbl);
+ //criteria
+ if(criteria.IsEmpty() == false)
+ {
+ Label* pCriteriaLbl = new (std::nothrow) Label();
+ pCriteriaLbl->Construct(criteriaRect, criteria);
+ pCriteriaLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pCriteriaLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pCriteriaLbl->SetTextConfig(FONT_SIZE_SUB_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pCriteriaLbl->SetTextColor(COLOR_NORMAL_SUB_TXT);
+ pItem->AddControl(pCriteriaLbl);
+ }
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return pItem;
+}
+
+bool
+SettingsRejectListForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsRejectListForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ int mainItemTextSize =AppUtility::GetSettingsMainItemSize();
+
+ switch (itemIndex)
+ {
+ case 0:
+ {
+ //Unknown Item
+ if (__pNumbersList != null && __pNumbersList->GetCount() > 0)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ else if(__pNumbersList != null && __pNumbersList->GetCount() == 0)
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ }
+ break;
+ default:
+ {
+ int listIndex = itemIndex - 1;
+ //check if this is last item
+ if (listIndex == __pNumbersList->GetCount() -1)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ }
+ break;
+ }
+
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl != null)
+ {
+ /*Font font;
+ int topMargin = pItemLbl->GetTopMargin();
+ AppLogDebug("%d %d", topMargin, pItemLbl->GetY());
+ font.Construct(FONT_STYLE_PLAIN, AppUtility::GetSettingsItemFontSize());
+ FloatDimension textDimension;
+ font.GetTextExtent(pItemLbl->GetText(), pItemLbl->GetText().GetLength(), textDimension);*/
+ Rectangle itemLabelRect(pItemLbl->GetX(), pItemLbl->GetY(), (pItem->GetWidth() - X_LIST_MENU_TEXT_ITEM - W_SLIDER_ICON), mainItemTextSize);
+ pItemLbl->SetBounds(itemLabelRect);
+ pItemLbl->Invalidate(true);
+ }
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ return;
+}
+
+int
+SettingsRejectListForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsRejectListForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsRejectListForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMainMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMainMenuTableView != null)
+ {
+ pMainMenuTableView->RefreshAllItems();
+ }
+}
+
+void
+SettingsRejectListForm::OnForeground()
+{
+ /*GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView == null)
+ {
+ return;
+ }
+ IListT<CallRejectInfo>* pRejList = SettingsPresentationModel::GetInstance()->GetCallRejectList();
+ IEnumeratorT<CallRejectInfo>* pRejEnum = pRejList->GetEnumeratorN();
+ int itemIndex = 1;
+ while(pRejEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo rejectInfo;
+ pRejEnum->GetCurrent(rejectInfo);
+ if(rejectInfo.isActivated == true)
+ {
+ pMenuTableView->SetItemChecked(0,itemIndex,true);
+ }
+ itemIndex++;
+ }
+ //pMenuTableView->UpdateTableView();
+ //pMenuTableView->RefreshAllItems();
+ pMenuTableView->Invalidate(true);*/
+ UpdateRejectTableView();
+}
+
+void
+SettingsRejectListForm::OnBackground()
+{
+ //Empty Implimentation
+}
+
+void
+SettingsRejectListForm::UpdateRejectTableView()
+{
+ FetchNumbersRejectList();
+ GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView != null)
+ {
+ //fetch latest added numbers
+ pMenuTableView->UpdateTableView();
+
+ //set item's check status
+ for (int itemIndex = 0; itemIndex < GetItemCount(0); itemIndex++)
+ {
+ bool isItemActivated = false;
+ if(itemIndex == 0)
+ {
+ isItemActivated = __pSettingsPresentor->GetUnknownRejectStatus();
+ }
+ else
+ {
+ int listIndex = itemIndex - 1;
+ if (__pNumbersList != null && listIndex < __pNumbersList->GetCount())
+ {
+ //numbers from fetched list
+ CallRejectInfo rejectInfo;
+ __pNumbersList->GetAt(listIndex, rejectInfo);
+ isItemActivated = rejectInfo.isActivated;
+ }
+ }
+ pMenuTableView->SetItemChecked(0, itemIndex, isItemActivated);
+ }
+ pMenuTableView->Invalidate(true);
+ }
+
+ //Enable or Disable delete footer button
+ bool enableItem = true;
+ if (__pNumbersList == null || __pNumbersList->GetCount() <= 0)
+ {
+ enableItem = false;
+ }
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetItemEnabled(IDI_DEL_FOOTER_INDEX, enableItem);
+ pFooter->Invalidate(true);
+ }
+
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsRejectMsgsForm.cpp
+ * @brief Setting Reject message form
+ */
+#include <FApp.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnSettingsRejectMsgsForm.h"
+#include "PhnSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+const int ID_BTN_REJECTMESSAGE = 100;
+
+//contants
+const int IDI_TOTAL_GROUP_COUNT = 1;
+//const int IDI_ADD_FOOTER_INDEX = 0;
+const int IDI_DEL_FOOTER_INDEX = 0;
+static const wchar_t* IDL_SETTINGS_REJECTMSGS_FORM = L"IDL_SETTINGS_REJECTMSGS_FORM";
+const int REJECTMSGITEMWIDTH =100;
+
+SettingsRejectMsgsForm::SettingsRejectMsgsForm(void)
+ : __pMsgsMap(null)
+ , __pSettingsPresentor(null)
+{
+}
+
+SettingsRejectMsgsForm::~SettingsRejectMsgsForm(void)
+{
+}
+
+bool
+SettingsRejectMsgsForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_REJECTMSGS_FORM);
+ return true;
+}
+
+result
+SettingsRejectMsgsForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ //Initialize Footer
+ InitializeFooter();
+ //Set the Reject Message List Count as 6 to default
+ SetRejectMessageCount();
+ //Fetch the latest message list
+ FetchRejectMsgs();
+ //initialize list view
+ r = InitializeGroupedTableView();
+ return r;
+}
+
+void
+SettingsRejectMsgsForm::InitializeFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+
+ String footerItemName(L"");
+ //Add footer item
+ /*footerItemName.Append(AppUtility::GetResourceString(IDS_ADD_BTN_STRING));
+ FooterItem addFooterItem;
+ addFooterItem.Construct(IDA_ADD_FOOTER_ITEMID);
+ addFooterItem.SetText(footerItemName);
+ pFooter->InsertItemAt(IDI_ADD_FOOTER_INDEX, addFooterItem);*/
+
+ //Delete footer item
+ footerItemName.Clear();
+ footerItemName.Append(AppUtility::GetResourceString(IDS_DELETE_BTN_STRING));
+ FooterItem delFooterItem;
+ delFooterItem.Construct(IDA_DELETE_FOOTER_ITEMID);
+ delFooterItem.SetText(footerItemName);
+ pFooter->InsertItemAt(IDI_DEL_FOOTER_INDEX, delFooterItem);
+
+ //back button
+
+ pFooter->SetItemColor(FOOTER_ITEM_STATUS_DISABLED, pFooter->GetColor());
+ pFooter->SetButtonColor(BUTTON_ITEM_STATUS_NORMAL, pFooter->GetColor());
+ pFooter->AddActionEventListener(*this);
+ }
+}
+
+result
+SettingsRejectMsgsForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pMsgsMap)
+ {
+ delete __pMsgsMap;
+ __pMsgsMap = null;
+ }
+ __pSettingsPresentor = null;
+ return r;
+}
+
+void
+SettingsRejectMsgsForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ switch (actionId)
+ {
+ /*case IDA_ADD_FOOTER_ITEMID:
+ {
+ //switch to Add New Reject Msg form
+ int msgCount = 0;
+ if (__pMsgsMap != null)
+ {
+ msgCount = __pMsgsMap->GetCount();
+ }
+
+ if(msgCount < 6)
+ {
+ IList* pArgList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgList->Add((new (std::nothrow) Integer(msgCount)));
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ADD_REJECT_MSG), pArgList);
+ }
+ }
+ break;*/
+
+ case IDA_DELETE_FOOTER_ITEMID:
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_DEL_MESSAGE), null);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+SettingsRejectMsgsForm::OnFormBackRequested(Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ //pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU), null);
+
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MAIN_SETTING_MENU,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY
+ ), null);
+}
+
+void
+SettingsRejectMsgsForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AddOrientationEventListener(*this);
+ //Fetch the latest message list
+ FetchRejectMsgs();
+ GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView != null)
+ {
+ //pMenuTableView->UpdateTableView();
+ pMenuTableView->RefreshAllItems();
+ }
+ //Enable or Disable delete footer button
+ int itemCount = 0;
+ if (__pMsgsMap != null)
+ {
+ //run a loop thru the map and if there is item with height 0 disable it
+ for(int index = 0; index < __pMsgsMap->GetCount(); index++)
+ {
+ IListT<String> *pMsgList = __pMsgsMap->GetValuesN();
+ if(pMsgList != null)
+ {
+ String message;
+ pMsgList->GetAt(index, message);
+ if(message.Equals(L"",true) == false)
+ {
+ itemCount++;
+ }
+ }
+ }
+ }
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ if(itemCount == 0)
+ {
+ pFooter->SetItemEnabled(IDI_DEL_FOOTER_INDEX, false);
+ }
+ else
+ {
+ pFooter->SetItemEnabled(IDI_DEL_FOOTER_INDEX, true);
+ }
+
+ }
+}
+
+void
+SettingsRejectMsgsForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+}
+
+void
+SettingsRejectMsgsForm::SetRejectMessageCount(void)
+{
+ __pSettingsPresentor->SetRejectMessageListCount();
+}
+
+void
+SettingsRejectMsgsForm::FetchRejectMsgs(void)
+{
+ if (__pMsgsMap != null)
+ {
+ __pMsgsMap->RemoveAll();
+ delete __pMsgsMap;
+ }
+ //item to be fetched from Db
+ __pMsgsMap = __pSettingsPresentor->GetRejectMessageListN();
+}
+
+result
+SettingsRejectMsgsForm::InitializeGroupedTableView(void)
+{
+ result r = E_FAILURE;
+ GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView != null)
+ {
+ //pMenuTableView->SetGroupedLookEnabled(true);
+ pMenuTableView->SetItemProvider(this);
+ r = pMenuTableView->AddGroupedTableViewItemEventListener(*this);
+ pMenuTableView->UpdateTableView();
+ pMenuTableView->SetItemEnabled(0, -1, false);
+ }
+ return r;
+}
+
+void
+SettingsRejectMsgsForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ AppLogDebug("Enter %d",itemIndex);
+ if(__pMsgsMap != null)
+ {
+ int listIndex = itemIndex;
+ IListT<String> *pRejectMsgList = __pMsgsMap->GetValuesN();
+ if (pRejectMsgList != null && listIndex < pRejectMsgList->GetCount())
+ {
+ //switch to edit message form
+ String msgToBeEdited;
+ pRejectMsgList->GetAt(listIndex, msgToBeEdited);
+ AppLogDebug("%ls",msgToBeEdited.GetPointer());
+ //Ownership - transferred to next form
+ IList* pArgList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ if(msgToBeEdited.IsEmpty() == true)
+ {
+ pArgList->Add((new (std::nothrow) Integer(listIndex)));
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ADD_REJECT_MSG), pArgList);
+ }
+ else
+ {
+ pArgList->Add((new Integer(listIndex)));
+ pArgList->Add(new String(msgToBeEdited));
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_EDIT_REJECT_MSG), pArgList);
+ }
+ }
+ }
+}
+
+int
+SettingsRejectMsgsForm::GetGroupCount(void)
+{
+ return IDI_TOTAL_GROUP_COUNT;
+}
+
+int
+SettingsRejectMsgsForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+ if (__pMsgsMap != null)
+ {
+ itemCount += __pMsgsMap->GetCount();
+ }
+ return itemCount;
+}
+
+TableViewGroupItem*
+SettingsRejectMsgsForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_HIDDENGROUP_ITEM));
+ pItem->SetBackgroundColor(COLOR_GROUP_ITEM_BG);
+ return pItem;
+}
+
+bool
+SettingsRejectMsgsForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsRejectMsgsForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ return;
+}
+
+TableViewItem*
+SettingsRejectMsgsForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ int listIndex = itemIndex;
+ //main text item rectangle
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, 0, (itemWidth - REJECTMSGITEMWIDTH), H_LIST_NORMAL_MENU_ITEM);
+ Rectangle rejectMessageButtonRect(0, 0, (itemWidth), H_LIST_NORMAL_MENU_ITEM);
+ TableViewItem* pItem = null;
+ if (__pMsgsMap != null && listIndex < __pMsgsMap->GetCount())
+ {
+ //messages are from fetched list
+ String itemName;
+ __pMsgsMap->GetValue(listIndex, itemName);
+
+ pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+ //main text
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ if(itemName.Equals(L"",true) == true)
+ {
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(mainItemRect, AppUtility::GetResourceString(IDS_SETTING_REJECT_MESSAGE_EMPTY));
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ pItem->AddControl(pItemLbl);
+ }
+ else
+ {
+ Label* pItemLbl = new (std::nothrow) Label();
+ pItemLbl->Construct(mainItemRect, itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ pItem->AddControl(pItemLbl);
+ }
+ //position in group
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ if (__pMsgsMap->GetCount() == 1)
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ else
+ {
+ if (listIndex == 0)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ else if (listIndex == __pMsgsMap->GetCount() - 1)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ }
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ }
+ return pItem;
+}
+
+bool
+SettingsRejectMsgsForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+SettingsRejectMsgsForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ int listIndex = itemIndex;
+ Rectangle mainItemRect(X_LIST_MENU_TEXT_ITEM, 0, (pItem->GetWidth() - REJECTMSGITEMWIDTH), H_LIST_NORMAL_MENU_ITEM);
+ int mainFontSize = AppUtility::GetSettingsItemFontSize();
+ if (__pMsgsMap != null && listIndex < __pMsgsMap->GetCount())
+ {
+ TableViewItemPos position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ if (__pMsgsMap->GetCount() == 1)
+ {
+ position = TABLEVIEWITEMPOS_SINGLE_ITEM;
+ }
+ else
+ {
+ if (listIndex == 0)
+ {
+ position = TABLEVIEWITEMPOS_TOP;
+ }
+ else if (listIndex == __pMsgsMap->GetCount() - 1)
+ {
+ position = TABLEVIEWITEMPOS_BOTTOM;
+ }
+ else
+ {
+ position = TABLEVIEWITEMPOS_CENTER;
+ }
+ }
+ String itemName;
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl)
+ {
+ pItemLbl->SetBounds(mainItemRect);
+ }
+ __pMsgsMap->GetValue(listIndex, itemName);
+
+ if(itemName.Equals(L"",true) == true)
+ {
+ if(pItemLbl)
+ {
+ pItemLbl->SetText(AppUtility::GetResourceString(IDS_SETTING_REJECT_MESSAGE_EMPTY));
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_NORMAL_SELECTED_OPTION_SUB_TXT);
+ }
+ }
+ else
+ {
+ if(pItemLbl)
+ {
+ pItemLbl->SetText(itemName);
+ pItemLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pItemLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pItemLbl->SetTextConfig(mainFontSize, LABEL_TEXT_STYLE_NORMAL);
+ pItemLbl->SetTextColor(COLOR_MAIN_TXT);
+ }
+ }
+
+
+ //set background bitmap
+ AppUtility::SetBackgroundBitmapToTableItem(pItem, position);
+ pItem->Invalidate(true);
+ }
+ return;
+}
+
+int
+SettingsRejectMsgsForm::GetDefaultGroupItemHeight(void)
+{
+ return H_LIST_HIDDENGROUP_ITEM;
+}
+
+int
+SettingsRejectMsgsForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+SettingsRejectMsgsForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+ GroupedTableView* pMenuTableView = static_cast<GroupedTableView*>(GetControl(IDC_GROUPEDTABLEVIEW));
+ if (pMenuTableView != null)
+ {
+ pMenuTableView->RefreshAllItems();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSettingsSpeedDialForm.cpp
+ * @brief Setting Speed dial form
+ */
+#include <FApp.h>
+#include <FSocial.h>
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnSettingsSpeedDialForm.h"
+#include "PhnSceneRegister.h"
+#include "PhnSpeedDialInfo.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnTypes.h"
+#include "PhnPhoneApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//constants
+const int H_DELETE_ICON_BMP = 56;
+const int W_DELETE_ICON_BMP = 56;
+const int W_VOICEMAIL_ICON_BG = 213;
+const int H_VOICEMAIL_ICON_BG = 213;
+const int W_VOICEMAIL_ICON = 100;
+const int H_VOICEMAIL_ICON = 100;
+const int W_SPEED_DIAL_CHECK_ICON = 64;
+const int H_SPEED_DIAL_CHECK_ICON = 64;
+const int W_SPEED_DIAL_NUM_ICON = 60;
+const int H_SPEED_DIAL_NUM_ICON = 85;
+
+const int Y_INVALID_CONTACT_TEXT = 10;
+const int H_INVALID_CONTACT_POPUP_TEXT = 60;
+static const unsigned int COLOR_INVALID_CONTACT_POPUP_TEXT = Color32<128, 128, 128>::Value;
+const int FONT_SIZE_INVALID_CONTACT_POPUP_TEXT= 36;
+
+const int X_OK_BUTTON = 170;
+const int Y_OK_BUTTON = 80;
+const int W_OK_BUTTON = 300;
+const int H_OK_BUTTON = 80;
+
+const int W_INVALID_CONTACT_POPUP = 640;
+const int H_INVALID_CONTACT_POPUP = 250;
+
+const unsigned int COLOR_EMPTY_PHOTO = Color32<103, 103, 103>::Value;
+const unsigned int COLOR_PRESSED_PHOTO = Color32<59, 115, 182>::Value;
+//String contants for control name
+static const wchar_t* IDL_SETTINGS_SPEEDDIAL_FORM = L"IDL_SETTINGS_SPEEDDIAL_FORM";
+static const wchar_t* IDC_PHOTO_BTN2 = L"IDC_PHOTO_BUTTON2";
+static const wchar_t* IDC_PHOTO_BTN3 = L"IDC_PHOTO_BUTTON3";
+static const wchar_t* IDC_PHOTO_BTN4 = L"IDC_PHOTO_BUTTON4";
+static const wchar_t* IDC_PHOTO_BTN5 = L"IDC_PHOTO_BUTTON5";
+static const wchar_t* IDC_PHOTO_BTN6 = L"IDC_PHOTO_BUTTON6";
+static const wchar_t* IDC_PHOTO_BTN7 = L"IDC_PHOTO_BUTTON7";
+static const wchar_t* IDC_PHOTO_BTN8 = L"IDC_PHOTO_BUTTON8";
+static const wchar_t* IDC_PHOTO_BTN9 = L"IDC_PHOTO_BUTTON9";
+
+static const wchar_t* IDC_VOICEMAIL_TXT_LABEL = L"IDC_VOICEMAIL_TXT_LABEL";
+static const wchar_t* IDC_NAME_LABEL2 = L"IDC_NAME_LABEL2";
+static const wchar_t* IDC_NAME_LABEL3 = L"IDC_NAME_LABEL3";
+static const wchar_t* IDC_NAME_LABEL4 = L"IDC_NAME_LABEL4";
+static const wchar_t* IDC_NAME_LABEL5 = L"IDC_NAME_LABEL5";
+static const wchar_t* IDC_NAME_LABEL6 = L"IDC_NAME_LABEL6";
+static const wchar_t* IDC_NAME_LABEL7 = L"IDC_NAME_LABEL7";
+static const wchar_t* IDC_NAME_LABEL8 = L"IDC_NAME_LABEL8";
+static const wchar_t* IDC_NAME_LABEL9 = L"IDC_NAME_LABEL9";
+
+static const wchar_t* IDB_SPEED_DIAL_CHECK = L"C01-5_icon_speeddial_check.png";
+
+SettingsSpeedDialForm::SettingsSpeedDialForm(void)
+{
+ __pSpeedDialMappingList = null;
+ __pSettingsPresentor = null;
+ __keyToMap = 0;
+ __isUpdate = false;
+ __isDeleteMode = false;
+ __pAddressbook = null;
+ __pSpeedDialPopup = null;
+ __pDeleteList = null;
+ __pPreviousSceneId = null;
+ __isContactAppControlLaunched = false;
+ __pInvalidContactPopup = null;
+ __contactUpdate = false;
+ __invalidContactRecordId = INVALID_RECORD_ID;
+}
+
+SettingsSpeedDialForm::~SettingsSpeedDialForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+// SettingsPresentationModel::DeleteInstance();
+ if(__pPreviousSceneId != null)
+ {
+ delete __pPreviousSceneId;
+ }
+}
+
+bool
+SettingsSpeedDialForm::Initialize(void)
+{
+ Construct(IDL_SETTINGS_SPEEDDIAL_FORM);
+
+ return true;
+}
+
+result
+SettingsSpeedDialForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ // Setup back event listener
+ SetFormBackEventListener(this);
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if (__pAddressbook == null)
+ {
+ r = E_FAILURE;
+ }
+ return r;
+}
+
+void
+SettingsSpeedDialForm::InitializeFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ pFooter->RemoveAllButtons();
+ pFooter->RemoveAllItems();
+
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+ if(__isDeleteMode == true)
+ {
+ FooterItem cancelFooterItem;
+ cancelFooterItem.Construct(IDA_CANCEL_FOOTER_ITEMID);
+ String cancelString = AppUtility::GetResourceString(L"IDS_CANCEL");
+ cancelFooterItem.SetText(cancelString);
+ pFooter->AddItem(cancelFooterItem);
+ pFooter->RequestRedraw(true);
+ }
+ //Delete footer item
+ String footerItemName(L"");
+ footerItemName.Append(AppUtility::GetResourceString(IDS_REMOVE_CONTACT));
+ FooterItem delFooterItem;
+ delFooterItem.Construct(IDA_DELETE_FOOTER_ITEMID);
+ delFooterItem.SetText(footerItemName);
+ pFooter->AddItem(delFooterItem);
+ if(__isDeleteMode == false)
+ {
+ if(__pSpeedDialMappingList != null)
+ {
+ if(__pSpeedDialMappingList->GetCount() == 0)
+ {
+ pFooter->SetItemEnabled(0,false);
+ }
+ else
+ {
+ pFooter->SetItemEnabled(0,true);
+ }
+ }
+ else
+ {
+ pFooter->SetItemEnabled(0,false);
+ }
+
+ //back button
+ pFooter->SetButtonColor(BUTTON_ITEM_STATUS_NORMAL, pFooter->GetColor());
+ pFooter->AddActionEventListener(*this);
+ pFooter->RequestRedraw(true);
+ }
+ else
+ {
+
+ if(__pDeleteList != null)
+ {
+ if(__pDeleteList->GetCount() == 0)
+ {
+ pFooter->SetItemEnabled(1,false);
+ }
+ else
+ {
+ pFooter->SetItemEnabled(1,true);
+ }
+ }
+ else
+ {
+ pFooter->SetItemEnabled(1,false);
+ }
+
+
+ }
+ }
+}
+
+void
+SettingsSpeedDialForm::SetDefaultImageAndLabelToButton(Button& btn, Label& lbl, ActionId actionId)
+{
+ String contactName(L"");
+ //Set default Photo to Buttons -- Grey for NormalBGBitmap and Blue for PressedBGBitmap
+ Canvas* pNormalCanvas = new (std::nothrow) Canvas;
+ Canvas* pPressedCanvas = new (std::nothrow) Canvas;
+ Bitmap *pNormalPhoto = null;
+ Bitmap *pPressedPhoto = null;
+ Rectangle canvasRect(Rectangle(0, 0, btn.GetBounds().width, btn.GetBounds().height));
+ pNormalCanvas->Construct(canvasRect);
+ pPressedCanvas->Construct(canvasRect);
+ pNormalCanvas->FillRectangle(COLOR_EMPTY_PHOTO,canvasRect);
+ pPressedCanvas->FillRectangle(COLOR_PRESSED_PHOTO,canvasRect);
+ if(actionId == IDA_VOICEMAIL)
+ {
+ Bitmap* pIcon = AppUtility::GetBitmapFromResourcesN(IDB_VOICECALL_ICON, W_VOICEMAIL_ICON, H_VOICEMAIL_ICON);
+ Point iconPos(0, 0);
+ iconPos.SetPosition(((btn.GetBounds().width - W_VOICEMAIL_ICON) / 2), ((btn.GetBounds().height - H_VOICEMAIL_ICON) / 2));
+ pNormalCanvas->DrawBitmap(iconPos, *pIcon);
+ pPressedCanvas->DrawBitmap(iconPos, *pIcon);
+ }
+ else
+ {
+ String number;
+ number.Append(actionId);
+ DrawNumericEnrichedTxtToCanvas(number, *pNormalCanvas);
+ DrawNumericEnrichedTxtToCanvas(number, *pPressedCanvas);
+ }
+ pNormalPhoto = new Bitmap();
+ pPressedPhoto = new Bitmap();
+ pNormalPhoto->Construct(*pNormalCanvas, pNormalCanvas->GetBounds());
+ pPressedPhoto->Construct(*pPressedCanvas, pPressedCanvas->GetBounds());
+ btn.SetNormalBackgroundBitmap(*pNormalPhoto);
+ btn.SetPressedBackgroundBitmap( *pPressedPhoto);
+ btn.Invalidate(true);
+ delete pNormalPhoto;
+ delete pPressedPhoto;
+ delete pNormalCanvas;
+ delete pPressedCanvas;
+
+ //Set default display name
+ if(actionId == IDA_VOICEMAIL)
+ {
+ contactName.Append(AppUtility::GetResourceString(IDS_VOICE_MAIL_DEFAULT_STRING));
+ }
+ else
+ {
+ contactName.Append(actionId);
+ contactName.Append(AppUtility::GetResourceString(L"IDS_DEFAULT_SPEED_DIAL_TEXT"));
+ }
+ lbl.SetText(contactName);
+ lbl.Invalidate(true);
+
+}
+
+Contact*
+SettingsSpeedDialForm::GetSpeedDialMappedContact(ActionId actionId)
+{
+ RecordId recordId = INVALID_RECORD_ID;
+ SpeedDialInfo speedDialInfo;
+ if (__pSpeedDialMappingList != null)
+ {
+ __pSpeedDialMappingList->GetValue(actionId,speedDialInfo);
+ if (speedDialInfo.keyMapping == actionId && speedDialInfo.contactId.IsEmpty() == false)
+ {
+ // Convert String value to long long type value
+ Integer::Parse(speedDialInfo.contactId, recordId);
+ }
+ }
+
+ if (recordId != Tizen::Social::INVALID_RECORD_ID)
+ {
+ return __pAddressbook->GetContactN(recordId);
+ }
+
+ return null;
+
+}
+
+void
+SettingsSpeedDialForm::SetContactThumbnailToButton(Button& speedDialButton, Bitmap& contactPhoto, ActionId actionId)
+{
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Bitmap* pContactPhoto = null;
+ Rectangle canvasRect(Rectangle(0, 0, speedDialButton.GetBounds().width, speedDialButton.GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,contactPhoto);
+ if(actionId == IDA_VOICEMAIL)
+ {
+ Bitmap* pIcon = AppUtility::GetBitmapFromResourcesN(IDB_VOICECALL_ICON, W_VOICEMAIL_ICON, H_VOICEMAIL_ICON);
+ Point iconPos(0, 0);
+ iconPos.SetPosition(((speedDialButton.GetBounds().width - W_VOICEMAIL_ICON) / 2), ((speedDialButton.GetBounds().height - H_VOICEMAIL_ICON) / 2));
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ }
+ else
+ {
+ //Draw number on canvas
+ String number;
+ number.Append(actionId);
+ DrawNumericEnrichedTxtToCanvas(number, *pCanvas);
+ }
+ pContactPhoto = new Bitmap();
+ pContactPhoto->Construct(*pCanvas, pCanvas->GetBounds());
+ speedDialButton.SetPressedBackgroundBitmap(*pContactPhoto);
+ speedDialButton.SetNormalBackgroundBitmap(*pContactPhoto);
+ speedDialButton.Invalidate(true);
+ delete pCanvas;
+ pCanvas = null;
+ delete pContactPhoto;
+ pContactPhoto = null;
+}
+void
+SettingsSpeedDialForm::SetCheckIconInDeleteMode(Button& speedDialButton, Bitmap& contactPhoto, ActionId actionId)
+{
+
+ Bitmap* pContactPhoto = null;
+ if ((__isDeleteMode == true) && (__pDeleteList != null))
+ {
+ // This is to check if the call to this function is after a contact update
+ //If this is false then it means that a call is from UpdateButton() to toggle the Delete State
+ //and tick mark should be removed/added
+ // Meaning when normal you check or uncheck the tick mark
+ if(__contactUpdate == false)
+ {
+ if(__pDeleteList->Contains(__keyToMap) == true )
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ else
+ {
+ //update photo bitmap with check icon
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Rectangle canvasRect(Rectangle(0, 0, speedDialButton.GetBounds().width, speedDialButton.GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,contactPhoto);
+ if(actionId == IDA_VOICEMAIL)
+ {
+ Bitmap* pIcon = AppUtility::GetBitmapFromResourcesN(IDB_VOICECALL_ICON, W_VOICEMAIL_ICON, H_VOICEMAIL_ICON);
+ Point iconPos(0, 0);
+ iconPos.SetPosition(((speedDialButton.GetBounds().width - W_VOICEMAIL_ICON) / 2), ((speedDialButton.GetBounds().height - H_VOICEMAIL_ICON) / 2));
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ }
+ else
+ {
+ //Draw number on canvas
+ String number;
+ number.Append(actionId);
+ DrawNumericEnrichedTxtToCanvas(number, *pCanvas);
+ }
+ //apply color
+ pCanvas->DrawRectangle(canvasRect);
+ pCanvas->FillRectangle(Color(103,103,103,127),canvasRect);
+ //draw check icon
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPEED_DIAL_CHECK,W_SPEED_DIAL_CHECK_ICON,H_SPEED_DIAL_CHECK_ICON);
+ pCanvas->DrawBitmap(Point((((canvasRect.width)/2) - (W_SPEED_DIAL_CHECK_ICON/2)),(((canvasRect.height)/2)- (H_SPEED_DIAL_CHECK_ICON/2))),*pBitmap);
+ pContactPhoto = new (std::nothrow) Bitmap();
+ pContactPhoto->Construct(*pCanvas, pCanvas->GetBounds());
+ speedDialButton.SetNormalBackgroundBitmap(*pContactPhoto);
+ speedDialButton.Invalidate(true);
+ delete pCanvas;
+ delete pBitmap;
+ delete pContactPhoto;
+ __pDeleteList->Add(__keyToMap);
+ }
+ }
+ else if(__contactUpdate == true)
+ {
+ if(__pDeleteList->Contains(actionId) == true )
+ {
+ //update photo bitmap with check icon
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Rectangle canvasRect(Rectangle(0, 0, speedDialButton.GetBounds().width, speedDialButton.GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,contactPhoto);
+ if(actionId == IDA_VOICEMAIL)
+ {
+ Bitmap* pIcon = AppUtility::GetBitmapFromResourcesN(IDB_VOICECALL_ICON, W_VOICEMAIL_ICON, H_VOICEMAIL_ICON);
+ Point iconPos(0, 0);
+ iconPos.SetPosition(((speedDialButton.GetBounds().width - W_VOICEMAIL_ICON) / 2), ((speedDialButton.GetBounds().height - H_VOICEMAIL_ICON) / 2));
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ pCanvas->DrawBitmap(iconPos, *pIcon);
+ }
+ else
+ {
+ //Draw number on canvas
+ String number;
+ number.Append(actionId);
+ DrawNumericEnrichedTxtToCanvas(number, *pCanvas);
+ }
+ //apply color
+ pCanvas->DrawRectangle(canvasRect);
+ pCanvas->FillRectangle(Color(103,103,103,127),canvasRect);
+ //draw check icon
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPEED_DIAL_CHECK,W_SPEED_DIAL_CHECK_ICON,H_SPEED_DIAL_CHECK_ICON);
+ pCanvas->DrawBitmap(Point((((canvasRect.width)/2) - (W_SPEED_DIAL_CHECK_ICON/2)),(((canvasRect.height)/2)- (H_SPEED_DIAL_CHECK_ICON/2))),*pBitmap);
+ pContactPhoto = new (std::nothrow) Bitmap();
+ pContactPhoto->Construct(*pCanvas, pCanvas->GetBounds());
+ speedDialButton.SetNormalBackgroundBitmap(*pContactPhoto);
+ speedDialButton.Invalidate(true);
+ delete pCanvas;
+ delete pBitmap;
+ delete pContactPhoto;
+ }
+ }
+ }
+}
+
+
+void
+SettingsSpeedDialForm::InitializePhotoButtons(const String& btnName, const String& lblName, ActionId actionId)
+{
+ Button* pButton = static_cast<Button*>(GetControl(btnName, true));
+ Label* pNameLabel = static_cast<Label*>(GetControl(lblName, true));
+ Contact* pMappedContact = null;
+ Bitmap* pContactPhoto = null;
+ String contactName(L"");
+ bool mappedContactExists = false;
+
+ if (pButton != null && pNameLabel != null)
+ {
+ SetDefaultImageAndLabelToButton(*pButton,*pNameLabel,actionId);
+ pMappedContact = GetSpeedDialMappedContact(actionId);
+ if(pMappedContact != null)
+ {
+ mappedContactExists = true;
+ }
+
+ if(pButton->GetActionId() != actionId)
+ {
+ pButton->SetActionId(actionId);
+ pButton->AddActionEventListener(*this);
+ }
+
+ /*
+ * It will come here in if(mappedContactExists == false && __pDeleteList->Contains(actionId)) in following cases
+ * 1. Speed Dial is launched from Phone->OptionsMenu->SpeedDial
+ * and also from MTCall->Accept->AddCall->OptionsMenu->SpeedDial
+ * 2. Few contacts are checked in Phone Speeddial and also in Call Speeddial
+ * 3. Then only checked contacts are deleted from Call Speeddial
+ * 4. Now It may happen that mapped contact in Phone speeddial is false but still
+ * __pDeleteList contains the contact
+ *
+ * This fix is for the critical bug N_SE-55731
+ */
+ if(__pDeleteList != null)
+ {
+ if(mappedContactExists == false && __pDeleteList->Contains(actionId))
+ {
+ __pDeleteList->Remove(actionId);
+ }
+ }
+ /*If SpeedDial Mapped Contact Exists
+ * 1. Set the contact name to the button
+ * 2. If ThumbNailExists() set Normal and Pressed bitmap with thumbnail
+ * 3. If in deletemode the set the checkicon to the speeddial button
+ */
+ AppLogDebug("mappedContactExists %d ",mappedContactExists);
+ if(mappedContactExists == true)
+ {
+ pMappedContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME,contactName);
+ if (contactName.IsEmpty() == true)
+ {
+ String firstName;
+ pMappedContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME,firstName);
+ String lastName;
+ pMappedContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME,lastName);
+ contactName.Append(firstName + L" " + lastName);
+ }
+ pNameLabel->SetText(contactName);
+ pContactPhoto = pMappedContact->GetThumbnailN();
+ if (pContactPhoto != null)
+ {
+ SetContactThumbnailToButton(*pButton,*pContactPhoto,actionId);
+ }
+
+ SetCheckIconInDeleteMode(*pButton, *pContactPhoto, actionId);
+ }
+
+ pNameLabel->Invalidate(true);
+ pButton->Invalidate(true);
+
+
+ }
+}
+
+result
+SettingsSpeedDialForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+
+ __pSettingsPresentor = null;
+ if (__pAddressbook)
+ {
+ delete __pAddressbook;
+ }
+
+ if (__pDeleteList != null)
+ {
+ delete __pDeleteList;
+ }
+ return r;
+}
+
+void
+SettingsSpeedDialForm::OnActionPerformed(const Control& source, int actionId)
+{
+ if(__isContactAppControlLaunched == true)
+ {
+ AppLogDebug("AppControl launched so returning");
+ return;
+ }
+ switch (actionId)
+ {
+ case IDA_CANCEL_FOOTER_ITEMID:
+ {
+ String titleString = AppUtility::GetResourceString(L"IDS_SPEED_DIAL_TITLE");
+ Header* pHeader = GetHeader();
+ pHeader->SetTitleText(titleString);
+ pHeader->RequestRedraw(true);
+ if (__pDeleteList != null)
+ {
+ __pDeleteList->RemoveAll();
+
+ }
+ __isDeleteMode = false;
+ UpdateAllButtons();
+
+ }
+ break;
+ case IDA_DELETE_FOOTER_ITEMID:
+ {
+ Header* pHeader = GetHeader();
+ if (__isDeleteMode == false)
+ {
+ __isDeleteMode = true;
+ String titleString = AppUtility::GetResourceString(L"IDS_SPEED_DIAL_DELETE_TITLE");
+ pHeader->SetTitleText(titleString);
+ pHeader->RequestRedraw(true);
+ InitializeFooter();
+
+ }
+ else
+ {
+ String titleString = AppUtility::GetResourceString(L"IDS_SPEED_DIAL_TITLE");
+ pHeader->SetTitleText(titleString);
+ pHeader->RequestRedraw(true);
+ if (__pDeleteList != null)
+ {
+ for (int index = 0; index < __pDeleteList->GetCount(); index++)
+ {
+ int keyToDelete;
+ __pDeleteList->GetAt(index,keyToDelete);
+ SpeedDialInfo speedDialInfo;
+ __pSpeedDialMappingList->GetValue(keyToDelete,speedDialInfo);
+ __pSettingsPresentor->RemoveSpeedDialMapping(speedDialInfo.rowId);
+ }
+ }
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ if (__pDeleteList != null)
+ {
+ __pDeleteList->RemoveAll();
+ }
+ __isDeleteMode = false;
+ UpdateAllButtons();
+
+ }
+ }
+ break;
+
+ case IDA_VOICEMAIL:
+ case IDA_SELECT_PHOTO2:
+ case IDA_SELECT_PHOTO3:
+ case IDA_SELECT_PHOTO4:
+ case IDA_SELECT_PHOTO5:
+ case IDA_SELECT_PHOTO6:
+ case IDA_SELECT_PHOTO7:
+ case IDA_SELECT_PHOTO8:
+ case IDA_SELECT_PHOTO9:
+ {
+ __keyToMap = actionId;
+ if (__isDeleteMode == false)
+ {
+ __isUpdate = false;
+ if (__pSpeedDialMappingList != null)
+ {
+ SpeedDialInfo speedDialInfo;
+ result r = __pSpeedDialMappingList->GetValue(actionId,speedDialInfo);
+ if (!IsFailed(r))
+ {
+ __isUpdate = true;
+ }
+ }
+ if (__isUpdate == true)
+ {
+ if (__pSpeedDialPopup)
+ {
+ delete __pSpeedDialPopup;
+ __pSpeedDialPopup = null;
+ }
+ __pSpeedDialPopup = new (std::nothrow) SpeedDialPopup(*this);
+ __pSpeedDialPopup->Initialize();
+ __pSpeedDialPopup->SetShowState(true);
+ __pSpeedDialPopup->Draw();
+ __pSpeedDialPopup->Show();
+
+ }
+ else
+ {
+ LaunchAppControl();
+ }
+ }
+ else
+ {
+ UpdateButton();
+ __keyToMap = 0;
+ }
+ }
+ break;
+ case IDA_POPUP_INVALID_OK:
+ {
+ if(__pInvalidContactPopup != null)
+ {
+ delete __pInvalidContactPopup;
+ __pInvalidContactPopup = null;
+ }
+ }
+ break;
+ }
+}
+
+void
+SettingsSpeedDialForm::LaunchAppControl(void)
+{
+ AppLogDebug("Enter ");
+ if(__isContactAppControlLaunched == true)
+ {
+ //app control already launched.
+ return;
+ }
+ __isContactAppControlLaunched = true;
+ result r = E_SUCCESS;
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(SELECTION_MODE), new (std::nothrow) String(SELECTION_MODE_SINGLE));
+ extraData.Add(new (std::nothrow) String(RETURN_TYPE), new (std::nothrow) String(RETURN_TYPE_ITEM_ID));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
+
+
+ AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_PICK);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, this);
+ if(r != E_SUCCESS)
+ {
+ //app control request failed
+ __isContactAppControlLaunched = false;
+ }
+ delete pAc;
+ }
+ extraData.RemoveAll(true);
+}
+
+void
+SettingsSpeedDialForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ AppLogDebug("Enter %d",appControlResult);
+ if (appId.Equals(String(PROVIDER_ID_CONTACTS)) && operationId.Equals(String(OPERATION_ID_PICK)))
+ {
+ //app control request completed
+ __isContactAppControlLaunched = false;
+ //check if results are available.
+ if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+ {
+ //const String* rettype = static_cast<const String *>(pExtraData->GetValue(String(RETURN_TYPE_ITEM_ID)));
+ const ArrayList* rettype = static_cast<const ArrayList*>(pExtraData->GetValue(String(CONTACT_KEY_ITEM_ID)));
+ const String* pPickResult = static_cast<const String *>(rettype->GetAt(0));
+ if (pPickResult != null && pPickResult->IsEmpty() == false)
+ {
+ RecordId recordId = INVALID_RECORD_ID;
+ Integer::Parse(*pPickResult, recordId);
+ __invalidContactRecordId = recordId;
+ Contact* pContact = __pAddressbook->GetContactN(recordId);
+ IList* pPhoneNumberList = null;
+ if(pContact != null)
+ pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ //Get the Display Name for the contact to show in the Invalid Contact Popup
+ String displayName(L"");
+ if (pContact != null)
+ {
+ //fetch name to be displayed
+ String firstName(L"");
+ String lastName(L"");
+ String middlename(L"");
+ pContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_MIDDLE_NAME, middlename);
+ displayName.Append(firstName + middlename + lastName);
+
+ if (displayName.IsEmpty() == false)
+ {
+ pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ }
+ }
+ if (pPhoneNumberList != null)
+ {
+
+ if(pPhoneNumberList->GetCount() == 0)
+ {
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ __isUpdate = false;
+ __keyToMap = 0;
+ ShowInvalidContactPopup(displayName);
+ return;
+ }
+ else
+ {
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+
+ }
+ else
+ {
+ __isUpdate = false;
+ __keyToMap = 0;
+ ShowInvalidContactPopup(displayName);
+ return;
+ }
+ if (__isUpdate == true)
+ {
+ SpeedDialInfo speedDialInfo;
+ __pSpeedDialMappingList->GetValue(__keyToMap,speedDialInfo);
+ __pSettingsPresentor->UpdateSpeedDialMapping(speedDialInfo.rowId,*pPickResult,__keyToMap);
+ __isUpdate = false;
+ }
+ else
+ {
+ __pSettingsPresentor->SetSpeedDialMapping(*pPickResult,__keyToMap);
+ }
+ UpdateButton();
+ }
+
+ }
+ __keyToMap = 0;
+ }
+
+}
+
+void
+SettingsSpeedDialForm::UpdateAllButtons(void)
+{
+ //Initialise photos
+ InitializePhotoButtons(IDC_VOICEMAIL_BUTTON, IDC_VOICEMAIL_TXT_LABEL, IDA_VOICEMAIL);
+ InitializePhotoButtons(IDC_PHOTO_BTN2, IDC_NAME_LABEL2, IDA_SELECT_PHOTO2);
+ InitializePhotoButtons(IDC_PHOTO_BTN3, IDC_NAME_LABEL3, IDA_SELECT_PHOTO3);
+ InitializePhotoButtons(IDC_PHOTO_BTN4, IDC_NAME_LABEL4, IDA_SELECT_PHOTO4);
+ InitializePhotoButtons(IDC_PHOTO_BTN5, IDC_NAME_LABEL5, IDA_SELECT_PHOTO5);
+ InitializePhotoButtons(IDC_PHOTO_BTN6, IDC_NAME_LABEL6, IDA_SELECT_PHOTO6);
+ InitializePhotoButtons(IDC_PHOTO_BTN7, IDC_NAME_LABEL7, IDA_SELECT_PHOTO7);
+ InitializePhotoButtons(IDC_PHOTO_BTN8, IDC_NAME_LABEL8, IDA_SELECT_PHOTO8);
+ InitializePhotoButtons(IDC_PHOTO_BTN9, IDC_NAME_LABEL9, IDA_SELECT_PHOTO9);
+ InitializeFooter();
+}
+void
+SettingsSpeedDialForm::UpdateButton(void)
+{
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ switch (__keyToMap)
+ {
+ case IDA_VOICEMAIL:
+ {
+ //InitializeVoiceMail();
+ InitializePhotoButtons(IDC_VOICEMAIL_BUTTON, IDC_VOICEMAIL_TXT_LABEL, IDA_VOICEMAIL);
+ }
+ break;
+ case IDA_SELECT_PHOTO2:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN2, IDC_NAME_LABEL2, IDA_SELECT_PHOTO2);
+ }
+ break;
+ case IDA_SELECT_PHOTO3:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN3, IDC_NAME_LABEL3, IDA_SELECT_PHOTO3);
+ }
+ break;
+ case IDA_SELECT_PHOTO4:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN4, IDC_NAME_LABEL4, IDA_SELECT_PHOTO4);
+ }
+ break;
+ case IDA_SELECT_PHOTO5:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN5, IDC_NAME_LABEL5, IDA_SELECT_PHOTO5);
+ }
+ break;
+ case IDA_SELECT_PHOTO6:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN6, IDC_NAME_LABEL6, IDA_SELECT_PHOTO6);
+ }
+ break;
+ case IDA_SELECT_PHOTO7:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN7, IDC_NAME_LABEL7, IDA_SELECT_PHOTO7);
+ }
+ break;
+ case IDA_SELECT_PHOTO8:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN8, IDC_NAME_LABEL8, IDA_SELECT_PHOTO8);
+ }
+ break;
+ case IDA_SELECT_PHOTO9:
+ {
+ InitializePhotoButtons(IDC_PHOTO_BTN9, IDC_NAME_LABEL9, IDA_SELECT_PHOTO9);
+ }
+ break;
+ default:
+ break;
+ }
+ InitializeFooter();
+}
+void
+SettingsSpeedDialForm::OnFormBackRequested(Form& source)
+{
+ String titleString = AppUtility::GetResourceString(L"IDS_SPEED_DIAL_TITLE");
+ Header* pHeader = GetHeader();
+ pHeader->SetTitleText(titleString);
+ pHeader->RequestRedraw(true);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pSceneManager->GoForward(ForwardSceneTransition(*__pPreviousSceneId), null);
+}
+
+void
+SettingsSpeedDialForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ __isDeleteMode = false;
+ __isContactAppControlLaunched = false;
+ //save previous scene id
+ __pPreviousSceneId = new (std::nothrow) SceneId(previousSceneId);
+
+ if (__pSpeedDialMappingList != null)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+
+ if (__pDeleteList != null)
+ {
+ delete __pDeleteList;
+ __pDeleteList = null;
+ }
+
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ //Initialise photos
+ UpdateAllButtons();
+ __pDeleteList = new (std::nothrow) ArrayListT<int>();
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(this);
+ }
+
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+}
+
+void
+SettingsSpeedDialForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ if(__pPreviousSceneId != null)
+ {
+ delete __pPreviousSceneId;
+ __pPreviousSceneId = null;
+ }
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(null);
+ }
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->RemoveAppStateChangeListener(*this);
+}
+
+void
+SettingsSpeedDialForm::OnItemSelected(int itemIndex)
+{
+ switch (itemIndex)
+ {
+ case IDA_UPDATE_SPEED_DIAL:
+ {
+ __isUpdate = true;
+ LaunchAppControl();
+ }
+ break;
+
+ case IDA_REMOVE_SPEED_DIAL:
+ {
+ SpeedDialInfo speedDialInfo;
+ __pSpeedDialMappingList->GetValue(__keyToMap,speedDialInfo);
+ __pSettingsPresentor->RemoveSpeedDialMapping(speedDialInfo.rowId);
+ UpdateButton();
+ }
+ break;
+ default:
+ break;
+ }
+}
+void
+SettingsSpeedDialForm::UpdateInvalidContactPopup(const ContactChangeInfo* pInfo)
+{
+
+
+ if(__invalidContactRecordId == pInfo->GetContactId())
+ {
+ Contact* pContact = __pAddressbook->GetContactN(__invalidContactRecordId);
+ String displayName(L"");
+ if (pContact != null)
+ {
+ //Now check if he has made the contact valid
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if(pPhoneNumberList != null && pPhoneNumberList->GetCount() != 0)
+ {
+ delete __pInvalidContactPopup;
+ __pInvalidContactPopup = null;
+ __invalidContactRecordId = INVALID_RECORD_ID;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ delete pContact;
+ return;
+ }
+ //fetch name to be displayed
+ String firstName(L"");
+ String lastName(L"");
+ String middlename(L"");
+ pContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_MIDDLE_NAME, middlename);
+ displayName.Append(firstName + middlename + lastName);
+
+ if (displayName.IsEmpty() == false)
+ {
+ pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ }
+ delete pContact;
+ }
+ Label* pInvalidContactLabel = static_cast<Label*>(__pInvalidContactPopup->GetControl(L"InvalidContactLabel", true));
+ if(pInvalidContactLabel != null)
+ {
+ if(displayName.Equals(pInvalidContactLabel->GetText()) == false)
+ {
+ String labelText(AppUtility::GetResourceString(IDS_SPEED_DIAL_INVALID_CONTACT));
+ labelText.Append(displayName);
+ pInvalidContactLabel->SetText(labelText);
+ pInvalidContactLabel->Invalidate(true);
+ }
+ }
+ }
+}
+
+void
+SettingsSpeedDialForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+ AppLogDebug("Enter");
+ IEnumerator* pEnum = contactChangeInfoList.GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ ContactChangeInfo* pInfo = (ContactChangeInfo*) pEnum->GetCurrent();
+ switch(pInfo->GetChangeType())
+ {
+ case RECORD_CHANGE_TYPE_REMOVED:
+ {
+ __contactUpdate = true; // Making it false since contact is removed and not updated .
+ if(__pInvalidContactPopup != null && __pInvalidContactPopup->GetShowState() == true)
+ {
+ Contact* pContact = __pAddressbook->GetContactN(__invalidContactRecordId);
+ if(pContact == null)
+ {
+ delete __pInvalidContactPopup;
+ __pInvalidContactPopup = null;
+ __invalidContactRecordId = INVALID_RECORD_ID;
+ }
+ }
+ if(__pSpeedDialMappingList == null || __pSpeedDialMappingList->GetCount() == 0)
+ {
+ break;
+ }
+ IListT<SpeedDialInfo>* pSpeedDialList = __pSpeedDialMappingList->GetValuesN();
+ IEnumeratorT<SpeedDialInfo> *pSpeedDialListEnum = pSpeedDialList->GetEnumeratorN();
+ bool bFound = false;
+ while(pSpeedDialListEnum->MoveNext() == E_SUCCESS)
+ {
+ SpeedDialInfo speeDialInfo;
+ RecordId recordId = INVALID_RECORD_ID;
+ pSpeedDialListEnum->GetCurrent(speeDialInfo);
+ Integer::Parse(speeDialInfo.contactId, recordId);
+ if(recordId == pInfo->GetContactId())
+ {
+ __pSettingsPresentor->RemoveSpeedDialMapping(speeDialInfo.rowId);
+ bFound = true;
+ if (__isUpdate == true && speeDialInfo.keyMapping == __keyToMap)
+ {
+ if (__pSpeedDialPopup)
+ {
+ delete __pSpeedDialPopup;
+ __pSpeedDialPopup = null;
+ }
+ }
+ }
+ }
+ delete pSpeedDialListEnum;
+ delete pSpeedDialList;
+ if(bFound == true)
+ {
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ ReInitializeDeleteList();
+ UpdateAllButtons();
+ }
+
+ }
+ break;
+ case RECORD_CHANGE_TYPE_UPDATED:
+ {
+ __contactUpdate = true;
+ if(__pSpeedDialMappingList == null || __pSpeedDialMappingList->GetCount() == 0)
+ {
+ break;
+ }
+ if(__pInvalidContactPopup != null && __pInvalidContactPopup->GetShowState() == true)
+ {
+ UpdateInvalidContactPopup(pInfo);
+ }
+ IListT<SpeedDialInfo>* pSpeedDialList = __pSpeedDialMappingList->GetValuesN();
+ IEnumeratorT<SpeedDialInfo> *pSpeedDialListEnum = pSpeedDialList->GetEnumeratorN();
+ bool bFound = false;
+ while(pSpeedDialListEnum->MoveNext() == E_SUCCESS)
+ {
+ SpeedDialInfo speeDialInfo;
+ RecordId recordId = INVALID_RECORD_ID;
+ pSpeedDialListEnum->GetCurrent(speeDialInfo);
+ Integer::Parse(speeDialInfo.contactId, recordId);
+ if(recordId == pInfo->GetContactId())
+ {
+ bFound = false;
+ Contact* pContact = __pAddressbook->GetContactN(recordId);
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if(pPhoneNumberList != null)
+ {
+ if(pPhoneNumberList->GetCount() == 0)
+ {
+ __pSettingsPresentor->RemoveSpeedDialMapping(speeDialInfo.rowId);
+ bFound = true;
+ if (__isUpdate == true && speeDialInfo.keyMapping == __keyToMap)
+ {
+ if (__pSpeedDialPopup)
+ {
+ delete __pSpeedDialPopup;
+ __pSpeedDialPopup = null;
+ }
+ }
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ ReInitializeDeleteList();
+ UpdateAllButtons();
+ }
+
+ }
+
+ }
+ }
+ delete pSpeedDialListEnum;
+ delete pSpeedDialList;
+ }
+ break;
+ case RECORD_CHANGE_TYPE_ADDED:
+ break;
+ default:
+ break;
+ }
+ AppLog("Contact changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetContactId(), pInfo->GetVersion());
+ }
+ __contactUpdate = false;
+ delete pEnum;
+}
+
+void
+SettingsSpeedDialForm::ReInitializeDeleteList(void)
+{
+
+ result res;
+ SpeedDialInfo speedDialInfo;
+
+ if(__pSpeedDialMappingList == null)
+ {
+ __isDeleteMode = false;
+ __pDeleteList->RemoveAll();
+ InitializeFooter();
+ return ;
+ }
+ if(__pDeleteList == null)
+ {
+ return;
+ }
+ res = __pSpeedDialMappingList->GetValue(IDA_VOICEMAIL,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_VOICEMAIL) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO2,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO2) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO3,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO3) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO4,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO4) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO5,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO5) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO6,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO6) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO7,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO7) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO8,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO8) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+
+ res = __pSpeedDialMappingList->GetValue(IDA_SELECT_PHOTO9,speedDialInfo);
+ if(res != E_SUCCESS)
+ {
+ if(__pDeleteList->Contains(IDA_SELECT_PHOTO9) == true)
+ {
+ __pDeleteList->Remove(__keyToMap);
+ }
+ }
+ if(__pSpeedDialMappingList->GetCount() == 0)
+ {
+ __isDeleteMode = false;
+ }
+ InitializeFooter();
+
+}
+
+void
+SettingsSpeedDialForm::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ if(__isContactAppControlLaunched == true)
+ {
+ __isContactAppControlLaunched = false;
+ }
+ if (__pSpeedDialMappingList)
+ {
+ delete __pSpeedDialMappingList;
+ __pSpeedDialMappingList = null;
+ }
+ __pSpeedDialMappingList = static_cast<HashMapT<int,SpeedDialInfo>*>(__pSettingsPresentor->GetSpeedDialMappingN());
+ __contactUpdate = true;
+ UpdateAllButtons();
+ __contactUpdate = false;
+
+}
+
+void
+SettingsSpeedDialForm::DrawNumericEnrichedTxtToCanvas(String& number, Canvas& canvas)
+{
+ //get text font
+ Font* fontName = DialUtil::GetTextFontN(FONT_SPEEDDIAL_BTN_NUMBER);
+ //get text color
+ Color* textColor = DialUtil::GetTextColorN(FONT_KEYPAD_NUMBER, BUTTON_STATUS_NORMAL);
+
+ Dimension txtDimension (W_SPEED_DIAL_NUM_ICON, H_SPEED_DIAL_NUM_ICON);
+ EnrichedText* pEnrichedNumber = new (std::nothrow) EnrichedText();
+ pEnrichedNumber->Construct(txtDimension);
+
+ //create text element
+ TextElement* pTextName = new (std::nothrow) TextElement();
+ pTextName->Construct(number);
+ pTextName->SetFont(*fontName);
+ pTextName->SetTextColor(*textColor);
+ //ownership of 'pTextName' transferred to 'pEnrichedName'
+ pEnrichedNumber->Add(*pTextName);
+
+ delete fontName;
+ delete textColor;
+
+ Point txtPos(canvas.GetBounds().width - pEnrichedNumber->GetWidth(), canvas.GetBounds().height - pEnrichedNumber->GetHeight());
+ canvas.DrawText(txtPos, *pEnrichedNumber);
+
+ delete pEnrichedNumber;
+}
+
+void
+SettingsSpeedDialForm::ShowInvalidContactPopup(const String& contactDisplayName)
+{
+ if(__pInvalidContactPopup != null)
+ {
+ delete __pInvalidContactPopup;
+ __pInvalidContactPopup = null;
+ }
+
+ __pInvalidContactPopup = new (std::nothrow) Popup();
+ __pInvalidContactPopup->Construct(true, Dimension(W_INVALID_CONTACT_POPUP,H_INVALID_CONTACT_POPUP));
+ __pInvalidContactPopup->SetTitleText(AppUtility::GetResourceString(IDS_PHONE));
+
+ Rectangle clientBounds = __pInvalidContactPopup->GetClientAreaBounds();
+ Label* pLabelText = new (std::nothrow) Label();
+ String labelText(AppUtility::GetResourceString(IDS_SPEED_DIAL_INVALID_CONTACT));
+ labelText.Append(contactDisplayName);
+ pLabelText->Construct(Rectangle(0, Y_INVALID_CONTACT_TEXT, clientBounds.width, H_INVALID_CONTACT_POPUP_TEXT), labelText);
+ pLabelText->SetName(L"InvalidContactLabel");
+ pLabelText->SetTextConfig(FONT_SIZE_INVALID_CONTACT_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+ pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ __pInvalidContactPopup->AddControl(*pLabelText);
+
+
+ //Ok button
+ Rectangle yesRect(X_OK_BUTTON, Y_OK_BUTTON, W_OK_BUTTON, H_OK_BUTTON);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_SPEED_DIAL_INVALID_CONTACT_OK));
+ pYesButton->SetActionId(IDA_POPUP_INVALID_OK);
+ pYesButton->AddActionEventListener(*this);
+ //__pInvalidContactPopup->SetPropagatedKeyEventListener(this);
+ __pInvalidContactPopup->AddControl(pYesButton);
+ __pInvalidContactPopup->SetShowState(true);
+ __pInvalidContactPopup->Show();
+}
+
+bool
+SettingsSpeedDialForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ /*if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pInvalidContactPopup != null && __pInvalidContactPopup->GetShowState() == true)
+ {
+ __pInvalidContactPopup->SetShowState(false);
+ return true;
+ }
+ }*/
+ return false;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSpeedDialInfo.cpp
+ * @brief Speed dial Info class
+ */
+
+#include "PhnSpeedDialInfo.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+SpeedDialInfo::SpeedDialInfo(void)
+{
+}
+
+SpeedDialInfo::~SpeedDialInfo(void)
+{
+}
+
+bool
+SpeedDialInfo::operator ==(const SpeedDialInfo& rhs) const
+{
+ return (this->rowId == rhs.rowId);
+}
+
+bool
+SpeedDialInfo::operator !=(const SpeedDialInfo& rhs) const
+{
+ return (!(this->rowId == rhs.rowId));
+}
+
+SpeedDialInfo&
+SpeedDialInfo::operator =(const SpeedDialInfo& rhs)
+{
+ if (this != null)
+ {
+ this->rowId = rhs.rowId;
+ this->contactId.Append(rhs.contactId);
+ this->keyMapping = rhs.keyMapping;
+ }
+ return *this;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSpeedDialPopup.cpp
+ * @brief Speed dial popup class
+ */
+#include <FApp.h>
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include <FGraphics.h>
+#include <FMedia.h>
+
+#include "PhnSpeedDialPopup.h"
+#include "PhnTypes.h"
+#include "PhnAppUtility.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+const int W_POPUP = 620;
+const int H_POPUP = 712;
+const int W_CANCEL_BUTTON = 400;
+const int H_CANCEL_BUTTON = 72;
+const int CANCEL_BUTTON_PADDING = 40;
+const int H_LIST_ITEM = 112;
+const int W_LIST_ITEM = 112;
+const int HORIZONTAL_PADDING = 16;
+const int VERTICAL_PADDING = 110;
+static const wchar_t* IDL_SPEED_DIAL_POPUP = L"IDL_SPEED_DIAL_POPUP";
+
+SpeedDialPopup::SpeedDialPopup(IPopupItemSelectListener& listener)
+ : __pCancelButton(null)
+ , __popupListener(listener)
+ , __pListItemArray(null)
+{
+
+}
+
+SpeedDialPopup::~SpeedDialPopup(void)
+{
+ if (__pListItemArray != null)
+ {
+ delete __pListItemArray;
+ }
+}
+
+int
+SpeedDialPopup::Initialize(void)
+{
+ result r = E_SUCCESS;
+ Construct(IDL_SPEED_DIAL_POPUP);
+ ConstructListData();
+ String strText;
+ __pCancelButton = static_cast<Button*> (GetControl(L"IDC_CLOSE_BUTTON"));
+ __pCancelButton->SetActionId(IDA_BUTTON_CLOSE_SPEED_DIAL_POPUP);
+ __pCancelButton->AddActionEventListener(*this);
+ SetPropagatedKeyEventListener(this);
+
+ ListView* pList = static_cast<ListView*> (GetControl(L"IDC_LISTVIEW"));
+ pList->AddListViewItemEventListener(*this);
+ pList->SetItemProvider(*this);
+ AddControl(pList);
+
+ return r;
+
+}
+
+void
+SpeedDialPopup::ConstructListData(void)
+{
+ __pListItemArray = new (std::nothrow) ArrayList();
+ __pListItemArray->Construct(2);
+ String optionStr = AppUtility::GetResourceString(L"IDS_CHANGE_CONTACT");
+ String* listItem1 = new (std::nothrow) String(optionStr);
+ __pListItemArray->Add(*listItem1);
+ optionStr.Clear();
+ optionStr = AppUtility::GetResourceString(L"IDS_REMOVE_CONTACT");
+ String* listItem2 = new (std::nothrow) String(optionStr);
+ __pListItemArray->Add(*listItem2);
+}
+
+void
+SpeedDialPopup::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId,
+ Tizen::Ui::Controls::ListItemStatus status)
+{
+ Popup::SetShowState(false);
+ if(elementId == -1)
+ {
+ if (index == 0)
+ {
+ elementId = IDA_UPDATE_SPEED_DIAL;
+ }
+ else
+ {
+ elementId = IDA_REMOVE_SPEED_DIAL;
+ }
+ }
+ __popupListener.OnItemSelected(elementId);
+ return;
+}
+
+void
+SpeedDialPopup::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index,
+ Tizen::Ui::Controls::SweepDirection direction)
+{
+ return;
+}
+
+void
+SpeedDialPopup::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId,
+ Tizen::Ui::Controls::ListContextItemStatus state)
+{
+
+ return;
+}
+
+void
+SpeedDialPopup::OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId,
+ bool& invokeListViewItemCallback)
+{
+ return;
+}
+
+int
+SpeedDialPopup::GetItemCount(void)
+{
+ if (__pListItemArray != null)
+ {
+ return __pListItemArray->GetCount();
+ }
+ return 0;
+}
+
+Tizen::Ui::Controls::ListItemBase*
+SpeedDialPopup::CreateItem(int index, int itemWidth)
+{
+ int elementId = 0;
+ String* strText = static_cast<String*>(__pListItemArray->GetAt(index));
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, W_LIST_ITEM), style);
+ if (index == 0)
+ {
+ elementId = IDA_UPDATE_SPEED_DIAL;
+ }
+ else
+ {
+ elementId = IDA_REMOVE_SPEED_DIAL;
+ }
+ pItem->AddElement(Rectangle(HORIZONTAL_PADDING, 0, W_POPUP - HORIZONTAL_PADDING, H_LIST_ITEM), elementId, *strText);
+ return pItem;
+}
+
+bool
+SpeedDialPopup::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+
+void
+SpeedDialPopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case IDA_BUTTON_CLOSE_SPEED_DIAL_POPUP:
+ {
+ Popup::SetShowState(false);
+ __popupListener.OnItemSelected(IDA_BUTTON_CLOSE_SPEED_DIAL_POPUP);
+ break;
+ }
+ }
+}
+
+bool
+SpeedDialPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(Popup::GetShowState() == true)
+ {
+ Popup::SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnSuggestionItemProvider.cpp
+ * @brief Suggestion list item provider class
+ */
+#include <FApp.h>
+#include <FSystem.h>
+#include <FMedia.h>
+#include <FSocial.h>
+#include "PhnAppUtility.h"
+#include "PhnCommonUtils.h"
+#include "PhnDialContactInfo.h"
+#include "PhnDialPresentationModel.h"
+#include "PhnSuggestionItemProvider.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::System;
+using namespace Tizen::Social;
+using namespace Tizen::Base::Collection;
+
+static const int H_LIST_ITEM_HEIGHT = 140;
+static const int X_LIST_DISPNAME = 26;
+static const int Y_LIST_DISPNAME = 22;
+static const int X_LIST_NUMBER = 26;
+static const int Y_LIST_NUMBER = 76;//22+54;
+
+
+SuggestionItemProvider::SuggestionItemProvider(
+ DialPresentationModel& pDialPresentationModel) :
+ __dialPresentationModel(pDialPresentationModel)
+{
+}
+
+SuggestionItemProvider::~SuggestionItemProvider(void)
+{
+}
+
+ListItemBase*
+SuggestionItemProvider::CreateItem(int index, int itemWidth)
+{
+ CustomItem* pItem = null;
+ //Check if any suggestion exist at 'index+1'.
+ DialContactInfo* pDialInfo = __dialPresentationModel.GetSuggestionAtIndex(index+1);
+ if(pDialInfo == null)
+ {
+ return pItem;
+ }
+ //Construct List view item
+ pItem = new (std::nothrow) CustomItem();
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+ pItem->Construct(Dimension(itemWidth, H_LIST_ITEM_HEIGHT), style);
+
+ //create enriched text - Display name with Keyword
+ String* keyWord = pDialInfo->GetSearchKey();
+ EnrichedText* pEnrichedName = DialUtil::ConstructEnrichedTextN(pDialInfo->GetDisplayName(), *keyWord , FONT_SUGGESTION_NAME, Dimension(itemWidth - 40, 60));
+ pItem->AddElement(Rectangle(X_LIST_DISPNAME, Y_LIST_DISPNAME, itemWidth - 100, 60), 202, *pEnrichedName);
+ delete pEnrichedName;
+ pEnrichedName = null;
+
+ //create text element - Phone number with Keyword
+ String phoneNumber(L"");
+ phoneNumber.Append(pDialInfo->GetPhoneNumber());
+ EnrichedText* pEnrichedMobile = DialUtil::ConstructEnrichedTextN(phoneNumber, *keyWord, FONT_SUGGESTION_MOBILE, Dimension(itemWidth - 40, 60));
+ pItem->AddElement(Rectangle(X_LIST_NUMBER, Y_LIST_NUMBER, itemWidth - 100, 48), 204, *pEnrichedMobile);
+ delete pEnrichedMobile;
+ pEnrichedMobile =null;
+
+ //Fetch contact's thumbnail
+ /*Bitmap* pContactBitmap = pDialInfo->GetThumbnailN();
+ //show default TN
+ if(pContactBitmap == null)
+ {
+ pContactBitmap = AppUtility::GetBitmapFromResourcesN(L"C01-1_icon_contacts.png");
+ }
+ pItem->AddElement(Rectangle(445, 16, 96, 96), 206, *pContactBitmap);
+ delete pContactBitmap;*/
+
+ return pItem;
+}
+
+bool
+SuggestionItemProvider::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ if (pItem != null)
+ {
+ delete pItem;
+ pItem = null;
+ }
+ return true;
+}
+
+int
+SuggestionItemProvider::GetItemCount(void)
+{
+ return __dialPresentationModel.GetNumberOfSuggestions() - 1;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabDialer.cpp
+ * @brief The dialer Tab
+ */
+#include <FApp.h>
+#include <FMedia.h>
+#include <FSystem.h>
+#include <FTelephony.h>
+#include "PhnAppUtility.h"
+#include "PhnPhoneApp.h"
+#include "PhnCalllogManager.h"
+#include "PhnCommonUtils.h"
+#include "PhnDialAppForm.h"
+#include "PhnDialContactInfo.h"
+#include "PhnDialerKeypad.h"
+#include "PhnTabDialer.h"
+#include "PhnSceneRegister.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
+
+//Constants
+const int H_SPEEDDIAL_POPUP = 350;
+const int W_SPEEDDIAL_POPUP = 720;
+const int H_POPUP_MSG_LABEL = 100;
+const int H_POPUP_BTN = 90;
+const int H_SEARCHLIST_ITEM = 140;
+const int IDI_PADDING = 15;
+const int IDI_MAX_LIMIT_LENGTH = 18;
+const int IDI_MAX_TXT_FONT = 94;
+const int IDI_MIN_TXT_FONT = 67;
+const int IDI_DELTA_FONT_SIZE = 5;
+const int MAX_SEARCH_LIST_ITEMS = 6;
+const int MAX_SEARCH_LIST_ITEMS_LANDSCAPE = 2;
+const int MIN_CONTEXT_MENU_ITEMS = 1;
+const int X_CONTEXT_MENU_ANCHOR = 57;
+const int Y_CONTEXT_MENU_ANCHOR = 1218;
+const int X_CONTEXT_MENU_LANDSCAPE_ANCHOR = 666;
+const int Y_CONTEXT_MENU_LANDSCAPE_ANCHOR = 545;
+const int X_CALL_CONTEXT_MENU_ANCHOR = 360;
+const int Y_CALL_CONTEXT_MENU_ANCHOR = 1168;
+const int X_CALL_CONTEXT_MENU_LANDSCAPE_ANCHOR = 815;
+const int Y_CALL_CONTEXT_MENU_LANDSCAPE_ANCHOR = 650;
+const int MAX_NUMBER_WITH_SEPERATOR = 12;
+const int MIN_NUMBER_WITH_ONE_SEPERATOR = 3;
+const int MIN_NUMBER_WITH_TWO_SEPERATOR = 7;
+const int MAX_TXT_LENGTH_WITH_SEPERATOR = 11;
+const int MAX_TXT_LENGTH_WITHOUT_SEPERATOR = 9;
+const int MAX_VISIBLE_TXT_WITH_MIN_FONT = 15;
+const int W_MORE_BUTTON = 74;
+const int H_MORE_BUTTON = 74;
+const int W_SUGGESTION_POPUP_BUBBLE_ICON = 40;
+const int H_SUGGESTION_POPUP_BUBBLE_ICON = 20;
+const int IDI_RIGHT_MARGIN_USE_CONTACT_BTN = 200;
+const int ELLIPSIS_LENGTH = 15;
+const int X_LIST_DISPNAME = 26;
+const int RIGHT_MARGIN_DROPDOWNBUTTON = 26;
+
+//resources
+static const wchar_t* IDL_PANEL_DIALER = L"IDL_PANEL_DIALER";
+const wchar_t* IDC_NUMERIC_EDITFIELD = L"IDC_EDITFIELD";
+const wchar_t* IDC_PANEL_SEARCH_BOX = L"IDC_PANEL_SEARCH_BOX";
+const wchar_t* IDC_BUTTON_ADD_CONTACTS = L"IDC_BUTTON_ADD_CONTACTS";
+const wchar_t* IDC_BUTTON_USE_CONTACT = L"IDC_BUTTON_USE_CONTACT";
+const wchar_t* IDC_BUTTON_DROP_DOWN = L"IDC_BUTTON_DROP_DOWN";
+//const wchar_t* IDC_BUTTON_PULL_UP = L"IDC_BUTTON_PULL_UP";
+const wchar_t* IDC_PANEL_SEARCH_LIST = L"IDC_PANEL_SEARCH_LIST";
+const wchar_t* IDC_PANEL_MENU = L"IDC_PANEL_MENU";
+const wchar_t* IDC_BUTTON_MENU = L"IDC_BUTTON_MENU";
+const wchar_t* IDC_LISTVIEW_SEARCH = L"IDC_LISTVIEW_SEARCH";
+const wchar_t* IDC_BUTTON_SEARCHFIELD = L"IDC_BUTTON_SEARCHFIELD";
+const wchar_t* IDC_BUTTON_SEARCHICON = L"IDC_BUTTON_SEARCHICON";
+const wchar_t* IDC_LABEL_LASTROW_BG = L"IDC_LABEL_LASTROW_BG";
+const wchar_t* IDC_PANEL_DROPDOWN = L"IDC_PANEL_DROPDOWN";
+const wchar_t* IDC_PANEL_USE_CONTACT = L"IDC_PANEL_USE_CONTACT";
+const wchar_t* IDC_SPEED_DIAL_TXT_LABEL = L"IDC_SPEED_DIAL_TXT_LABEL";
+const wchar_t* IDC_BUTTON_CLEAR = L"IDC_BUTTON_CLEAR";
+
+
+
+//Button Dimensions
+const int DialTabDialer::IDI_BGBITMAP_WIDTH = 75;
+const int DialTabDialer::IDI_BGBITMAP_HEIGHT = 75;
+const int DialTabDialer::IDI_BGBITMAP_POS_X = 56;
+const int DialTabDialer::IDI_BGBITMAP_POS_Y = 56;
+const int DialTabDialer::IDI_TEXT1_SIZE = 116;
+const int DialTabDialer::IDI_TEXT2_SIZE = 40;
+const int MAXUSECONTACTNAMELENGTH = 20;
+const int MAXUSECONTACTNUMBERLENGTH = 27;
+
+//color
+const unsigned int COLOR_SEARCHLIST_BG = Color32<248, 246, 239>::Value;
+const unsigned int COLOR_SEARCHLIST_PRESS_BG = Color32<87, 135, 194>::Value;
+
+DialTabDialer::DialTabDialer(void)
+{
+ AppLogDebug("ENTER");
+ __pDialPresentationModel = null;
+ __pSuggestionListProvider = null;
+ __pSearchListView = null;
+ __isSearchListOpened = false;
+ __pErrorMsgPopup = null;
+ __pCallContextMenu = null;
+ __pDialKeypad = null;
+ __pConfirmationPopup = null;
+ __isAppForeground = true;
+ __pAddressBook = null;
+ __isAppControlLaunched = false;
+ __dialerState = DIALER_STATE_FIRST_SCENE;
+ __pOptionMenu = null;
+ __isClearKeyIgnore = false;
+ AppLogDebug("EXIT");
+}
+
+DialTabDialer::~DialTabDialer(void)
+{
+ AppLogDebug("ENTER");
+
+ if(__pDialKeypad != null)
+ {
+ __pDialKeypad = null;
+ }
+ if(__pConfirmationPopup != null)
+ {
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
+ if (__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ __pAddressBook = null;
+ }
+ if(__pErrorMsgPopup != null)
+ {
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ }
+ delete __pOptionMenu;
+ delete __pCallContextMenu;
+ AppLogDebug("EXIT");
+}
+
+bool
+DialTabDialer::Initialize(void)
+{
+ AppLogDebug("ENTER");
+ result r = Construct(IDL_PANEL_DIALER);
+ TryCatch(r == E_SUCCESS, , "DialTabDialer::Initialise() - Fail to initialise Dialer panel");
+ return true;
+ CATCH:
+ return false;
+}
+
+result
+DialTabDialer::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ // Layout setting
+ Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return E_FAILURE;
+ }
+
+ __pDialPresentationModel = new DialPresentationModel(*this);
+ __pSuggestionListProvider = new SuggestionItemProvider(*__pDialPresentationModel);
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(pForm->GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetHorizontalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetVerticalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetRelation(*this,pForm,RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(pForm->GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetHorizontalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetVerticalFitPolicy(*this, FIT_POLICY_PARENT);
+ delete pRelativeLayout;
+ }
+
+ //hide footer
+ pForm->GetFooter()->SetShowState(false);
+
+ //Construct menu
+ ConstructSearchMenu();
+ //Initialize text box
+ InitializeContactsTextBox();
+ //Create and hide Search data display panel
+ InitializeSearchBox();
+ //initialize search list view and hide it.
+ InitializeSearchListView();
+ HideSearchListView();
+ //Construct keypad
+ ConstructKeypad();
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+DialTabDialer::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ if (__pDialPresentationModel != null)
+ {
+ delete __pDialPresentationModel;
+ __pDialPresentationModel = null;
+ }
+ if (__pSuggestionListProvider != null)
+ {
+ delete __pSuggestionListProvider;
+ __pSuggestionListProvider = null;
+ }
+ // Add your termination code here
+ return r;
+}
+
+void
+DialTabDialer::InitializeContactsTextBox(void)
+{
+ AppLogDebug("ENTER");
+
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField != null)
+ {
+ pEditField->SetPropagatedKeyEventListener(this);
+ //clear text
+ pEditField->SetOverlayKeypadCommandButtonVisible(false);
+ pEditField->Clear();
+ }
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::ShowFormattedText(EditField* pEditField, String contactNumber)
+{
+ contactNumber.Replace(L"-",L"");
+ int textLength = contactNumber.GetLength();
+ if(textLength == 0)
+ {
+ pEditField->Clear();
+ pEditField->Invalidate(true);
+ AppLogDebug("EXIT");
+ return;
+ }
+ int fontSize = IDI_MAX_TXT_FONT;
+ textLength = contactNumber.GetLength();
+
+ //need to change font to fit inside text box
+ //With size 94 -> 12 chars, 67 -> 18 chars
+ for(int count =1; count <= textLength; count++)
+ {
+ if(count > MAX_TXT_LENGTH_WITHOUT_SEPERATOR)
+ {
+ //appending
+ fontSize -= IDI_DELTA_FONT_SIZE;
+ }
+ }
+ if(fontSize > IDI_MAX_TXT_FONT)
+ {
+ fontSize = IDI_MAX_TXT_FONT;
+ }
+ if(fontSize < IDI_MIN_TXT_FONT)
+ {
+ fontSize = IDI_MIN_TXT_FONT;
+ }
+ //Insert separator if required
+ if(textLength < MAX_NUMBER_WITH_SEPERATOR)
+ {
+ if(textLength > MIN_NUMBER_WITH_TWO_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_TWO_SEPERATOR);
+ }
+ if(textLength > MIN_NUMBER_WITH_ONE_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_ONE_SEPERATOR);
+ }
+ }
+ //update text length
+ pEditField->SetTextSize(fontSize);
+ //set text to edit field
+ pEditField->SetText(contactNumber);
+ //pEditField->SetFocus();
+ pEditField->SetCursorPosition(contactNumber.GetLength()+1);
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::ShowFormattedText(EditField* pEditField, int actionId)
+{
+ AppLogDebug("ENTER");
+ bool clearflag = false;
+ int startpos=-1,endpos=-1;
+ pEditField->GetBlockRange(startpos,endpos);
+ AppLogDebug("GetBlockRange %d %d",startpos,endpos);
+
+
+ if(pEditField->IsBlocked() || startpos != -1)
+ {
+ if(actionId == CLEAR_KEY)
+ {
+ SetIgnoreClearKey(false);
+ clearflag = true;
+ }
+ pEditField->Remove();
+ pEditField->ReleaseBlock();
+
+ }
+ if((actionId != CLEAR_KEY) && (pEditField->GetRemainingLength()==0))
+ {
+ return;
+ }
+
+ String contactNumber = pEditField->GetText();
+ int intialCursorPos = pEditField->GetCursorPosition();
+ if(actionId == CLEAR_KEY && intialCursorPos == 0)
+ {
+ return;
+ }
+
+ if(pEditField->GetText().Contains(L"-"))
+ {
+ if( intialCursorPos > MIN_NUMBER_WITH_ONE_SEPERATOR)
+ {
+ intialCursorPos--;
+ }
+ if(intialCursorPos > MIN_NUMBER_WITH_TWO_SEPERATOR)
+ {
+ intialCursorPos--;
+ }
+ }
+
+ contactNumber.Replace(L"-",L"");
+
+ if(actionId == CLEAR_KEY)
+ {
+ if(clearflag == false)
+ {
+ contactNumber.Remove(intialCursorPos-1,1);
+ intialCursorPos--;
+ }
+ }
+ else
+ {
+ contactNumber.Insert(DialUtil::ConvertDialedNumberToString(actionId),intialCursorPos);
+ intialCursorPos++;
+ }
+
+
+ int textLength = contactNumber.GetLength();
+ if(textLength == 0)
+ {
+ pEditField->Clear();
+ pEditField->Invalidate(true);
+ AppLogDebug("EXIT");
+ return;
+ }
+
+ //Insert separator if required
+ if(textLength < MAX_NUMBER_WITH_SEPERATOR)
+ {
+ if(textLength > MIN_NUMBER_WITH_TWO_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_TWO_SEPERATOR);
+ if(intialCursorPos > MIN_NUMBER_WITH_TWO_SEPERATOR)
+ {
+ intialCursorPos++;
+ }
+ }
+ if(textLength > MIN_NUMBER_WITH_ONE_SEPERATOR)
+ {
+ contactNumber.Insert(L"-",MIN_NUMBER_WITH_ONE_SEPERATOR);
+ if(intialCursorPos > MIN_NUMBER_WITH_ONE_SEPERATOR)
+ {
+ intialCursorPos++;
+ }
+
+ }
+ }
+ //update text length
+ textLength = contactNumber.GetLength();
+
+ //need to change font to fit inside text box
+ //With size 94 -> 12 chars, 67 -> 18 chars
+ int fontSize = pEditField->GetTextSize();
+ if((actionId == CLEAR_KEY) && (textLength < MAX_VISIBLE_TXT_WITH_MIN_FONT))
+ {
+ //clearing
+ fontSize += IDI_DELTA_FONT_SIZE;
+ }
+ else if(textLength > MAX_TXT_LENGTH_WITH_SEPERATOR)
+ {
+ //appending
+ fontSize -= IDI_DELTA_FONT_SIZE;
+ }
+
+ if(fontSize > IDI_MAX_TXT_FONT)
+ {
+ fontSize = IDI_MAX_TXT_FONT;
+ }
+ if(fontSize < IDI_MIN_TXT_FONT)
+ {
+ fontSize = IDI_MIN_TXT_FONT;
+ }
+ pEditField->SetTextSize(fontSize);
+ //set text to edit field
+ pEditField->SetText(contactNumber);
+ //pEditField->SetFocus();
+ pEditField->SetCursorPosition(intialCursorPos);
+ AppLogDebug("EXIT");
+ return;
+}
+
+//search box
+void
+DialTabDialer::InitializeSearchBox(void)
+{
+ AppLogDebug("ENTER");
+
+ //search panel
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+ pSearchPanel->SetShowState(false);
+
+ //"Add to contacts" button
+ Button* pButtonAddContacts = static_cast<Button*>(GetControl(IDC_BUTTON_ADD_CONTACTS, true));
+ pButtonAddContacts->SetEffectSoundEnabled(false);
+ pButtonAddContacts->SetActionId(IDA_BTN_ADD_TO_CONTACTS);
+ pButtonAddContacts->AddActionEventListener(*this);
+ pButtonAddContacts->SetShowState(false);
+
+ //"Use Contacts" button
+ Button* pButtonContacts = static_cast<Button*>(GetControl(IDC_BUTTON_USE_CONTACT, true));
+ pButtonContacts->SetActionId(IDA_BTN_USE_CONTACT_DATA);
+ pButtonContacts->AddActionEventListener(*this);
+ //"Drop-Down" Button
+ Button* pButtonDropDown = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ pButtonDropDown->SetActionId(IDA_BTN_DISPLAY_CONTACTS);
+ pButtonDropDown->AddActionEventListener(*this);
+
+ pSearchPanel->Invalidate(true);
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::UpdateSearchResults(void)
+{
+ AppLogDebug("ENTER");
+
+ __pDialPresentationModel->ClearSearchResults();
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ //send request to search for suggestion list
+ String searchStr = pEditField->GetText();
+ searchStr.Replace(L"-",L"");
+ if(searchStr.IsEmpty() == false)
+ {
+ __pDialPresentationModel->FetchSuggestionList(searchStr);
+ }
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::HideSearchBox(void)
+{
+ Button* pButtonAddContacts = static_cast<Button*>(GetControl(IDC_BUTTON_ADD_CONTACTS, true));
+ pButtonAddContacts->SetShowState(false);
+ Button* pButtonContacts = static_cast<Button*>(GetControl(IDC_BUTTON_USE_CONTACT, true));
+ Button* pButtonDropDown = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ pButtonContacts->SetShowState(true);
+ pButtonDropDown->SetShowState(true);
+
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+ pSearchPanel->SetShowState(false);
+ pSearchPanel->Invalidate(true);
+
+ HideSearchListView();
+ return;
+}
+
+void
+DialTabDialer::InitializeSearchListView(void)
+{
+ //update new bounds
+ __pSearchListView = static_cast<ListView*>(GetControl(IDC_LISTVIEW_SEARCH,true));
+ if(__pSearchListView != null)
+ {
+ __pSearchListView->SetItemProvider(*__pSuggestionListProvider);
+ __pSearchListView->AddListViewItemEventListener(*this);
+ __pSearchListView->SetBackgroundColor(Color(COLOR_SEARCHLIST_BG));
+ Panel* pSearchListPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_LIST, true));
+ SetControlAlwaysOnTop(*pSearchListPanel, true);
+
+ }
+}
+
+void
+DialTabDialer::ShowSearchListView(void)
+{
+ AppLogDebug("ENTER");
+
+ Form* pForm = dynamic_cast<Form *>(GetParent());
+ if(pForm == null)
+ {
+ AppLog("pForm == null");
+ return;
+ }
+ //find the no. of search rows to be shown - Maximum 5 can be shown.
+ int noOfItems = MAX_SEARCH_LIST_ITEMS;
+ if(pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ noOfItems = MAX_SEARCH_LIST_ITEMS_LANDSCAPE;
+ }
+ if(__pDialPresentationModel->GetNumberOfSuggestions() < (noOfItems+1))
+ {
+ noOfItems = __pDialPresentationModel->GetNumberOfSuggestions() - 1;
+ }
+ if(noOfItems <= 0)
+ {
+ return;
+ }
+
+ if(pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ if(noOfItems > 1)
+ {
+ SetShiftedPosUseContact();
+ }
+ else if(noOfItems <= 1)
+ {
+ SetOrigPosUseContact();
+ }
+ }
+
+ Panel* pSearchListPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_LIST, true));
+ Rectangle searchPanelbounds = pSearchListPanel->GetBounds();
+ if(pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ if(noOfItems > 1)
+ {
+ searchPanelbounds.y = 360;
+ searchPanelbounds.height = 500;
+ }
+ if(noOfItems <= 1)
+ {
+ searchPanelbounds.y = 480;
+ searchPanelbounds.height = 250;
+
+ }
+ }
+ pSearchListPanel->SetBounds(searchPanelbounds);
+ pSearchListPanel->SetShowState(true);
+ pSearchListPanel->InvalidateBounds(searchPanelbounds);
+
+
+ if (__pSearchListView != null)
+ {
+ //update new bounds
+ Rectangle searchListbounds = __pSearchListView->GetBounds();
+ if(pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ searchListbounds.height = H_SEARCHLIST_ITEM * noOfItems;
+ if(__pDialKeypad != null)
+ {
+ __pDialKeypad->SetFocusToButtons(false, false);
+ }
+ }
+ else
+ {
+ searchListbounds.height = H_SEARCHLIST_ITEM * noOfItems;
+ AppLog("noOfItems= %d", noOfItems);
+ if(noOfItems > 0)
+ {
+ __pDialKeypad->SetFocusToButtons(true, false);
+ }
+ else
+ {
+ __pDialKeypad->SetFocusToButtons(true, true);
+ }
+ }
+ __pSearchListView->SetMinimumSize(Dimension(searchListbounds.width - 100,searchListbounds.height));
+ __pSearchListView->SetBounds(searchListbounds);
+ if(pSearchListPanel->GetBounds().y + __pSearchListView->GetBounds().height > pForm->GetClientAreaBounds().height)
+ {
+ searchListbounds.height -= (pSearchListPanel->GetBounds().y + __pSearchListView->GetBounds().height) - pForm->GetClientAreaBounds().height;
+ __pSearchListView->SetMinimumSize(Dimension(searchListbounds.width - 100,searchListbounds.height));
+ __pSearchListView->SetBounds(searchListbounds);
+ }
+ __pSearchListView->InvalidateBounds(searchListbounds);
+ __pSearchListView->SetItemProvider(*__pSuggestionListProvider);
+ __pSearchListView->UpdateList();
+ __pSearchListView->ScrollToItem(0);
+
+ }
+
+ //"Pull UP" Button
+ Button* pButtonPullUp = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ Canvas pCanvasNormalPullUp;
+ pCanvasNormalPullUp.Construct(pButtonPullUp->GetBounds());
+ Canvas pCanvasPressedPullUp;
+ pCanvasPressedPullUp.Construct(pButtonPullUp->GetBounds());
+ int resultCount = __pDialPresentationModel->GetNumberOfSuggestions();
+ //Add text, Bg to normal state
+ DialUtil::Draw9PatchToCanvas(pCanvasNormalPullUp, IDB_BTN_OPTION_BG_ICON);
+ DialUtil::DrawTextToCanvas(Integer::ToString(resultCount), FONT_EXPAND_BUTTON_TEXT, pCanvasNormalPullUp, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_UP_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasNormalPullUp, POSITION_BOTTOM_CENTER);
+ //Add text, Bg to pressed state
+ DialUtil::Draw9PatchToCanvas(pCanvasPressedPullUp, IDB_BTN_OPTION_PRESS_BG_ICON);
+ DialUtil::DrawTextToCanvas(Integer::ToString(resultCount), FONT_EXPAND_BUTTON_TEXT, pCanvasPressedPullUp, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_UP_PRESS_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasPressedPullUp, POSITION_BOTTOM_CENTER);
+ //add background to button
+ DialUtil::DrawCanvasToButton(&pCanvasNormalPullUp, &pCanvasPressedPullUp, pButtonPullUp);
+ __isSearchListOpened = true;
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::HideSearchListView(void)
+{
+ AppLog("Enter");
+ Panel* pSearchListPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_LIST, true));
+ pSearchListPanel->SetShowState(false);
+ pSearchListPanel->Invalidate(true);
+
+ Button* pButtonDropDown = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ pButtonDropDown->SetShowState(true);
+ pButtonDropDown->Invalidate(true);
+ if(__pDialKeypad != null)
+ {
+ __pDialKeypad->SetFocusToButtons(true, true);
+ }
+
+ //"DropDown" Button
+ if (__isSearchListOpened == true)
+ {
+ Canvas pCanvasNormalDropDown;
+ pCanvasNormalDropDown.Construct(pButtonDropDown->GetBounds());
+ Canvas pCanvasPressedDropDown;
+ pCanvasPressedDropDown.Construct(pButtonDropDown->GetBounds());
+ int resultCount = __pDialPresentationModel->GetNumberOfSuggestions();
+ //Add text, Bg to normal state
+ DialUtil::Draw9PatchToCanvas(pCanvasNormalDropDown, IDB_BTN_OPTION_BG_ICON);
+ DialUtil::DrawTextToCanvas(Integer::ToString(resultCount), FONT_EXPAND_BUTTON_TEXT, pCanvasNormalDropDown, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasNormalDropDown, POSITION_BOTTOM_CENTER);
+ //Add text, Bg to pressed state
+ DialUtil::Draw9PatchToCanvas(pCanvasPressedDropDown, IDB_BTN_OPTION_PRESS_BG_ICON);
+ DialUtil::DrawTextToCanvas(Integer::ToString(resultCount), FONT_EXPAND_BUTTON_TEXT, pCanvasPressedDropDown, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_PRESS_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasPressedDropDown, POSITION_BOTTOM_CENTER);
+ //add background to button
+ DialUtil::DrawCanvasToButton(&pCanvasNormalDropDown, &pCanvasPressedDropDown, pButtonDropDown);
+ }
+ __isSearchListOpened = false;
+
+ return;
+}
+
+void
+DialTabDialer::ShowSearchGadget(void)
+{
+ //Commenting as search is not supported for 2.1
+ /*Button* pButtonSearchIcon = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHICON, true));
+ pButtonSearchIcon->SetShowState(true);
+ Button* pButtonSearchField = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHFIELD, true));
+ pButtonSearchField->SetShowState(true);
+ Button* pButtonClear = static_cast<Button*>(GetControl(IDC_BUTTON_KEYPADCLEAR, true));
+ pButtonClear->SetShowState(false);
+ Invalidate(true);*/
+ return;
+}
+
+
+void
+DialTabDialer::HideSearchGadget(void)
+{
+ //Commenting as search is not supported for 2.1
+ /*Button* pButtonSearchIcon = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHICON, true));
+ pButtonSearchIcon->SetShowState(false);
+ Button* pButtonSearchField = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHFIELD, true));
+ pButtonSearchField->SetShowState(false);
+ Button* pButtonClear = static_cast<Button*>(GetControl(IDC_BUTTON_KEYPADCLEAR, true));
+ pButtonClear->SetShowState(true);*/
+ return;
+}
+
+
+void
+DialTabDialer::ConstructSearchMenu(void)
+{
+ AppLogDebug("ENTER");
+
+ //Construct button for menu open and close
+ Button* pButtonSearchField = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHFIELD, true));
+ pButtonSearchField->SetActionId(IDA_SEARCH_FIELD);
+ pButtonSearchField->AddActionEventListener(*this);
+ Button* pButtonSearchIcon = static_cast<Button*>(GetControl(IDC_BUTTON_SEARCHICON, true));
+ pButtonSearchIcon->SetActionId(IDA_SEARCH_ICON);
+ pButtonSearchIcon->AddActionEventListener(*this);
+ //Hiding as search is not supported for 2.1
+ pButtonSearchIcon->SetShowState(false);
+ pButtonSearchField->SetShowState(false);
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::ConstructKeypad(void)
+{
+ AppLogDebug("ENTER");
+ //Construct Alpha numeric Keypad
+ if(__pDialKeypad == null)
+ {
+ __pDialKeypad = new (std::nothrow) DialerKeypad(__dialerState);
+ __pDialKeypad->ConstructPanel(this, this, this);
+ //add keypad to dial panel
+ AddControl(__pDialKeypad);
+ __pDialKeypad->AddListenersToLastRowButtons();
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppLogDebug("ENTER");
+ //When outgoing call is made and immediately before a call is made if
+ // we switch to logs then __isAppControlLaunched wont be set to false anywhere else
+ //as OnforeGround of logs will get called instead . Hence Keypad wont work.
+ SetAppControlLaunched(false);
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pEditField != null)
+ {
+ pEditField->SetFocus();
+ }
+ String editText(L"");
+
+ //While coming from Logs scene, disable footer
+ Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ AppLog("pForm == null");
+ return;
+ }
+ pForm->GetFooter()->SetShowState(false);
+ pForm->AddOrientationEventListener(*this);
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+ Label* pLastRowLabel = static_cast<Label*>(GetControl(IDC_LABEL_LASTROW_BG, true));
+ OrientationStatus orientationStatus = pForm->GetOrientationStatus();
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ pLastRowLabel->SetShowState(false);
+ }
+ else if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ pLastRowLabel->SetShowState(true);
+ }
+
+ //If opened as AppControl then it is either from Single Active Call
+ //or Conf. Call screen with 'Add Call' scenario.
+ __dialerState = DIALER_STATE_FIRST_SCENE;
+ if (pPhoneApp->IsOpenAsAppControl() == true)
+ {
+ AppLogDebug("IsOpenAsAppControl");
+ __dialerState = DIALER_STATE_ADD_CALL_APPCONTROL;
+ if(pArgs != null)
+ {
+ String* pPhoneNumber = static_cast<String*>(pArgs->GetAt(0));
+ if(pPhoneNumber != null && pPhoneNumber->IsEmpty() == false)
+ {
+ AppLogDebug("DIALER_STATE_NORMAL_APPCONTROL");
+ //From AppControl request for normal call
+ editText.Append(*pPhoneNumber);
+ __dialerState = DIALER_STATE_NORMAL_APPCONTROL;
+ }
+ delete pArgs;
+ pArgs = null;
+ }
+ else
+ {
+ if(pEditField != null)
+ {
+ editText = pEditField->GetText();
+ }
+ }
+ }
+ else
+ {
+ if(pEditField != null)
+ {
+ editText = pEditField->GetText();
+ }
+ }
+
+ if(__pDialKeypad != null)
+ {
+ if(__dialerState == DIALER_STATE_ADD_CALL_APPCONTROL)
+ {
+ __pDialKeypad->SetKeypadTone(false);
+ }
+ else
+ {
+ __pDialKeypad->SetKeypadTone(true);
+ }
+ }
+
+ //If this is not an AppControlRequest and editText is empty, then fetch auto area code.
+ if(editText.IsEmpty() == true)
+ {
+ //Fetch auto area code setting, if present
+ SettingsPresentationModel::GetInstance()->GetActivePrefixDialNumber(editText);
+ if(editText.IsEmpty() == false)
+ {
+ editText.Replace(L"P",L";");
+ editText.Replace(L"p",L";");
+ }
+ }
+
+ if(pEditField != null)
+ {
+ ShowFormattedText(pEditField,editText);
+ pEditField->SetFocus();
+ pEditField->Invalidate(true);
+ __pDialPresentationModel->ClearSearchResults();
+ //show search results
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+
+ if (__pDialKeypad != null)
+ {
+ __pDialKeypad->SetBitmapToKeypadButtons();
+ __pDialKeypad->Invalidate(true);
+ }
+ pPhoneApp->AddAppStateChangeListener(*this);
+ //Add address book listener to listen to contacts changed events
+ if(__pAddressBook != null)
+ {
+ __pAddressBook->SetAddressbookChangeEventListener(this);
+ }
+ //Set the last row position and height programatically
+ Panel* plastRowPanel = static_cast<Panel*>(GetParent()->GetControl(IDC_PANEL_LASTROW,true));
+ int yPos = pForm->GetClientAreaBounds().height - plastRowPanel->GetBounds().height;
+ plastRowPanel->SetPosition(0,yPos);
+ Invalidate(true);
+ if(pEditField != null)
+ {
+ pEditField->AddTextEventListener(*this);
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ AppLogDebug("ENTER");
+ //While coming from Logs scene, disable footer
+ Form* pForm = static_cast<Form*>(GetParent());
+ pForm->RemoveOrientationEventListener(*this);
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ //hide search result list, if shown.
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+
+ if(__pConfirmationPopup != null)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ }
+ pPhoneApp->RemoveAppStateChangeListener(*this);
+ //remove contact change event listener
+ if(__pAddressBook != null)
+ {
+ __pAddressBook->SetAddressbookChangeEventListener(null);
+ }
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ /*Commented due to defect N_SE_52186
+ int startpos=-1,endpos=-1;
+ pEditField->GetBlockRange(startpos,endpos);
+ AppLogDebug("GetBlockRange %d %d",startpos,endpos);
+ if(startpos != -1)
+ {
+ pEditField->Remove();
+ pEditField->ReleaseBlock();
+ }*/
+ pEditField->RemoveTextEventListener(*this);
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::OnActionPerformed(const Control& source, int actionId)
+{
+ AppLogDebug("ENTER");
+
+ PhoneApp* pApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField == null || GetAppControlLaunched() == true)
+ {
+ AppLogDebug("GetAppControlLaunched() == true");
+ return;
+ }
+
+ switch (actionId)
+ {
+ case IDA_SEARCH_FIELD:
+ case IDA_SEARCH_ICON:
+ {
+ //Put Search click launch code here
+ AppLog("Search ICON/Field Clicked");
+ AppManager* pAppManager = AppManager::GetInstance();
+ pAppManager->LaunchApplication(PROVIDER_ID_CONTACTS);
+ }
+ break;
+
+ case IDA_BTN_SHOW_CONTEXTMENU:
+ {
+ // Show the ContextMenu
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ ShowOptionsMenu();
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+ }
+ break;
+
+ case NUM_KEY1:
+ case NUM_KEY2:
+ case NUM_KEY3:
+ case NUM_KEY4:
+ case NUM_KEY5:
+ case NUM_KEY6:
+ case NUM_KEY7:
+ case NUM_KEY8:
+ case NUM_KEY9:
+ case NUM_KEY0:
+ case CLEAR_KEY:
+ case HASH_KEY:
+ {
+ //append / clear last character to contact
+ int oldtextlen = pEditField->GetTextLength();
+ ShowFormattedText(pEditField, actionId);
+ if (pEditField->GetTextLength() == 0)
+ {
+ __pDialPresentationModel->ClearSearchResults();
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ if(oldtextlen != pEditField->GetTextLength())
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+ }
+ break;
+
+ case CALL_KEY:
+ {
+ //If context menu is shown do not trigger call
+ //As platform sends release event when context menu is shown
+ if(__pCallContextMenu != null && __pCallContextMenu->GetShowState() == true)
+ {
+ return;
+ }
+ if (pEditField->GetTextLength() > 0)
+ {
+ Button* pButtonCall = static_cast<Button*>(GetControl(IDC_BUTTON_CALL, true));
+ pButtonCall->SetFocus();
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ // Regular expression to check the beginning is with Pause/Wait
+ String phoneNumberPattern(L"^(,|;)");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If phone number starts with , or ; then show an error popup
+ bool resultMatch = checkPhoneNumber.Match(contactNo,false);
+ if(resultMatch == true)
+ {
+ MessageBox numberStartsWithPW;
+ String msg(L"Phone number ");
+ msg.Append(contactNo);
+ msg.Append(L" is Invalid");
+ numberStartsWithPW.Construct(L"Invalid Number", msg, MSGBOX_STYLE_NONE,3000);
+ int modalResult = 0;
+ numberStartsWithPW.ShowAndWait(modalResult);
+ return;
+ }
+ if (DialOutgoingCall(contactNo) == true)
+ {
+ __pDialPresentationModel->ClearSearchResults();
+ pEditField->Clear();
+ pEditField->SetTextSize(IDI_MAX_TXT_FONT);
+ pEditField->Invalidate(true);
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ return;
+ }
+ else
+ {
+ //show latest dialed or incoming number from Logs
+ String* number = __pDialPresentationModel->FetchLatestNumberFromLogsN();
+ if(number != null)
+ {
+ ShowFormattedText(pEditField,*number);
+ UpdateSearchResults();
+ HideSearchGadget();
+ delete number;
+ }
+ }
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ ShowFormattedText(pEditField,STAR_KEY);
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+ break;
+
+ /*case HASH_KEY:
+ {
+ pEditField->AppendText(L"#");
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+ break;*/
+
+/* case VIDEOCALL_KEY:
+ {
+ //Not yet Supported
+ }
+ break;*/
+
+ case CANCEL_KEY:
+ {
+ if(pApp->IsOpenAsAppControl() == true)
+ {
+ pApp->Terminate();
+ return;
+ }
+ }
+ break;
+
+ case IDA_BTN_ADD_TO_CONTACTS:
+ {
+ if(pEditField->GetTextLength() > 0)
+ {
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ result r = __pDialPresentationModel->LaunchAddContactsAppControl(contactNo);
+ if (r == E_SUCCESS)
+ {
+ //This is fix for N_SE-46530
+ Button* pButtonAddContacts = static_cast<Button*>(GetControl(IDC_BUTTON_ADD_CONTACTS, true));
+ pButtonAddContacts->SetFocus();
+ SetAppControlLaunched(true);
+ }
+ return;
+ }
+ }
+ break;
+
+ case IDA_SPEEDDIAL_POPUP_YES:
+ {
+ if(__pConfirmationPopup != null)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ }
+ SwitchToSpeedDialForm();
+ }
+ break;
+
+ case IDA_SPEEDDIAL_POPUP_NO:
+ {
+ if(__pConfirmationPopup != null)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ }
+ }
+ break;
+
+ case IDA_MENU_ADD_PAUSE:
+ {
+ AddPause();
+ }
+ break;
+
+ case IDA_MENU_ADD_WAIT:
+ {
+ AddWait();
+ }
+ break;
+
+ case IDA_MENU_EXIT:
+ {
+ //Close Phone App
+ pApp->Terminate();
+ return;
+ }
+ break;
+
+ case IDA_MENU_SEND_MESSAGE:
+ {
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ String tempContactNumber;
+ int commaIndex = 0;
+ int semiColonIndex = 0;
+ int index = 0;
+ contactNo.IndexOf(",", 0, commaIndex);
+ contactNo.IndexOf(";", 0, semiColonIndex);
+
+ if(commaIndex != -1 && semiColonIndex != -1)
+ {
+ index = commaIndex < semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else if(commaIndex != -1 || semiColonIndex != -1)
+ {
+ index = commaIndex > semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else
+ {
+ index = contactNo.GetLength();
+ }
+ contactNo.SubString(0, index, tempContactNumber);
+ result r = __pDialPresentationModel->OpenMessagingAppControl(tempContactNumber);
+ if(r == E_SUCCESS)
+ {
+ SetAppControlLaunched(true);
+ }
+ return;
+ }
+ break;
+
+ case IDA_MENU_SPEED_DIAL:
+ {
+ SwitchToSpeedDialForm();
+ return;
+ }
+ break;
+
+ case IDA_BTN_USE_CONTACT_DATA:
+ {
+ DialContactInfo* pDialInfo = __pDialPresentationModel->GetSuggestionAtIndex(0);
+ if(pDialInfo != null)
+ {
+ //fetch contact number
+ String phNumber = pDialInfo->GetPhoneNumber();
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ if(phNumber.Equals(contactNo) == false)
+ {
+ pEditField->Clear();
+ ShowFormattedText(pEditField,phNumber);
+ pEditField->Invalidate(true);
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+ UpdateSearchResults();
+ }
+ }
+ }
+ break;
+
+ case IDA_BTN_DISPLAY_CONTACTS:
+ {
+ if (__isSearchListOpened == true)
+ {
+ Form* pForm = dynamic_cast<Form *>(GetParent());
+ int noOfItems = MAX_SEARCH_LIST_ITEMS;
+ if(__pDialPresentationModel->GetNumberOfSuggestions() < (noOfItems+1))
+ {
+ noOfItems = __pDialPresentationModel->GetNumberOfSuggestions() - 1;
+ }
+ if(pForm != null && (pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+ {
+ if(noOfItems > 1)
+ {
+ SetOrigPosUseContact();
+ }
+ }
+ HideSearchListView();
+ }
+ else
+ {
+ ShowSearchListView();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ pEditField->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::OnLongPressGestureDetected(TouchLongPressGestureDetector& gestureDetector)
+{
+ AppLogDebug("ENTER");
+ Form *pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return;
+ }
+ if (GetAppControlLaunched() == true)
+ {
+ //If call AppControl is already launched, ignore any further requests.
+ return ;
+ }
+
+ if (gestureDetector.GetControl() != null)
+ {
+ Button* pButton = static_cast<Button*>(gestureDetector.GetControl());
+ int actionId = pButton->GetActionId();
+ switch(actionId)
+ {
+ case NUM_KEY1:
+ case NUM_KEY2:
+ case NUM_KEY3:
+ case NUM_KEY4:
+ case NUM_KEY5:
+ case NUM_KEY6:
+ case NUM_KEY7:
+ case NUM_KEY8:
+ case NUM_KEY9:
+ {
+ //first check if there is any number present in the edit fiels
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pEditField->GetTextLength() != 0)
+ {
+ //append / clear last character to contact
+ int oldtextlen = pEditField->GetTextLength();
+ ShowFormattedText(pEditField, actionId);
+ if (pEditField->GetTextLength() == 0)
+ {
+ __pDialPresentationModel->ClearSearchResults();
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ if(oldtextlen != pEditField->GetTextLength())
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+ pEditField->Invalidate(true);
+ break;
+ }
+ //Check if Speed Dial setting exist for pressed key
+ String* contactNumber = __pDialPresentationModel->FetchSpeedDialNumberN(actionId);
+ if(contactNumber != null)
+ {
+ ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgs->Construct();
+ //pass ownership to arraylist
+ pArgs->Add(contactNumber);
+ SendUserEvent(REQUEST_CALL_SPEED_DIAL_NUM,pArgs);
+ }
+ else
+ {
+ //show speed Dial Confirmation Popup msg
+ if(actionId == NUM_KEY1)
+ {
+ SendUserEvent(REQUEST_SHOW_VOICE_MAIL_POPUP,null);
+ }
+ else
+ {
+ SendUserEvent(REQUEST_SHOW_SPEED_DIAL_POPUP,null);
+ }
+ }
+
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ Button* pPauseButton = static_cast<Button*>(pForm->GetControl(IDC_BUTTON10,true));
+ Panel* pLastRowPanel = static_cast<Panel*>(pForm->GetControl(IDC_PANEL_LASTROW,true));
+ int portraitAnchorPositionY = pForm->GetHeight() - pLastRowPanel->GetHeight() - pPauseButton->GetHeight();
+ int landscapeAnchorPositionY = pForm->GetHeight() - pPauseButton->GetHeight();
+ int portraitAnchorPositionX = pPauseButton->GetWidth()/2;
+ int landscapeAnchorPositionX = pPauseButton->GetWidth();
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pEditField != null && pEditField->GetTextLength() > 0)
+ {
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ ShowPauseWaitMenu(contactNo, portraitAnchorPositionY, portraitAnchorPositionX,
+ landscapeAnchorPositionX, landscapeAnchorPositionY);
+ }
+
+ }
+ break;
+
+ case HASH_KEY:
+ {
+ //Handle Mute / UnMute
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pEditField->GetTextLength() == 0)
+ {
+ bool enabled = false;
+ String title = L"http://tizen.org/setting/sound.silent_mode";
+ SettingInfo::GetValue(title, enabled);
+ //enable or disable the phone silent mode.
+ result r = E_FAILURE;
+ r = SettingInfo::SetValue(title, !enabled);
+ if(r == E_SUCCESS)
+ {
+ ShowSilentModeToggle(!enabled);
+ }
+ }
+ else
+ {
+ int oldtextlen = pEditField->GetTextLength();
+ ShowFormattedText(pEditField, actionId);
+ if(oldtextlen != pEditField->GetTextLength())
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ pEditField->Invalidate(true);
+
+ }
+ }
+ break;
+
+ case CLEAR_KEY:
+ {
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField != null && pEditField->GetTextLength() > 0)
+ {
+ pEditField->Clear();
+ pEditField->SetTextSize(IDI_MAX_TXT_FONT);
+ //pEditField->SetCursorPosition(0);
+ pEditField->SetFocus();
+ pEditField->Invalidate(true);
+ HideSearchBox();
+ ShowSearchGadget();
+ }
+ }
+ break;
+ case CALL_KEY:
+ {
+ //Removed this to not show the context menu on long tapping the call button
+ /*Button* pCallButton = static_cast<Button*>(pForm->GetControl(IDC_BUTTON_CALL,true));
+ Panel* pLastRowPanel = static_cast<Panel*>(pForm->GetControl(IDC_PANEL_LASTROW,true));
+ int portraitAnchorPositionY = pForm->GetHeight() - pLastRowPanel->GetHeight() +
+ ((pLastRowPanel->GetHeight()- pCallButton->GetHeight())/2);
+ int landscapeAnchorPositionY = portraitAnchorPositionY;
+ int portraitAnchorPositionX = pLastRowPanel->GetWidth()/2;
+ int landscapeAnchorPositionX = pForm->GetWidth()/2 + pLastRowPanel->GetWidth()/2 - pCallButton->GetWidth()/2;
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pEditField != null && pEditField->GetTextLength() > 0)
+ {
+ String contactNo = pEditField->GetText();
+ contactNo.Replace(L"-",L"");
+ ShowPauseWaitMenu(contactNo, portraitAnchorPositionY, portraitAnchorPositionX,
+ landscapeAnchorPositionX, landscapeAnchorPositionY);
+ }*/
+
+ }
+ break;
+ case NUM_KEY0:
+ {
+ AddPlus();
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::ShowPauseWaitMenu(Tizen::Base::String& contactNumber,
+ int portraitAnchorPositionY, int portraitAnchorPositionX,
+ int landscapeAnchorPositionX, int landscapeAnchorPositionY )
+{
+
+ AppLogDebug("ENTER");
+ Form *pForm = dynamic_cast<Form*>(GetParent());
+
+ if(__pCallContextMenu != null)
+ {
+ delete __pCallContextMenu;
+ __pCallContextMenu = null;
+ }
+ __pCallContextMenu = new (std::nothrow) ContextMenu();
+ __pCallContextMenu->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ //minimum available option count
+ int visibleItems = MIN_CONTEXT_MENU_ITEMS + 1;
+ __pCallContextMenu->AddItem(AppUtility::GetResourceString(IDS_DIALER_MENU_ITEM_ADD_PAUSE), IDA_MENU_ADD_PAUSE);
+ __pCallContextMenu->AddItem(AppUtility::GetResourceString(IDS_DIALER_MENU_ITEM_ADD_WAIT), IDA_MENU_ADD_WAIT);
+ __pCallContextMenu->AddActionEventListener(*this);
+ __pCallContextMenu->SetFocusable(true);
+ __pCallContextMenu->SetMaxVisibleItemsCount(visibleItems);
+ // Set the anchor position of the ContextMenu
+ if(pForm != null && (pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+ {
+ __pCallContextMenu->SetAnchorPosition(Point(landscapeAnchorPositionX, landscapeAnchorPositionY));
+ }
+ else
+ {
+ __pCallContextMenu->SetAnchorPosition(Point(portraitAnchorPositionX, portraitAnchorPositionY));
+ }
+ // Show the ContextMenu
+ __pCallContextMenu->Show();
+
+ AppLogDebug("EXIT");
+ return;
+
+}
+
+
+void
+DialTabDialer::AddPause(void)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField != null && pEditField->GetTextLength() > 0)
+ {
+ ShowFormattedText(pEditField,PAUSE_KEY);
+ HideSearchGadget();
+ UpdateSearchResults();
+ pEditField->Invalidate(true);
+ }
+
+ return;
+}
+
+void
+DialTabDialer::AddWait(void)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField != null)
+ {
+ ShowFormattedText(pEditField,WAIT_KEY);
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ pEditField->Invalidate(true);
+ }
+
+ return;
+}
+
+void
+DialTabDialer::AddPlus(void)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField != null)
+ {
+ ShowFormattedText(pEditField,PLUS_KEY);
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ pEditField->Invalidate(true);
+ }
+ return;
+}
+
+bool
+DialTabDialer::DialOutgoingCall(const String& contactNumber)
+{
+ AppLogDebug("Enter");
+ bool isSuccess = false;
+ if (__isAppControlLaunched == true)
+ {
+ //If call AppControl is already launched, ignore any further requests.
+ return isSuccess;
+ }
+
+ if(__dialerState == DIALER_STATE_FIRST_SCENE || __dialerState == DIALER_STATE_NORMAL_APPCONTROL)
+ {
+ ErrorCodes error = __pDialPresentationModel->DialCall(contactNumber);
+ if (error == ERROR_NONE)
+ {
+ __isAppControlLaunched = true;
+ isSuccess = true;
+ }
+ else
+ {
+ __isAppControlLaunched = false;
+ isSuccess = false;
+ //Show error message Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(error);
+ }
+ }
+ }
+ else
+ {
+ //Dialer was launched as AppControl in "AddCall" Scenario.
+ if (__dialerState == DIALER_STATE_ADD_CALL_APPCONTROL)
+ {
+ isSuccess = true;
+ PhoneApp* pApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ /* HashMap resultData;
+ resultData.Construct();
+ resultData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(contactNumber));
+ //send "APP_CTRL_RESULT_SUCCEEDED" and 'contactNumber' as result.
+ PhoneApp* pApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ pApp->SendAppControlResponseMessage(APP_CTRL_RESULT_SUCCEEDED, &resultData);
+ resultData.RemoveAll(true);*/
+ __pDialPresentationModel->DialCall(contactNumber);
+ AppLogDebug("Terminating");
+ pApp->Terminate();
+ }
+ }
+ return isSuccess;
+}
+
+void
+DialTabDialer::SwitchToSpeedDialForm(void)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_SPEED_DIAL), null);
+ return;
+}
+
+void
+DialTabDialer::ShowSpeedDialConfirmationPopup(bool isVoiceMail)
+{
+ String popupTitleMsg;
+ String popupMsg;
+ Label* pMsgLabel;
+ if(__pConfirmationPopup == null)
+ {
+ FloatRectangle rect = GetBoundsF();
+ __pConfirmationPopup = new (std::nothrow) Popup();
+ __pConfirmationPopup->Construct(true, FloatDimension(W_SPEEDDIAL_POPUP, H_SPEEDDIAL_POPUP));
+
+ rect = __pConfirmationPopup->GetBoundsF();
+ pMsgLabel = new (std::nothrow) Label();
+ if(isVoiceMail == true)
+ {
+ popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_TITLE_MSG);
+ popupMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_MSG);
+ }
+ else
+ {
+ popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG);
+ popupMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_MSG);
+ }
+ __pConfirmationPopup->SetTitleText(popupTitleMsg);
+ __pConfirmationPopup->SetPropagatedKeyEventListener(this);
+ __pConfirmationPopup->Invalidate(true);
+ pMsgLabel->Construct(Rectangle(0, IDI_PADDING, rect.width, H_POPUP_MSG_LABEL), popupMsg);
+ pMsgLabel->SetName(IDC_SPEED_DIAL_TXT_LABEL);
+ pMsgLabel->SetTextConfig(44,LABEL_TEXT_STYLE_NORMAL);
+ pMsgLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMsgLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ __pConfirmationPopup->AddControl(*pMsgLabel);
+
+ rect = pMsgLabel->GetBoundsF();;
+ Button *pButtonNo = new (std::nothrow) Button();
+ String btnName = AppUtility::GetResourceString(IDS_SPEEDDIAL_POP_NO_BTN_STRING);
+ pButtonNo->Construct(Rectangle(rect.x+ IDI_PADDING, (rect.y + rect.height + IDI_PADDING), ((rect.width - (3 * IDI_PADDING)) / 2), H_POPUP_BTN), btnName);
+ pButtonNo->SetActionId(IDA_SPEEDDIAL_POPUP_NO);
+ pButtonNo->AddActionEventListener(*this);
+
+ rect = pButtonNo->GetBoundsF();
+ btnName = AppUtility::GetResourceString(IDS_SPEEDDIAL_POP_YES_BTN_STRING);
+ Button *pButtonYes = new (std::nothrow) Button();
+ pButtonYes->Construct(Rectangle((rect.x + rect.width + IDI_PADDING), rect.y, rect.width, rect.height), btnName);
+ pButtonYes->SetActionId(IDA_SPEEDDIAL_POPUP_YES);
+ pButtonYes->AddActionEventListener(*this);
+ __pConfirmationPopup->AddControl(*pButtonYes);
+
+
+ __pConfirmationPopup->AddControl(pButtonNo);
+ }
+ else
+ {
+ if(isVoiceMail == true)
+ {
+ popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_TITLE_MSG);
+ popupMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_MSG);
+ }
+ else
+ {
+ popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG);
+ popupMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_MSG);
+ }
+ __pConfirmationPopup->SetTitleText(popupTitleMsg);
+ pMsgLabel = static_cast<Label*>(__pConfirmationPopup->GetControl(IDC_SPEED_DIAL_TXT_LABEL, true));
+ pMsgLabel->SetText(popupMsg);
+
+ }
+ //Show Popup message
+ __pConfirmationPopup->SetShowState(true);
+ __pConfirmationPopup->Show();
+}
+
+void
+DialTabDialer::ShowAddToContactsButton(void)
+{
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+ Button* pButtonContacts = static_cast<Button*>(GetControl(IDC_BUTTON_USE_CONTACT, true));
+ Button* pButtonDropDown = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ Button* pButtonAddContacts = static_cast<Button*>(GetControl(IDC_BUTTON_ADD_CONTACTS, true));
+ pButtonContacts->SetShowState(false);
+ pButtonDropDown->SetShowState(false);
+ pButtonAddContacts->SetShowState(true);
+ pSearchPanel->SetShowState(true);
+ pSearchPanel->Invalidate(true);
+ return;
+}
+
+void
+DialTabDialer::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ switch(requestId)
+ {
+ case REQUEST_SHOW_SUGGESTION:
+ {
+ String* pDisplayname = static_cast<String*> (pArgs->GetAt(0));
+ String* pMobileNo = static_cast<String*> (pArgs->GetAt(1));
+ String* pMatchedSearchStr = static_cast<String*> (pArgs->GetAt(2));
+ String* pResultCount = static_cast<String*> (pArgs->GetAt(3));
+ if(pDisplayname != null && pMobileNo != null && pMatchedSearchStr != null && pResultCount != null)
+ {
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+ ShowSuggestionBox(*pDisplayname, *pMobileNo, *pMatchedSearchStr, *pResultCount);
+ }
+ delete pArgs;
+ }
+ break;
+
+ case REQUEST_SHOW_ADD_TO_CONTACTS:
+ {
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+ ShowAddToContactsButton();
+ }
+ break;
+
+ case REQUEST_CALL_SPEED_DIAL_NUM:
+ {
+ if(pArgs != null)
+ {
+ String *number = static_cast<String*> (pArgs->GetAt(0));
+ //dial a call.
+ if(number != null)
+ {
+ DialOutgoingCall(*number);
+ }
+ delete pArgs;
+ }
+ }
+ break;
+
+ case REQUEST_SHOW_VOICE_MAIL_POPUP:
+ {
+ ShowSpeedDialConfirmationPopup(true);
+ }
+ break;
+ case REQUEST_SHOW_SPEED_DIAL_POPUP:
+ {
+ //show speed Dial Confirmation Popup msg
+ ShowSpeedDialConfirmationPopup();
+ }
+ break;
+ }
+
+}
+void
+DialTabDialer::SetShiftedPosUseContact(void)
+{
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+ Panel* pPanelUseContact = static_cast<Panel*>(pSearchPanel->GetControl(IDC_PANEL_USE_CONTACT, true));
+ Panel* pPanelDropDown = static_cast<Panel*>(pSearchPanel->GetControl(IDC_PANEL_DROPDOWN, true));
+
+ Point pointUseContact = pPanelUseContact->GetPosition();
+ pointUseContact.y = 0;
+ Point pointDropDown = pPanelDropDown->GetPosition();
+ pointDropDown.y = 10;
+
+ pPanelUseContact->SetPosition(pointUseContact.x,pointUseContact.y);
+ pPanelDropDown->SetPosition(pointDropDown.x,pointDropDown.y);
+
+ pPanelUseContact->SetShowState(true);
+ pPanelDropDown->SetShowState(true);
+
+ SetControlAlwaysOnTop(*pPanelUseContact,true);
+ SetControlAlwaysOnTop(*pPanelDropDown,true);
+ pSearchPanel->Invalidate(true);
+}
+void
+DialTabDialer::SetOrigPosUseContact(void)
+{
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+ Panel* pPanelUseContact = static_cast<Panel*>(pSearchPanel->GetControl(IDC_PANEL_USE_CONTACT, true));
+ Panel* pPanelDropDown = static_cast<Panel*>(pSearchPanel->GetControl(IDC_PANEL_DROPDOWN, true));
+
+ Point pointUseContact = pPanelUseContact->GetPosition();
+ pointUseContact.y = 119;
+ Point pointDropDown = pPanelDropDown->GetPosition();
+ pointDropDown.y = 147;
+
+ pPanelUseContact->SetPosition(pointUseContact.x,pointUseContact.y);
+ pPanelDropDown->SetPosition(pointDropDown.x,pointDropDown.y);
+
+ SetControlAlwaysOnTop(*pPanelUseContact,true);
+ SetControlAlwaysOnTop(*pPanelDropDown,true);
+ pSearchPanel->Invalidate(true);
+}
+
+void
+DialTabDialer::ShowSuggestionBox(String& name, String& mobileNo, String& matchedKey, String& resultCount)
+{
+ AppLogDebug("ENTER");
+ String nameWithEllipsis(name);
+ String mobileNoWithEllipsis(mobileNo);
+ //"UseContact" Button
+ Button* pButtonUseContacts = static_cast<Button*>(GetControl(IDC_BUTTON_USE_CONTACT, true));
+ Button* pButtonDropDown = static_cast<Button*>(GetControl(IDC_BUTTON_DROP_DOWN, true));
+ //This is the button width where the Text with Ellipsis will be displayed
+ int buttonMaxWidth = pButtonUseContacts->GetBounds().width - IDI_RIGHT_MARGIN_USE_CONTACT_BTN - ELLIPSIS_LENGTH;
+ //Constructing text element and font to get the text extent of name
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(nameWithEllipsis);
+ Font* nameTextfont = new (std::nothrow) Font();
+ nameTextfont->Construct(FONT_STYLE_PLAIN, 44);
+ FloatDimension textDimension;
+ nameTextfont->GetTextExtent(nameWithEllipsis, nameWithEllipsis.GetLength(), textDimension);
+ if(textDimension.width > buttonMaxWidth)
+ {
+ nameWithEllipsis.Append(L"...");
+ }
+ //Removing the extra length in name and appending ellipsis
+ while(textDimension.width > buttonMaxWidth)
+ {
+ nameWithEllipsis.Remove(nameWithEllipsis.GetLength() - 4, 1);
+ nameTextfont->GetTextExtent(nameWithEllipsis, nameWithEllipsis.GetLength(), textDimension);
+ }
+
+
+ //Constructing text element and font to get the text extent of mobileNo
+ TextElement* pMobileNoElement = new (std::nothrow) TextElement();
+ pMobileNoElement->Construct(mobileNoWithEllipsis);
+ Font* mobileNoFont = new (std::nothrow) Font();
+ mobileNoFont->Construct(FONT_STYLE_PLAIN, 35);
+ mobileNoFont->GetTextExtent(mobileNoWithEllipsis, mobileNoWithEllipsis.GetLength(), textDimension);
+ if(textDimension.width > buttonMaxWidth)
+ {
+ mobileNoWithEllipsis.Append(L"...");
+ }
+ while(textDimension.width > buttonMaxWidth)
+ {
+ mobileNoWithEllipsis.Remove(mobileNoWithEllipsis.GetLength() - 4, 1);
+ mobileNoFont->GetTextExtent(mobileNoWithEllipsis, mobileNoWithEllipsis.GetLength(), textDimension);
+ }
+
+
+
+ delete pTextElement;
+ pTextElement = null;
+
+ delete pMobileNoElement;
+ pMobileNoElement = null;
+
+
+ delete nameTextfont;
+ nameTextfont = null;
+
+ delete mobileNoFont;
+ mobileNoFont = null;
+
+
+ Canvas pCanvasNormalContacts;
+ pCanvasNormalContacts.Construct(pButtonUseContacts->GetBounds());
+ Canvas pCanvasPressedContacts;
+ pCanvasPressedContacts.Construct(pButtonUseContacts->GetBounds());
+ String mobileStr = AppUtility::GetResourceString(IDS_DIALER_MOBILE_STR);
+ pCanvasNormalContacts.SetBackgroundColor(COLOR_SEARCHLIST_BG);
+ pCanvasNormalContacts.Clear();
+ //Add text, Bg to normal state
+ DialUtil::DrawTextAndHighlightedKeywordToCanvas(nameWithEllipsis, matchedKey, FONT_SUGGESTION_NAME, pCanvasNormalContacts, POSITION_SUGGESTION_NAME);
+ DialUtil::DrawTextAndHighlightedKeywordToCanvas(mobileNoWithEllipsis, matchedKey, FONT_SUGGESTION_MOBILE, pCanvasNormalContacts, POSITION_SUGGESTION_NUMBER);
+ //Add text, Bg to pressed state
+ pCanvasPressedContacts.SetBackgroundColor(COLOR_SEARCHLIST_PRESS_BG);
+ pCanvasPressedContacts.Clear();
+ DialUtil::DrawTextAndHighlightedKeywordToCanvas(nameWithEllipsis, matchedKey, FONT_SUGGESTION_NAME, pCanvasPressedContacts, POSITION_SUGGESTION_NAME);
+ DialUtil::DrawTextAndHighlightedKeywordToCanvas(mobileNoWithEllipsis, matchedKey, FONT_SUGGESTION_MOBILE, pCanvasPressedContacts, POSITION_SUGGESTION_NUMBER);
+ //add normal, pressed bg bitmap to button
+ DialUtil::DrawCanvasToButton(&pCanvasNormalContacts, &pCanvasPressedContacts, pButtonUseContacts);
+
+ //"DropDown" Button
+ Canvas pCanvasNormalDropDown;
+ pCanvasNormalDropDown.Construct(pButtonDropDown->GetBounds());
+ Canvas pCanvasPressedDropDown;
+ pCanvasPressedDropDown.Construct(pButtonDropDown->GetBounds());
+ //Add text, Bg to normal state
+ DialUtil::Draw9PatchToCanvas(pCanvasNormalDropDown, IDB_BTN_OPTION_BG_ICON);
+ DialUtil::DrawTextToCanvas(resultCount, FONT_EXPAND_BUTTON_TEXT, pCanvasNormalDropDown, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasNormalDropDown, POSITION_BOTTOM_CENTER);
+ //Add text, Bg to pressed state
+ DialUtil::Draw9PatchToCanvas(pCanvasPressedDropDown, IDB_BTN_OPTION_PRESS_BG_ICON);
+ DialUtil::DrawTextToCanvas(resultCount, FONT_EXPAND_BUTTON_TEXT, pCanvasPressedDropDown, POSITION_CENTER, BUTTON_STATUS_NORMAL);
+ DialUtil::DrawImageToCanvas(IDB_POPUP_BUBBLE_PRESS_ICON, Dimension(W_SUGGESTION_POPUP_BUBBLE_ICON, H_SUGGESTION_POPUP_BUBBLE_ICON), pCanvasPressedDropDown, POSITION_BOTTOM_CENTER);
+ //add background to button
+ DialUtil::DrawCanvasToButton(&pCanvasNormalDropDown, &pCanvasPressedDropDown, pButtonDropDown);
+
+ Button* pButtonAddContacts = static_cast<Button*>(GetControl(IDC_BUTTON_ADD_CONTACTS, true));
+ pButtonAddContacts->SetShowState(false);
+
+ Form* pForm = dynamic_cast<Form *>(GetParent());
+ int noOfItems = MAX_SEARCH_LIST_ITEMS;
+ if(__pDialPresentationModel->GetNumberOfSuggestions() < (noOfItems+1))
+ {
+ noOfItems = __pDialPresentationModel->GetNumberOfSuggestions() - 1;
+ }
+ if(pForm != null && (pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+ {
+ SetOrigPosUseContact();
+ }
+ pButtonUseContacts->SetShowState(true);
+ pButtonDropDown->SetShowState(true);
+ pButtonDropDown->Invalidate(true);
+ Panel* pSearchPanel = static_cast<Panel*>(GetControl(IDC_PANEL_SEARCH_BOX, true));
+/* FloatRectangle originalrect = pSearchPanel->GetBoundsF();
+ FloatPoint floatpoint = CoordinateSystem::AlignToDevice(pSearchPanel->GetPositionF());
+ result r;
+ r =pSearchPanel->SetPosition(floatpoint);
+
+ Label* pEditFieldBgLbl = static_cast<Label*>(GetControl(L"IDC_LABEL_BACKGROUND", true));
+ originalrect = pEditFieldBgLbl->GetBoundsF();
+ FloatRectangle floatrect = CoordinateSystem::AlignToDevice(pEditFieldBgLbl->GetBoundsF());
+ r =pEditFieldBgLbl->SetBounds(floatrect);
+ pEditFieldBgLbl->Invalidate(true);
+
+
+ Panel* pLastRowPanel = static_cast<Panel*>(GetControl(IDC_PANEL_LASTROW, true));
+ floatrect = CoordinateSystem::AlignToDevice(pLastRowPanel->GetBoundsF());
+ r =pLastRowPanel->SetBounds(floatrect);
+ pLastRowPanel->Invalidate(true);*/
+
+ pSearchPanel->SetShowState(true);
+ pSearchPanel->Invalidate(true);
+
+ int totalSuggestions;
+ Integer::Parse(resultCount, totalSuggestions);
+ if(totalSuggestions <= 1)
+ {
+ pButtonDropDown->SetShowState(false);
+ pButtonDropDown->Invalidate(false);
+ }
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialTabDialer::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+ DialContactInfo* pDialInfo = __pDialPresentationModel->GetSuggestionAtIndex(index+1);
+ if(pDialInfo != null)
+ {
+ String phNumber = pDialInfo->GetPhoneNumber();
+ EditField* pTextBox = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(pTextBox != null)
+ {
+ pTextBox->Clear();
+ ShowFormattedText(pTextBox,phNumber);
+ pTextBox->Invalidate(true);
+ }
+ HideSearchListView();
+ UpdateSearchResults();
+ }
+ return;
+}
+
+void
+DialTabDialer::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLogDebug("Enter");
+ Layout* pLayout = GetLayoutN();
+ if (pLayout != null)
+ {
+ pLayout->Update();
+ }
+ Form* pForm = static_cast<Form*>(GetParent());
+
+
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ Label* pKeypadBgLbl = static_cast<Label*>(GetControl(L"IDC_LABEL_KEYPAD", true));
+ pKeypadBgLbl->SetBounds(pKeypadBgLbl->GetX(),pKeypadBgLbl->GetY(),GetWidth()/2,pKeypadBgLbl->GetHeight());
+ }
+
+ Label* pEditFieldBgLbl = static_cast<Label*>(GetControl(L"IDC_LABEL_BACKGROUND", true));
+ Dimension editFieldBgLblDimen = pEditFieldBgLbl->GetSize();
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ editFieldBgLblDimen.height = 461;
+ }
+ else if(orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ editFieldBgLblDimen.height = 315;
+ }
+ pEditFieldBgLbl->SetSize(editFieldBgLblDimen);
+
+ //Show last row label bg in landscape only.
+ Panel* pLastRowPanel = static_cast<Panel*>(GetControl(IDC_PANEL_LASTROW, true));
+ Rectangle lastRowRect = pLastRowPanel->GetBounds();
+ lastRowRect.y = pForm->GetClientAreaBounds().height - lastRowRect.height;
+ pLastRowPanel->SetBounds(lastRowRect);
+ Label* pLastRowLabel = static_cast<Label*>(pLastRowPanel->GetControl(IDC_LABEL_LASTROW_BG, true));
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ pLastRowLabel->SetShowState(true);
+ }
+ else if(orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ pLastRowLabel->SetShowState(false);
+ }
+
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField->GetTextLength() > 0)
+ {
+ if (__pDialPresentationModel->GetNumberOfSuggestions() == 0)
+ {
+ ShowAddToContactsButton();
+ }
+ else
+ {
+ //contact suggestion is present, change it bitmap based on new orientation
+ DialContactInfo* pDialInfo = __pDialPresentationModel->GetSuggestionAtIndex(0);
+ if (pDialInfo != null)
+ {
+ String name = pDialInfo->GetDisplayName();
+ String mobileNo = pDialInfo->GetPhoneNumber();
+ String* pMatchedSearchStr = pDialInfo->GetSearchKey();
+ String resultCount;
+ resultCount.Append(__pDialPresentationModel->GetNumberOfSuggestions());
+ ShowSuggestionBox(name, mobileNo, *pMatchedSearchStr, resultCount);
+ }
+ //Check if search list view is open
+ if(__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ ShowSearchListView();
+ }
+ }
+ }
+
+ //reset the bitmaps to button based on new orientation.
+ if (__pDialKeypad != null)
+ {
+ __pDialKeypad->SetBitmapToKeypadButtons();
+ __pDialKeypad->Invalidate(true);
+ }
+
+ Invalidate(true);
+ return;
+}
+
+void
+DialTabDialer::HandlePopupClosed(void)
+{
+ Draw();
+ if(__pErrorMsgPopup != null)
+ {
+ __pErrorMsgPopup->SetShowState(false);
+ }
+ return;
+}
+
+void
+DialTabDialer::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ __isAppForeground = true;
+
+ //If app control was launched
+ //as we do not know if it success or failed
+ // we need to UpdateSearchResults
+ //Returned from app control if app control does not
+ //send any response we need to do this
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ String editText(L"");
+ if(pEditField != null)
+ {
+ editText = pEditField->GetText();
+ //Commented this for bug number N_SE-51976
+ //Uncommenting for PLM P131002-02247
+ pEditField->SetFocus();
+ }
+
+ if(editText.IsEmpty() == true)
+ {
+ //Fetch auto area code setting, if present
+ SettingsPresentationModel::GetInstance()->GetActivePrefixDialNumber(editText);
+ if(editText.IsEmpty() == false)
+ {
+ editText.Replace(L"P",L";");
+ editText.Replace(L"p",L";");
+ }
+ if(pEditField != null)
+ {
+ ShowFormattedText(pEditField,editText);
+ //pEditField->SetCursorPosition(editText.GetLength());
+ pEditField->Invalidate(true);
+ //show search results
+ if (pEditField->GetTextLength() == 0)
+ {
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+ }
+ }
+
+
+ SetAppControlLaunched(false);
+}
+
+void
+DialTabDialer::OnBackground(void)
+{
+ AppLogDebug("Enter");
+ __isAppForeground = false;
+ if (__isSearchListOpened == true)
+ {
+ HideSearchListView();
+ }
+}
+
+bool
+DialTabDialer::IsForeground()
+{
+ AppLogDebug("Enter %d",__isAppForeground);
+ return __isAppForeground;
+}
+
+void
+DialTabDialer::OnContactsChanged(const IList& contactChangeInfoList)
+{
+ if(contactChangeInfoList.GetCount() > 0)
+ {
+ //clear old search results
+ __pDialPresentationModel->ClearSearchResults();
+ UpdateSearchResults();
+ }
+}
+
+void
+DialTabDialer::SetAppControlLaunched(bool launched)
+{
+ AppLogDebug("%d",__isAppControlLaunched);
+ __isAppControlLaunched = launched;
+}
+
+bool
+DialTabDialer::GetAppControlLaunched(void)
+{
+ AppLogDebug("%d",__isAppControlLaunched);
+ return __isAppControlLaunched;
+}
+
+void
+DialTabDialer::OnTextValueChanged(const Tizen::Ui::Control& source)
+{
+ AppLogDebug("OnTextValueChanged");
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if (pEditField->GetTextLength() == 0)
+ {
+ pEditField->SetTextSize(IDI_MAX_TXT_FONT);
+ ShowSearchGadget();
+ HideSearchBox();
+ }
+ else
+ {
+ String number = pEditField->GetText();
+ pEditField->Clear();
+ ShowFormattedText(pEditField,number);
+ HideSearchGadget();
+ UpdateSearchResults();
+ }
+}
+
+void
+DialTabDialer::ShowOptionsMenu()
+{
+ AppLogDebug("Enter");
+ if(__pOptionMenu != null)
+ {
+ AppLogDebug("__pOptionMenu != null");
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_DIALER_MENU_ITEM_SEND_MSG), IDA_MENU_SEND_MESSAGE);
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_DIALER_MENU_ITEM_SPEED_DIAL), IDA_MENU_SPEED_DIAL);
+ __pOptionMenu->AddActionEventListener(*this);
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+}
+void
+DialTabDialer::HandleFormBackRequest()
+{
+ AppLogDebug("Enter");
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ if(pPhoneApp->IsOpenAsAppControl() == true)
+ {
+ //launched as "AddCall" AppControl, send response
+ pPhoneApp->SendAppControlResponseMessage(APP_CTRL_RESULT_CANCELED, null);
+ }
+ pPhoneApp->Terminate();
+}
+
+bool
+DialTabDialer::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pConfirmationPopup != null && __pConfirmationPopup->GetShowState() == true)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+}
+bool
+DialTabDialer::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ EditField* pEditField = static_cast<EditField*>(GetControl(IDC_NUMERIC_EDITFIELD, true));
+ if(source.Equals(*pEditField))
+ {
+ if(keyEventInfo.GetKeyCode() == KEY_BACKSPACE || keyEventInfo.GetKeyCode() == KEY_DELETE)
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void
+DialTabDialer::ShowSilentModeToggle(bool bEnabled)
+{
+ // Creates an instance of MessageBox
+ String message = (bEnabled ? AppUtility::GetResourceString(IDS_SILENT_MODE_ENABLED):AppUtility::GetResourceString(IDS_SILENT_MODE_DISABLED));
+ MessageBox silentMsgBox;
+
+ silentMsgBox.Construct(L"", message, MSGBOX_STYLE_NONE, 2000);
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ SetFocus();
+ int modalResult;
+ silentMsgBox.ShowAndWait(modalResult);
+}
+
+void
+DialTabDialer::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("Enter");
+}
+
+void
+DialTabDialer::SetIgnoreClearKey(bool bIgnore)
+{
+ __isClearKeyIgnore = bIgnore;
+}
+bool
+DialTabDialer::IsClearKeyIgnored(void)
+{
+ return __isClearKeyIgnore;
+}
+
+void
+DialTabDialer::OnSettingChanged(Tizen::Base::String& key)
+{
+ if(key.Equals(String(SETTING_INFO_KEY_CONTACTS_ORDER)) == true)
+ {
+ UpdateSearchResults();
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabLogs.cpp
+ * @brief The Logs Tab
+ */
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FMedia.h>
+#include <FGraphics.h>
+#include <FSocial.h>
+#include "PhnPhoneApp.h"
+#include "PhnAppUtility.h"
+#include "PhnTypes.h"
+#include "PhnCommonUtils.h"
+#include "PhnTabLogs.h"
+#include "PhnSceneRegister.h"
+#include "PhnCalllogManager.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Scenes;
+
+const int W_NOCONTENTS_IMAGE = 280;
+const int H_NOCONTENTS_IMAGE = 280;
+//List view height
+const int H_TOAST_MSG = 48;
+const int H_SELECTALL_CHK_BOX = 112;
+
+const wchar_t* IDL_PANEL_LOGS = L"IDL_PANEL_LOGS";
+const wchar_t* IDC_LABEL_SELECTED_POPUP = L"IDC_LABEL_SELECTED_POPUP";
+const unsigned int COLOR_LABEL_SELECTED = Color32<68, 68, 68>::Value;
+const unsigned int COLOR_LABEL_SELECTED_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
+static const int W_DELETE_POPUP = 720;
+static const int H_DELETE_POPUP = 308;
+static const int Y_DELETE_POPUP_TITLE = 20;
+static const int H_DELETE_POPUP_ELEMENT = 60;
+static const int H_DELETE_POPUP_PROGRESS = 60;
+static const int Y_DELETE_POPUP_CANCEL_BUTTON = 214;
+static const int H_DELETE_POPUP_CANCEL_BUTTON = 74;
+static const int W_DELETE_POPUP_CANCEL_BUTTON = 394;
+
+static const int FONT_SIZE_DELETE_POPUP_TEXT = 36;
+//static const int X_MORE = 55;
+
+static const unsigned int COLOR_DELETE_POPUP_TEXT = Color32<128, 128, 128>::Value;
+DialTabLogs::DialTabLogs(void)
+{
+ __pDataProvider = new CustomDataProvider();
+ __pFormFooter = null;
+ __plogsListView = null;
+ __isEditMode = false;
+ __pButtonSelectAll = null;
+ __groupCount = 0;
+ __itemCount = 0;
+ __isSelectAll = false;
+ __selectedItemCount = 0;
+ __pLogPresentor = null;
+ __pArgs = null;
+ __deleteLogsTimer.Construct(*this);
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+ __pDeletePopup = null;
+ __pConfirmationDeletePopup = null;
+ __pCallLogId = null;
+ __isSceneVisible = false;
+ __pLogsViewbyPopup = null;
+ __isMsgAppControlLaunched = false;
+ __isCallAppControlLaunched = false;
+ __pOptionMenu = null;
+ __isDeleteInProgress = false;
+ __pAddressbook = null;
+}
+
+DialTabLogs::~DialTabLogs(void)
+{
+ AppLogDebug("Enter");
+ if (__pDataProvider != null)
+ {
+ delete __pDataProvider;
+ __pDataProvider = null;
+ }
+ if (__pLogPresentor != null)
+ {
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ __pLogPresentor = null;
+ }
+ if (__pCallLogId != null)
+ {
+ __pCallLogId->RemoveAll();
+ delete __pCallLogId;
+ __pCallLogId = null;
+ }
+ if(__pLogsViewbyPopup != null)
+ {
+ delete __pLogsViewbyPopup;
+ __pLogsViewbyPopup = null;
+ }
+}
+
+bool
+DialTabLogs::Initialize(void)
+{
+ result r = Construct(IDL_PANEL_LOGS);
+ TryCatch(r == E_SUCCESS, , "DialTabLogs::Initialise() - Fail to initialise Call log panel");
+ return true;
+
+ CATCH:
+ return false;
+}
+
+result
+DialTabLogs::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ // Layout setting
+ Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return E_FAILURE;
+ }
+
+ pForm->AddOrientationEventListener(*this);
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(pForm->GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetHorizontalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetVerticalFitPolicy(*this, FIT_POLICY_PARENT);
+ delete pRelativeLayout;
+ }
+
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(pForm->GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetHorizontalFitPolicy(*this, FIT_POLICY_PARENT);
+ pRelativeLayout->SetVerticalFitPolicy(*this, FIT_POLICY_PARENT);
+ delete pRelativeLayout;
+ }
+
+ __pFormFooter = pForm->GetFooter();
+ if (__pFormFooter != null)
+ {
+ __pFormFooter->SetShowState(true);
+ __pFormFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
+ __pFormFooter->AddActionEventListener(*this);
+
+ __footerItemDelete.Construct(IDA_FOOTER_LOG_DELETE);
+ String delStr = AppUtility::GetResourceString(IDS_DELETE_BTN_STRING);
+ __footerItemDelete.SetText(delStr);
+ __pFormFooter->AddItem(__footerItemDelete);
+
+ }
+
+ __pButtonSelectAll = static_cast<CheckButton*>(GetControl("IDC_CHECKBUTTON_SELECTALL"));
+ if (__pButtonSelectAll != null)
+ {
+ __pButtonSelectAll->SetShowState(false);
+ __pButtonSelectAll->SetActionId(IDA_CHECKBUTTON_SELECT_ALL, IDA_CHECKBUTTON_UNSELECT_ALL);
+ __pButtonSelectAll->AddActionEventListener(*this);
+ __pButtonSelectAll->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ }
+ __pAddressbook = AddressbookManager::GetInstance()->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if (__pAddressbook == null)
+ {
+ AppLogDebug("Address Book in null!");
+ }
+
+ //create a list view
+ __plogsListView = new (std::nothrow) GroupedListView();
+ if (__plogsListView != null)
+ {
+ __plogsListView->Construct(Rectangle(pForm->GetX(), pForm->GetY(), pForm->GetWidth(), pForm->GetClientAreaBounds().height), GROUPED_LIST_VIEW_STYLE_INDEXED, true, SCROLL_STYLE_FADE_OUT);
+ __plogsListView->AddGroupedListViewItemEventListener(*this);
+ Bitmap* pNoContentBitmap = AppUtility::GetBitmapFromResourcesN(IDB_LOG_NO_CONTENT,W_NOCONTENTS_IMAGE,H_NOCONTENTS_IMAGE);
+ if(pNoContentBitmap != null)
+ {
+ __plogsListView->SetBitmapOfEmptyList(pNoContentBitmap);
+
+ }
+ __plogsListView->SetTextOfEmptyList(AppUtility::GetResourceString(IDS_NO_LOGS));
+ __plogsListView->SetTextColorOfEmptyList(Color(128,128,128));
+ r = AddControl(__plogsListView);
+ TryCatch(r == E_SUCCESS, , "Calllog list control not added");
+ }
+
+ __pSelectedLabel = static_cast<Label*>(GetControl(IDC_LABEL_SELECTED_POPUP));
+ if(__pSelectedLabel != null)
+ {
+ SetControlAlwaysOnTop(*__pSelectedLabel,true);
+ __pSelectedLabel->SetBackgroundColor(COLOR_LABEL_SELECTED);
+ __pSelectedLabel->SetTextColor(COLOR_LABEL_SELECTED_TEXT);
+ __pSelectedLabel->SetShowState(false);
+ }
+
+ __pCallLogId = new(std::nothrow) ArrayList();
+ r = __pCallLogId->Construct();
+
+ CATCH:
+ return r;
+}
+
+result
+DialTabLogs::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ delete __pDeletePopup;
+ __pDeletePopup = null;
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ __plogsListView = null;
+ delete __pOptionMenu;
+ if (__pAddressbook != null)
+ {
+ delete __pAddressbook;
+ __pAddressbook = null;
+ }
+ return r;
+}
+
+void
+DialTabLogs::DeleteSelectedCalllog(void)
+{
+ ShowDeletePopup();
+}
+
+void
+DialTabLogs::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ __pLogPresentor = CalLogPresentationModel::GetInstance();
+ __pLogPresentor->AddCalllogChangeListener(*this);
+
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+
+ __plogsListView->SetItemProvider(*__pDataProvider);
+ __isMsgAppControlLaunched = false;
+ __isCallAppControlLaunched = false;
+
+ if (__pFormFooter != null)
+ {
+ __pFormFooter->SetShowState(true);
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ }
+ //Check if opened in edit mode
+ if(__isEditMode == true)
+ {
+ //Check if "select all" is already selected
+ if (__pButtonSelectAll->IsSelected() == true)
+ {
+ //HandleAllItemSelection();
+ }
+ //If there is no items selected the reset the display mode
+ else if(__selectedItemCount == 0)
+ {
+ SetCallLogDisplayMode(false);
+ }
+ }
+ if(__pLogPresentor->IsDataUpdated())
+ {
+ UpdateCallLogList();
+ }
+ SetSceneVisible(true);
+ ManageItemSelection();
+ const Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm != null)
+ {
+ if((pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE) && __isEditMode == true)
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX + 20, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ else if(__isEditMode == true)
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ else
+ {
+ __plogsListView->SetBounds(pForm->GetX(), pForm->GetY(), pForm->GetWidth(), pForm->GetClientAreaBounds().height);
+ }
+ }
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(this);
+ }
+}
+
+void
+DialTabLogs::HandleAllItemSelection(void)
+{
+ SetListItemSelectStatus(true);
+ __itemCount = __pLogPresentor->GetCallLogsViewedCount();
+ __selectedItemCount = __itemCount;
+ String text;
+ String selItemStr = L"";
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __itemCount);
+ __pSelectedLabel->SetText(text);
+ __pSelectedLabel->Invalidate(false);
+}
+
+void
+DialTabLogs::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ AppLogDebug("Enter");
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(PhoneApp::GetInstance());
+ pPhoneApp->RemoveAppStateChangeListener(*this);
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+ SetSceneVisible(false);
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ __pLogPresentor = null;
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(null);
+ }
+}
+
+void
+DialTabLogs::OnGroupedListViewItemStateChanged(GroupedListView& listView, int groupIndex, int itemIndex, int elementId, ListItemStatus state)
+{
+ if (__isMsgAppControlLaunched == true || __isCallAppControlLaunched == true)
+ {
+ //AppControl already launched.
+ return;
+ }
+
+ if (__isEditMode == false)
+ {
+ __pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pArgs->Construct();
+ CallLogDetails* pCalllogInfo = null;
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ if(pCalllogInfo != null && pCalllogInfo->GetPhoneNumber() == null)
+ {
+ CallLogDetails* calllogInfoargs = new (std::nothrow) CallLogDetails();
+ *calllogInfoargs = *pCalllogInfo;
+ __pArgs->Add(calllogInfoargs);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward( ForwardSceneTransition(IDSCN_RESTRICTED_CALL_LOG_DETAILS, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY), __pArgs);
+ __pArgs = null;
+ }
+ else if(pCalllogInfo != null)
+ {
+ __pArgs->Add((new String(pCalllogInfo->GetPhoneNumber())));
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward( ForwardSceneTransition(IDSCN_CALL_LOG_DETAILS, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY), __pArgs);
+ __pArgs = null;
+ }
+ }
+ else
+ {
+ String text;
+ if (state == LIST_ITEM_STATUS_CHECKED)
+ {
+ __selectedItemCount++;
+ StoreItemselection(groupIndex, itemIndex, elementId, state);
+ }
+ else if (state == LIST_ITEM_STATUS_UNCHECKED)
+ {
+ __selectedItemCount--;
+ StoreItemselection(groupIndex, itemIndex, elementId, state);
+ }
+ if (__selectedItemCount == __itemCount)
+ {
+ __pButtonSelectAll->SetSelected(true);
+ }
+ else
+ {
+ __pButtonSelectAll->SetSelected(false);
+ }
+ if (__selectedItemCount == 0)
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ String selItemStr = L"";
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __selectedItemCount);
+ __pSelectedLabel->SetText(text);
+ }
+ __pFormFooter->Invalidate(true);
+ __pButtonSelectAll->Invalidate(false);
+ __pSelectedLabel->Invalidate(false);
+ }
+}
+
+void
+DialTabLogs::OnGroupedListViewContextItemStateChanged(GroupedListView& listView, int groupIndex, int itemIndex, int elementId, ListContextItemStatus state)
+{
+ //Empty implementation
+ CallLogDetails* pCalllogInfo = null;
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __deleteGroupIndex = groupIndex;
+ __deleteItemIndex = itemIndex;
+ if(pCalllogInfo != null)
+ {
+
+ switch (elementId)
+ {
+ case IDA_LIST_ELEMENT_DELETE:
+ {
+ ShowDeleteConfirmationPopup(IDA_POPUP_DELETE_YES);
+ }
+ break;
+ case IDA_LIST_ELEMENT_CALL:
+ {
+ __isCallAppControlLaunched = true;
+ char* pPhoneNumber = pCalllogInfo->GetPhoneNumber();
+ if(pPhoneNumber == null)
+ {
+ __isCallAppControlLaunched = false;
+ break;
+ }
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ if (pPhoneApp->IsOpenAsAppControl() == false)
+ {
+ __pLogPresentor->DialCall(String(pPhoneNumber));
+ }
+ else
+ {
+ //launched as AppControl
+ /*HashMap resultData;
+ resultData.Construct();
+ resultData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(pPhoneNumber));
+ //send "APP_CTRL_RESULT_SUCCEEDED" and 'contactNumber' as result.
+ pPhoneApp->SendAppControlResponseMessage(APP_CTRL_RESULT_SUCCEEDED, &resultData);
+ resultData.RemoveAll(true);*/
+ __pLogPresentor->DialCall(String(pPhoneNumber));
+ pPhoneApp->Terminate();
+ }
+ }
+ break;
+
+ case IDA_LIST_ELEMENT_MESSAGE:
+ {
+ result r = E_SUCCESS;
+ char* pPhoneNumber = pCalllogInfo->GetPhoneNumber();
+ if(pPhoneNumber == null)
+ {
+ break;
+ }
+ //launch message AppControl
+ __isMsgAppControlLaunched = true;
+ String phoneNumber=L"";
+ phoneNumber.Append(pPhoneNumber);
+
+ HashMap extraData;
+ extraData.Construct();
+
+ extraData.Add(new (std::nothrow) String(MESSAGE_TYPE), new (std::nothrow) String(MESSAGE_SMS_TYPE));
+
+
+ String tempContactNumber;
+ int commaIndex = 0;
+ int semiColonIndex = 0;
+ int index = 0;
+ phoneNumber.IndexOf(",", 0, commaIndex);
+ phoneNumber.IndexOf(";", 0, semiColonIndex);
+
+ if(commaIndex != -1 && semiColonIndex != -1)
+ {
+ index = commaIndex < semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else if(commaIndex != -1 || semiColonIndex != -1)
+ {
+ index = commaIndex > semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else
+ {
+ index = phoneNumber.GetLength();
+ }
+ phoneNumber.SubString(0, index, tempContactNumber);
+
+
+ extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(tempContactNumber));
+
+ String uri = L"sms:";
+ uri.Append(tempContactNumber);
+ r = AppControl::FindAndStart(OPERATION_ID_COMPOSE,&uri,null,null,null,null);
+ /*AppControl* pAc = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
+ if (pAc != null)
+ {
+ r = pAc->Start(null, null, &extraData, null);
+ if(r != E_SUCCESS)
+ {
+ //AppControl request failed, reset flag.
+ __isMsgAppControlLaunched = false;
+ }
+
+ delete pAc;
+ }
+
+ extraData.RemoveAll(true);*/
+
+ }
+ break;
+ case IDA_LIST_ELEMENT_VIDEO_CALL:
+ {
+ //todo: call once video call implemented
+ return;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+// listView.UpdateList();
+}
+
+void
+DialTabLogs::OnGroupedListViewItemSwept(GroupedListView& listView, int groupIndex, int itemIndex, SweepDirection direction)
+{
+ //Empty implementation
+}
+
+void
+DialTabLogs::OnActionPerformed(const Control& source, int actionId)
+{
+ CallLogDetails* pCalllogInfo = null;
+ __pDataProvider->GetItemAtGroupIndex(__deleteGroupIndex, __deleteItemIndex, &pCalllogInfo);
+ switch (actionId)
+ {
+ case IDA_CONTEXTMENU_VIEWBY:
+ {
+ ShowLogsViewByPopup();
+ }
+ break;
+
+ case IDA_FOOTER_LOG_DELETE:
+ {
+ if (__isEditMode == false)
+ {
+ SetCallLogDisplayMode(true);
+ }
+ else
+ {
+ ShowDeleteConfirmationPopup(IDA_POPUP_DELETEALL_YES);
+ }
+ }
+ break;
+
+ case IDA_CHECKBUTTON_SELECT_ALL:
+ {
+ __pCallLogId->RemoveAll();
+ HandleAllItemSelection();
+ }
+ break;
+
+ case IDA_CHECKBUTTON_UNSELECT_ALL:
+ {
+ SetListItemSelectStatus(false);
+ __pCallLogId->RemoveAll();
+ __selectedItemCount = 0;
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ __pSelectedLabel->Invalidate(false);
+ }
+ break;
+
+ case IDA_POPUP_DELETE_CANCEL:
+ {
+ __deleteLogsTimer.Cancel();
+ HideDeletePopup();
+ }
+ break;
+
+ case IDA_POPUP_DELETE_YES:
+ {
+ if(pCalllogInfo != null)
+ {
+ if(pCalllogInfo->GetConsecutiveNoCounter() > 1)
+ {
+ Tizen::Base::Collection::ArrayList* dbIds = pCalllogInfo->GetCallLogDbIds();
+ for(int i=0; i < dbIds->GetCount(); ++i)
+ {
+ Integer* in = (Integer*)dbIds->GetAt(i);
+ int p = in->ToInt();
+ __pLogPresentor->DeleteCalllogByDbId(p);
+ }
+ }
+ else
+ {
+ __pLogPresentor->DeleteCalllogByDbId(pCalllogInfo->GetCalllogDbId());
+ }
+ __pLogPresentor->DeleteItemAtGroupIndex(__deleteGroupIndex, __deleteItemIndex);
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ __pFormFooter->Invalidate(true);
+ if(__pConfirmationDeletePopup != null)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+ }
+ }
+ break;
+
+ case IDA_POPUP_DELETEALL_YES:
+ {
+ if(__pConfirmationDeletePopup != null)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ DeleteSelectedCalllog();
+ }
+ break;
+
+
+ case IDA_POPUP_DELETE_NO:
+ {
+ if(__pConfirmationDeletePopup != null)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+DialTabLogs::SetListItemSelectStatus(bool status)
+{
+ int groupIndex = 0;
+ int itemIndex = 0;
+ int itemCount = 0;
+
+ __isSelectAll = status;
+ CallLogDetails* pCalllogInfo = null;
+ for (; groupIndex < __groupCount; groupIndex++)
+ {
+ itemCount = __plogsListView->GetItemCountAt(groupIndex);
+ for (itemIndex = 0; itemIndex < itemCount; itemIndex++)
+ {
+ __plogsListView->SetItemChecked(groupIndex, itemIndex, status);
+ if(status == true)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Add(new Integer(pCalllogInfo->GetCalllogDbId()));
+ }
+ }
+ }
+ __pFormFooter->SetItemEnabled(0, status);
+ __pFormFooter->Invalidate(true);
+ __plogsListView->Invalidate(true);
+}
+
+void
+DialTabLogs::SetCallLogDisplayMode(bool isEdit)
+{
+ AppLogDebug("Enter %d",isEdit);
+ if(isEdit == __isEditMode)
+ {
+ AppLog("Delete process return");
+ return;
+ }
+ if( __pFormFooter == null)
+ {
+ AppLog("__pFormFooter == null");
+ return;
+ }
+
+ __itemCount = __pLogPresentor->GetCallLogsViewedCount();
+ __groupCount = __plogsListView->GetGroupCount();
+ __pButtonSelectAll->SetSelected(false);
+ if (isEdit == false)
+ {
+ __isEditMode = false;
+ __pDataProvider->SetListItemStyle(false);
+ __plogsListView->SetSweepEnabled(true);
+ const Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return;
+ }
+ __plogsListView->SetBounds(pForm->GetX(), pForm->GetY(), pForm->GetWidth(), pForm->GetClientAreaBounds().height);
+ __plogsListView->UpdateList();
+ __pFormFooter->RemoveItemAt(1);
+
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ __pButtonSelectAll->SetShowState(false);
+ __pSelectedLabel->SetShowState(false);
+ __pSelectedLabel->Invalidate(false);
+ __pFormFooter->Invalidate(true);
+ }
+ else
+ {
+ __isEditMode = true;
+ const Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return;
+ }
+ __pDataProvider->SetListItemStyle(isEdit);
+ __plogsListView->SetSweepEnabled(false);
+
+ //reset size to allow "SELECT ALL" & "TOAST MSG"
+ if(pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX + 20, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ else
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ UnCheckAllItems();
+ __plogsListView->UpdateList();
+ __pButtonSelectAll->SetShowState(true);
+ __pFormFooter->SetItemEnabled(0, false);
+ __selectedItemCount = 0;
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ __pSelectedLabel->SetShowState(true);
+ __pSelectedLabel->Invalidate(false);
+ __pFormFooter->Invalidate(true);
+ }
+ Draw();
+}
+
+void
+DialTabLogs::UnCheckAllItems(void)
+{
+ int itemCount = 0;
+ __groupCount = __plogsListView->GetGroupCount();
+ for(int groupIndex = 0; groupIndex < __groupCount; groupIndex++)
+ {
+ itemCount = __plogsListView->GetItemCountAt(groupIndex);
+ for(int itemIndex = itemCount-1; itemIndex >=0 ; itemIndex--)
+ {
+ bool isSelected = __plogsListView->IsItemChecked(groupIndex, itemIndex);
+ if(isSelected == true)
+ {
+ __plogsListView->SetItemChecked(groupIndex,itemIndex,false);
+ }
+ }
+ }
+ __plogsListView->Invalidate(true);
+ __selectedItemCount = 0;
+}
+
+void DialTabLogs::OnCalllogChanged(void)
+{
+ // If select all was selected before and some new calls are added (Auto rejeted call)
+ //Then we will not update the call log list.
+ if(__isEditMode == false)
+ {
+ if(__pConfirmationDeletePopup != null)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ }
+ UpdateCallLogList();
+ }
+ //It won't update the log list when delete is on progress.
+ /*else if(__isEditMode == true && __isDeleteInProgress == false)
+ {
+ __plogsListView->UpdateList();
+ __plogsListView->Invalidate(false);
+ }*/
+ //Update the log list for all MO/MT/MSG if the log list is in edit mode and delete is not on progress
+ else if(__isEditMode == true && __isDeleteInProgress == false)
+ {
+ if(__plogsListView != null)
+ {
+ __pLogPresentor->UpdateCallLogList();
+ __plogsListView->UpdateList();
+ __plogsListView->Invalidate(false);
+ if(__pLogPresentor->GetCallLogsViewedCount() == 0)
+ {
+ SetCallLogDisplayMode(false);
+ }
+ }
+ }
+ if(IsScecneVisible() == true && __isDeleteInProgress == false)
+ {
+ ManageItemSelection();
+ }
+}
+
+void
+DialTabLogs::UpdateCallLogList()
+{
+ AppLogDebug("Enter");
+
+ __pLogPresentor->UpdateCallLogList();
+ __plogsListView->UpdateList();
+ if (__pFormFooter != null)
+ {
+ if(__pLogPresentor->GetAllCallLogCount() > 0)
+ {
+ __pFormFooter->SetShowState(true);
+ __pFormFooter->SetItemEnabled(0,true);
+ }
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ __pFormFooter->Invalidate(true);
+ }
+}
+
+void
+DialTabLogs::ShowDeletePopup(void)
+{
+ __isDeleteInProgress = true;
+ if (__pDeletePopup != null)
+ {
+ delete __pDeletePopup;
+ __pDeletePopup = null;
+ }
+ if(__selectedItemCount == 0)
+ {
+ AppLogDebug("Wrong state");
+ return;
+ }
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+
+ __pDeletePopup = new (std::nothrow) Popup();
+ __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
+ __pDeletePopup->AddWindowEventListener(*this);
+
+ Rectangle clientBounds = __pDeletePopup->GetClientAreaBounds();
+
+ Label* pLabelTitle = new (std::nothrow) Label();
+ pLabelTitle->Construct(Rectangle(0, Y_DELETE_POPUP_TITLE, clientBounds.width, H_DELETE_POPUP_ELEMENT), AppUtility::GetResourceString(IDS_DELETING_CALL_LOGS));
+ pLabelTitle->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelTitle->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_BOLD);
+ pLabelTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ __pDeletePopup->AddControl(*pLabelTitle);
+
+ Progress* pProgress = new (std::nothrow) Progress();
+ pProgress->Construct(Rectangle(0, Y_DELETE_POPUP_TITLE + H_DELETE_POPUP_ELEMENT, clientBounds.width, H_DELETE_POPUP_PROGRESS), 0, __selectedItemCount);
+
+ __pDeletePopup->AddControl(*pProgress);
+
+ Label* pLabelPercentage = new (std::nothrow) Label();
+ pLabelPercentage->Construct(Rectangle(0, pProgress->GetY() + pProgress->GetHeight(), clientBounds.width / 2, H_DELETE_POPUP_ELEMENT), Integer::ToString(pProgress->GetPercentComplete()) + L"%");
+ pLabelPercentage->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelPercentage->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelPercentage->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+
+ __pDeletePopup->AddControl(*pLabelPercentage);
+
+ String currentOfTotal(Integer::ToString(pProgress->GetValue()) + L" / " + Integer::ToString(__selectedItemCount));
+ Label* pLabelTotal = new (std::nothrow) Label();
+ pLabelTotal->Construct(Rectangle(clientBounds.width / 2, pLabelPercentage->GetY(), clientBounds.width / 2, H_DELETE_POPUP_ELEMENT), currentOfTotal);
+ pLabelTotal->SetTextHorizontalAlignment(ALIGNMENT_RIGHT);
+ pLabelTotal->SetTextColor(COLOR_DELETE_POPUP_TEXT);
+ pLabelTotal->SetTextConfig(FONT_SIZE_DELETE_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+
+ __pDeletePopup->AddControl(*pLabelTotal);
+
+ Button* pCancelButton = new (std::nothrow) Button();
+ pCancelButton->Construct(Rectangle((clientBounds.width - W_DELETE_POPUP_CANCEL_BUTTON) / 2, Y_DELETE_POPUP_CANCEL_BUTTON, W_DELETE_POPUP_CANCEL_BUTTON, H_DELETE_POPUP_CANCEL_BUTTON));
+ pCancelButton->SetText(AppUtility::GetResourceString(IDS_CANCEL_DELETING_CALL_LOGS));
+ pCancelButton->SetActionId(IDA_POPUP_DELETE_CANCEL);
+ pCancelButton->AddActionEventListener(*this);
+
+ __pDeletePopup->AddControl(pCancelButton);
+ __pDeletePopup->Show();
+
+}
+
+void
+DialTabLogs::OnWindowActivated (const Tizen::Ui::Window &source)
+{
+ __deleteLogsTimer.Start(1);
+}
+
+void
+DialTabLogs::OnTimerExpired(Tizen::Base::Runtime::Timer &timer)
+{
+ Progress* pProgress = static_cast<Progress *>(__pDeletePopup->GetControl(1));
+
+ pProgress->SetValue(pProgress->GetValue() + 1);
+ pProgress->Invalidate(false);
+
+ Label* pLabelPercentage = static_cast<Label *>(__pDeletePopup->GetControl(2));
+
+ pLabelPercentage->SetText(Integer::ToString(pProgress->GetPercentComplete()) + L"%");
+ pLabelPercentage->Invalidate(false);
+
+ Label* pLabelTotal = static_cast<Label *>(__pDeletePopup->GetControl(3));
+
+ String currentOfTotal = pLabelTotal->GetText();
+ currentOfTotal.Remove(0, Integer::ToString(pProgress->GetValue() - 1).GetLength());
+ currentOfTotal.Insert(Integer::ToString(pProgress->GetValue()), 0);
+ pLabelTotal->SetText(currentOfTotal);
+ pLabelTotal->Invalidate(false);
+
+ if (RemoveLogsList() == E_SUCCESS)
+ {
+ __deleteLogsTimer.Start(1);
+ }
+ else
+ {
+ HideDeletePopup();
+ }
+}
+
+result
+DialTabLogs::RemoveLogsList(void)
+{
+ result r = E_FAILURE;
+
+ CallLogDetails* pCalllogInfo = null;
+ for(int groupIndex = __deleteGroupIndex; groupIndex < __plogsListView->GetGroupCount(); groupIndex++)
+ {
+ int itemCount = __plogsListView->GetItemCountAt(groupIndex);
+ for(int itemIndex = __deleteItemIndex; itemIndex < itemCount ; itemIndex++)
+ {
+ bool isSelected = __plogsListView->IsItemChecked(groupIndex, itemIndex);
+ if(isSelected == true)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ if(pCalllogInfo != null)
+ {
+ __plogsListView->SetItemChecked(groupIndex, itemIndex, false);
+ if(pCalllogInfo->GetConsecutiveNoCounter() > 1)
+ {
+ Tizen::Base::Collection::ArrayList* dbIds = pCalllogInfo->GetCallLogDbIds();
+ for(int i=0; i < dbIds->GetCount(); ++i)
+ {
+ Integer* in = (Integer*)dbIds->GetAt(i);
+ int p = in->ToInt();
+ __pLogPresentor->DeleteCalllogByDbId(p);
+ }
+ }
+ else
+ {
+ __pLogPresentor->DeleteCalllogByDbId(pCalllogInfo->GetCalllogDbId());
+ }
+
+ r = E_SUCCESS;
+ __deleteGroupIndex = groupIndex;
+ __deleteItemIndex = ++itemIndex;
+ __pCallLogId->Remove(Integer(pCalllogInfo->GetCalllogDbId()));
+ return r;
+ }
+ }
+ }
+ __deleteItemIndex = 0;
+ }
+ __deleteGroupIndex = 0;
+ __deleteItemIndex = 0;
+
+ return r;
+}
+
+void
+DialTabLogs::HideDeletePopup(void)
+{
+ __isDeleteInProgress = false;
+ if (__pDeletePopup != null)
+ {
+ __pDeletePopup->SetShowState(false);
+ __pDeletePopup->Invalidate(true);
+ SendUserEvent(REQUEST_CHANGE_EDIT_MODE,null);
+ }
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ __pFormFooter->Invalidate(true);
+}
+
+void
+DialTabLogs::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ switch(requestId)
+ {
+ case REQUEST_CHANGE_EDIT_MODE:
+ {
+ //CustomDataProvider::setCallLogViewbyID(CALL_LOG_TYPE_ALL);
+ UpdateCallLogList();
+ SetCallLogDisplayMode(false);
+ }
+ break;
+
+ case REQUEST_CHANGE_VIEWBY:
+ {
+ UpdateCallLogList();
+ if(__pLogPresentor->GetCallLogsViewedCount() > 0)
+ {
+ __pFormFooter->SetItemEnabled(0, true);
+ }
+ else
+ {
+ __pFormFooter->SetItemEnabled(0, false);
+ }
+ }
+ break;
+ }
+
+}
+
+void
+DialTabLogs::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ if (__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl request completed.
+ __isMsgAppControlLaunched = false;
+ }
+ if (__isCallAppControlLaunched == true)
+ {
+ //Call AppControl request completed.
+ __isCallAppControlLaunched = false;
+ }
+ if(__pLogsViewbyPopup != null && __pLogPresentor->GetAllCallLogCount() == 0)
+ {
+ delete __pLogsViewbyPopup;
+ __pLogsViewbyPopup = null;
+ }
+ SetSceneVisible(true);
+ ManageItemSelection();
+
+ //change the font, if font has been changed from backgroung
+ float fontSize = 0.0;
+ float itemHeight = 0.0;
+ AppUtility::GetGlobalFontAndItemHeight(&fontSize, &itemHeight);
+ if(__fontSize != fontSize)
+ {
+ __fontSize = fontSize;
+ __itemHeight = itemHeight;
+ __plogsListView->UpdateList();
+ if(__pLogsViewbyPopup != null && __pLogsViewbyPopup->GetShowState() == true)
+ {
+ __pLogsViewbyPopup->UpdateViewByPopupList();
+ }
+ }
+
+ //fix for N_SE-55993 start
+ if (__isEditMode == true && (__selectedItemCount == 0 || __pLogPresentor->GetCallLogsViewedCount() == 0)
+ && __pConfirmationDeletePopup != null
+ && __pConfirmationDeletePopup->GetShowState() == true)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ String selStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ __pSelectedLabel->SetText(selStr);
+ __pSelectedLabel->Invalidate(true);
+ __pFormFooter->SetItemEnabled(0, false);
+ __pFormFooter->Invalidate(true);
+ }
+ //fix for N_SE-55993 end
+}
+
+void
+DialTabLogs::OnBackground(void)
+{
+ SetSceneVisible(false);
+}
+
+void
+DialTabLogs::StoreItemselection(int groupIndex, int itemIndex, int elementId, ListItemStatus state)
+{
+ CallLogDetails* pCalllogInfo = null;
+ if (state == LIST_ITEM_STATUS_CHECKED)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Add(new Integer(pCalllogInfo->GetCalllogDbId()));
+ }
+ else if (state == LIST_ITEM_STATUS_UNCHECKED)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+ __pCallLogId->Remove(Integer(pCalllogInfo->GetCalllogDbId()));
+ }
+}
+void
+DialTabLogs:: ManageItemSelection(void)
+{
+ if(__isEditMode == true && __selectedItemCount > 0 && __pLogPresentor->GetCallLogsViewedCount() != __itemCount)
+ {
+ UnCheckAllItems();
+ int itemCount = 0;
+ CallLogDetails* pCalllogInfo = null;
+ for(int groupIndex = 0; groupIndex < __groupCount; groupIndex++)
+ {
+ itemCount = __plogsListView->GetItemCountAt(groupIndex);
+ for(int itemIndex = itemCount-1; itemIndex >=0 ; itemIndex--)
+ {
+ __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
+
+ if(pCalllogInfo->GetConsecutiveNoCounter() > 1)
+ {
+ Tizen::Base::Collection::ArrayList* dbIds = pCalllogInfo->GetCallLogDbIds();
+ for(int i=0; i < dbIds->GetCount(); ++i)
+ {
+ Integer* in = (Integer*)dbIds->GetAt(i);
+ if(__pCallLogId->Contains(*in))
+ {
+ __plogsListView->SetItemChecked(groupIndex,itemIndex,true);
+ ++__selectedItemCount;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if(__pCallLogId->Contains(Integer(pCalllogInfo->GetCalllogDbId())))
+ {
+ __plogsListView->SetItemChecked(groupIndex,itemIndex,true);
+ ++__selectedItemCount;
+ }
+ }
+ }
+ }
+ __itemCount = __pLogPresentor->GetCallLogsViewedCount();
+ if(__selectedItemCount == __itemCount)
+ {
+ __pButtonSelectAll->SetSelected(true);
+ }
+ else
+ {
+ __pButtonSelectAll->SetSelected(false);
+ }
+ String selItemStr = L"";
+ String text;
+ if(__selectedItemCount == 0)
+ {
+ selItemStr = AppUtility::GetResourceString(IDS_SELECT_CALL_LOG);
+ }
+ selItemStr = AppUtility::GetResourceString(IDS_SELECTED_ITEM_STRING);
+ text.Format(100, selItemStr.GetPointer(), __selectedItemCount);
+ __pSelectedLabel->SetText(text);
+ __pSelectedLabel->Invalidate(false);
+ }
+ __itemCount = __pLogPresentor->GetCallLogsViewedCount();
+}
+
+bool
+DialTabLogs::IsScecneVisible()
+{
+ return __isSceneVisible;
+}
+
+
+void
+DialTabLogs::SetSceneVisible(bool sceneMode)
+{
+ __isSceneVisible = sceneMode;
+}
+
+void
+DialTabLogs::ShowLogsViewByPopup(void)
+{
+ if(__pLogsViewbyPopup != null)
+ {
+ delete __pLogsViewbyPopup;
+ __pLogsViewbyPopup = null;
+ }
+
+ __pLogsViewbyPopup = new (std::nothrow) CallLogViewByPopup(*this);
+ __pLogsViewbyPopup->ConstructViewbyPopup();
+ __pLogsViewbyPopup->SetShowState(true);
+ __pLogsViewbyPopup->Draw();
+ __pLogsViewbyPopup->Show();
+}
+
+void
+DialTabLogs::OnItemSelected()
+{
+ SendUserEvent(REQUEST_CHANGE_VIEWBY, null);
+}
+
+void
+DialTabLogs::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ const Form* pForm = dynamic_cast<Form*>(GetParent());
+ if(pForm == null)
+ {
+ return;
+ }
+ if((pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || pForm->GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE) && __isEditMode == true)
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX + 20, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ else if(__isEditMode == true)
+ {
+ Rectangle newRect(pForm->GetX(), H_SELECTALL_CHK_BOX, pForm->GetWidth(), (pForm->GetClientAreaBounds().height - H_SELECTALL_CHK_BOX - H_TOAST_MSG));
+ __plogsListView->SetBounds(newRect);
+ }
+ else
+ {
+ __plogsListView->SetBounds(pForm->GetX(), pForm->GetY(), pForm->GetWidth(), pForm->GetClientAreaBounds().height);
+ }
+}
+
+void
+DialTabLogs::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+ AppLog("Enter");
+ __plogsListView->UpdateList();
+}
+
+void
+DialTabLogs::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLog("Enter");
+ if(key.Equals(String(SETTING_INFO_KEY_TIME_FORMAT)) == true )
+ {
+ __plogsListView->UpdateList();
+ }
+ else if(key.Equals(String(SETTING_INFO_KEY_DATE_CHANGE)) == true)
+ {
+ __pLogPresentor->UpdateCallLogList();
+ __plogsListView->UpdateList();
+ }
+ else if(key.Equals(String(SETTING_INFO_KEY_CONTACTS_ORDER)) == true )
+ {
+ __plogsListView->UpdateList();
+ }
+ AppLog("Exit");
+}
+
+void
+DialTabLogs::ShowOptionsMenu()
+{
+ AppLogDebug("Enter");
+ if(__isEditMode == false && __pLogPresentor->GetAllCallLogCount() > 0)
+ {
+ if(__pOptionMenu != null)
+ {
+ AppLogDebug("__pOptionMenu != null");
+ delete __pOptionMenu;
+ __pOptionMenu = null;
+ }
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->RemoveAllItems();
+ __pOptionMenu->AddItem(AppUtility::GetResourceString(IDS_CONTEXTMENU_ITEM_VIEWBY), IDA_CONTEXTMENU_VIEWBY);
+ __pOptionMenu->AddActionEventListener(*this);
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+ }
+}
+
+void
+DialTabLogs::CancelDelete()
+{
+ __pCallLogId->RemoveAll();
+ SetCallLogDisplayMode(false);
+}
+
+void
+DialTabLogs::HandleFormBackRequest()
+{
+ AppLogDebug("Enter");
+ if(__isEditMode == true)
+ {
+ CancelDelete();
+ }
+ else
+ {
+ PhoneApp* pPhoneApp = static_cast<PhoneApp*>(UiApp::GetInstance());
+ if(pPhoneApp->IsOpenAsAppControl() == true)
+ {
+ //launched as "AddCall" AppControl, send response
+ pPhoneApp->SendAppControlResponseMessage(APP_CTRL_RESULT_CANCELED, null);
+ }
+ pPhoneApp->Terminate();
+ }
+}
+
+bool
+DialTabLogs::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(__pConfirmationDeletePopup != null && __pConfirmationDeletePopup->GetShowState() == true)
+ {
+ __pConfirmationDeletePopup->SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+DialTabLogs::ShowDeleteConfirmationPopup(int deleteCommandIdYes)
+{
+ if(__pConfirmationDeletePopup != null)
+ {
+ delete __pConfirmationDeletePopup;
+ __pConfirmationDeletePopup = null;
+ }
+
+ __pConfirmationDeletePopup = new (std::nothrow) Popup();
+ __pConfirmationDeletePopup->Construct(false, Dimension(688,230));
+ __pConfirmationDeletePopup->SetPropagatedKeyEventListener(this);
+ Label *pDeleteTitle = new Label();
+ pDeleteTitle->Construct(Rectangle(16,32,656,80), AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+ pDeleteTitle->SetTextConfig(38, LABEL_TEXT_STYLE_BOLD);
+ pDeleteTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pDeleteTitle->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ __pConfirmationDeletePopup->AddControl(pDeleteTitle);
+
+ //Yes button
+ Rectangle yesRect(354, 132, 318, 74);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_YES));
+ pYesButton->SetActionId(deleteCommandIdYes);
+ pYesButton->AddActionEventListener(*this);
+ pYesButton->SetColor(BUTTON_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ pYesButton->SetColor(BUTTON_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pConfirmationDeletePopup->AddControl(pYesButton);
+
+ //No button
+ Rectangle noRect(16, 132, 318, 74);
+ Button* pNoButton = new Button();
+ pNoButton->Construct(noRect, AppUtility::GetResourceString(IDS_DELETE_NO));
+ pNoButton->SetActionId(IDA_POPUP_DELETE_NO);
+ pNoButton->AddActionEventListener(*this);
+ __pConfirmationDeletePopup->AddControl(pNoButton);
+ __pConfirmationDeletePopup->SetShowState(true);
+ __pConfirmationDeletePopup->Show();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTabLogsItemProvider.cpp
+ * @brief Call log item provider
+ */
+
+#include <FGraphics.h>
+#include <FUi.h>
+#include <FUiControl.h>
+#include <FBase.h>
+#include <FMedia.h>
+#include <FApp.h>
+#include <FLocales.h>
+#include <FSystem.h>
+#include "PhnAppUtility.h"
+#include "PhnCommonUtils.h"
+#include "PhnTypes.h"
+#include "PhnTabLogsItemProvider.h"
+#include "PhnCallLogPresentationModel.h"
+#include "PhnTypes.h"
+#include "PhnCallLogViewByPopup.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Locales;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+
+const int MAX_TWELVEHOUR_FORMAT = 12;
+const int MAX_TWELVEHOUR_FORMAT_LENGTH = 9;
+const int MAX_TWENTYFOUR_FORMAT_LENGTH = 6;
+const int H_LOG_ITEM = 128;
+const int H_LOG_ITEM_TEXT = 50;
+const int W_LOG_ITEM_TEXT = 50;
+const int LOG_ITEM_FONT_SIZE = 32;
+const int H_LOGS_FONT_MARGIN = 20;
+
+const wchar_t* IDS_MSG_CONTEXT_ITEM = L"IDS_MSG_BTN_NAME";
+const wchar_t* IDS_VIDEO_CALL_CONTEXT_ITEM = L"IDS_VIDEO_CALL_BTN_NAME";
+const wchar_t* IDS_VOICE_CALL_CONTEXT_ITEM = L"IDS_VOICE_CALL_BTN_NAME";
+const wchar_t* IDS_LEFT_BRACE = L" (";
+const wchar_t* IDS_RIGHT_BRACE = L")";
+
+static const unsigned int COLOR_ITEM_DELETE_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
+CustomDataProvider::CustomDataProvider(void)
+{
+ __isEditStyle = false;
+ __pGroupData = null;
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();;
+ __pItemContext = new ListContextItem();
+ __pItemContext->Construct();
+ String voiceCallStr = AppUtility::GetResourceString(IDS_VOICE_CALL_CONTEXT_ITEM);
+ __pItemContext->AddElement(IDA_LIST_ELEMENT_CALL, voiceCallStr);
+ String messageStr = AppUtility::GetResourceString(IDS_MSG_CONTEXT_ITEM);
+ __pItemContext->AddElement(IDA_LIST_ELEMENT_MESSAGE, messageStr);
+ String videoCallStr = AppUtility::GetResourceString(IDS_VIDEO_CALL_CONTEXT_ITEM);
+ __pItemContext->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, videoCallStr, false);
+ String delStr = AppUtility::GetResourceString(IDS_DELETE_BTN_STRING);
+ __pItemContext->AddElement(IDA_LIST_ELEMENT_DELETE, delStr);
+ __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContext->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT));
+
+
+ __pItemContextForMMLogs = new ListContextItem();
+ __pItemContextForMMLogs->Construct();
+ voiceCallStr = AppUtility::GetResourceString(IDS_VOICE_CALL_CONTEXT_ITEM);
+ __pItemContextForMMLogs->AddElement(IDA_LIST_ELEMENT_CALL, voiceCallStr, false);
+ messageStr = AppUtility::GetResourceString(IDS_MSG_CONTEXT_ITEM);
+ __pItemContextForMMLogs->AddElement(IDA_LIST_ELEMENT_MESSAGE, messageStr);
+ videoCallStr = AppUtility::GetResourceString(IDS_VIDEO_CALL_CONTEXT_ITEM);
+ __pItemContextForMMLogs->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, videoCallStr, false);
+ delStr = AppUtility::GetResourceString(IDS_DELETE_BTN_STRING);
+ __pItemContextForMMLogs->AddElement(IDA_LIST_ELEMENT_DELETE, delStr);
+ __pItemContextForMMLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ __pItemContextForMMLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContextForMMLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContextForMMLogs->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT));
+
+
+ __pItemContextForHidenLogs = new ListContextItem();
+ __pItemContextForHidenLogs->Construct();
+ voiceCallStr = AppUtility::GetResourceString(IDS_VOICE_CALL_CONTEXT_ITEM);
+ __pItemContextForHidenLogs->AddElement(IDA_LIST_ELEMENT_CALL, voiceCallStr, false);
+ messageStr = AppUtility::GetResourceString(IDS_MSG_CONTEXT_ITEM);
+ __pItemContextForHidenLogs->AddElement(IDA_LIST_ELEMENT_MESSAGE, messageStr, false);
+ videoCallStr = AppUtility::GetResourceString(IDS_VIDEO_CALL_CONTEXT_ITEM);
+ __pItemContextForHidenLogs->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, videoCallStr, false);
+ delStr = AppUtility::GetResourceString(IDS_DELETE_BTN_STRING);
+ __pItemContextForHidenLogs->AddElement(IDA_LIST_ELEMENT_DELETE, delStr);
+ __pItemContextForHidenLogs->AddElement(IDA_LIST_ELEMENT_DELETE, delStr);
+ __pItemContextForHidenLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ __pItemContextForHidenLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContextForHidenLogs->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ __pItemContextForHidenLogs->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT));
+
+
+ __fontSize = 44.f;
+ __itemHeight = 112.f;
+
+ return;
+}
+
+CustomDataProvider::~CustomDataProvider(void)
+{
+ //ArrayList* pCalllogList = null;\r
+ //GroupItemClass* pGroupInfo = null;\r
+
+ if(__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ }
+ if (__pItemContext != null)
+ {
+ delete __pItemContext;
+ __pItemContext = null;
+ }
+ if (__pItemContextForMMLogs != null)
+ {
+ delete __pItemContextForMMLogs;
+ __pItemContextForMMLogs = null;
+ }
+ if (__pItemContextForHidenLogs != null)
+ {
+ delete __pItemContextForHidenLogs;
+ __pItemContextForHidenLogs = null;
+ }
+}
+
+void
+CustomDataProvider::GetItemAtGroupIndex(int groupIndex, int itemIndex, CallLogDetails** pCalllogDetails)
+{
+ if(__pGroupData != null)
+ {
+ GroupItemClass* pGroupInfo = null;
+ ArrayList* list = null;
+ pGroupInfo = static_cast<GroupItemClass*>(__pGroupData->GetAt(groupIndex));
+ if(pGroupInfo != null)
+ {
+ list = pGroupInfo->GetLogData();
+ *pCalllogDetails = static_cast<CallLogDetails*>(list->GetAt(itemIndex));
+ }
+ }
+}
+
+int
+CustomDataProvider::GetGroupCount(void)
+{
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ __pGroupData = CalLogPresentationModel::GetInstance()->GetCallLogGroups();\r
+ if(__pGroupData != null)
+ {
+ return __pGroupData->GetCount();
+ }
+ return 0;
+}
+
+int
+CustomDataProvider::GetItemCount(int groupIndex)
+{
+ GroupItemClass* group = null;
+ if(__pGroupData != null)
+ {
+ group = static_cast<GroupItemClass*>(__pGroupData->GetAt(groupIndex));
+ if(group)
+ {
+ return (group->GetLogData())->GetCount();
+ }
+ }
+ return 0;
+}
+
+GroupItem*
+CustomDataProvider::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ GroupItemClass* group = null;
+ if(__pGroupData != null)
+ {
+ group = static_cast<GroupItemClass*>(__pGroupData->GetAt(groupIndex));
+ if(group)
+ {
+ GroupItem* pItem = new GroupItem();
+ pItem->Construct(Dimension(itemWidth, 48));
+
+ String appPath = (Application::GetInstance())->GetAppRootPath();
+ Bitmap* pBitmap = null;
+ pBitmap = pAppResource->GetBitmapN(IDB_CALLOG_LIST_BG,BITMAP_PIXEL_FORMAT_ARGB8888);
+ pItem->SetElement(group->GetTitleText(), pBitmap);
+ return pItem;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ return null;
+
+}
+
+ListItemBase*
+CustomDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ AppLogDebug("Enter");
+ GroupItemClass* pGroup = null;
+ ArrayList* pCalllogList = null;
+ CallLogDetails* pCalllogData = null;
+ String phoneNumber(AppUtility::GetResourceString(IDS_CALLLOG_NO_NUMBER));
+ String contactName(AppUtility::GetResourceString(IDS_CALLLOG_NO_NAME));
+ DateTime calllogDate;
+ String dateText(L"");
+ String key(L"24HourFormatSelected");
+ String amPm;
+ bool dateFormat24 = true;
+ Bitmap* pBitmap = null;
+
+ if(__pGroupData != null)
+ {
+ pGroup = static_cast<GroupItemClass*>(__pGroupData->GetAt(groupIndex));
+ if(pGroup != null)
+ {
+ pCalllogList = pGroup->GetLogData();
+ if(pCalllogList != null)
+ {
+ pCalllogData = static_cast<CallLogDetails*>(pCalllogList->GetAt(itemIndex));
+ }
+ }
+ }
+
+ if(pCalllogData == null)
+ {
+ return null;
+ }
+ else
+ {
+ if(pCalllogData->GetPhoneNumber() != null)
+ {
+ phoneNumber = pCalllogData->GetPhoneNumber();
+ }
+
+ //CallLogManager* pManager = CallLogManager::GetInstance();
+ CalLogPresentationModel::GetInstance()->GetCalllogContactName(phoneNumber,contactName);
+ pCalllogData->ConvertTimetoDateTime();
+ calllogDate = pCalllogData->GetDateTime();
+ int hour = calllogDate.GetHour();
+ SettingInfo::GetValue(key, dateFormat24);
+
+ if (dateFormat24 == false)
+ {
+ if (hour > MAX_TWELVEHOUR_FORMAT)
+ {
+ hour -= MAX_TWELVEHOUR_FORMAT;
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ else if (hour < MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_AM_TIME));
+ }
+ else if (hour == MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ dateText.Format(MAX_TWELVEHOUR_FORMAT_LENGTH,L"%02d:%02d %ls", hour, calllogDate.GetMinute(), amPm.GetPointer());
+ }
+ else
+ {
+ dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:%02d", calllogDate.GetHour(), calllogDate.GetMinute());
+ }
+
+ }
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+ EnrichedText* pText = new (std::nothrow) EnrichedText();\r
+ TextElement* textElement = new (std::nothrow) TextElement();
+ Font font;
+ String appPath = (Application::GetInstance())->GetAppRootPath();
+
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+
+ if (__isEditStyle == true)
+ {
+ style = LIST_ANNEX_STYLE_MARK;
+ }
+
+ pItem->Construct(Dimension(itemWidth, __itemHeight), style);
+\r
+ float mainTextWidth = 0.0;
+ float countTextWidth = 0.0;
+ String countString(L"");
+ if(pCalllogData->GetConsecutiveNoCounter() > 1)
+ {
+ float textWidth = GetTextWidth(contactName);
+ countString.Append(IDS_LEFT_BRACE);
+ countString.Append(pCalllogData->GetConsecutiveNoCounter());
+ countString.Append(IDS_RIGHT_BRACE);
+ countTextWidth = GetTextWidth(countString);
+ float width = 0.0;
+ if (__isEditStyle == false)
+ {
+ width = ((itemWidth - W_TEXT_LINE1_ITEM_RIGHT_MARGIN) - countTextWidth);
+ }
+ else
+ {
+ width = ((itemWidth - W_TEXT_LINE1_ITEM_RIGHT_MARGIN) - countTextWidth - 76);
+ }
+ if(textWidth > width)
+ {
+ mainTextWidth = width;
+ }
+ else
+ {
+ mainTextWidth = textWidth;
+ }
+ }
+ else
+ {
+ if (__isEditStyle == false)
+ {
+ mainTextWidth = itemWidth - W_TEXT_LINE1_ITEM_RIGHT_MARGIN;
+ }
+ else
+ {
+ mainTextWidth = itemWidth - W_TEXT_LINE1_ITEM_RIGHT_MARGIN - W_TEXT_LINE2_ITEM_RIGHT_MARGIN_DELETE;
+ }
+ }
+ AppLog("mainTextWidth = %f", mainTextWidth);
+ float mainTextHeight = __fontSize + H_LOGS_FONT_MARGIN;
+ if (__isEditStyle == false)
+ {
+ if(pCalllogData->GetConsecutiveNoCounter() > 1)
+ {
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, mainTextWidth, mainTextHeight), ID_NAME_STRING, contactName, __fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM + mainTextWidth, Y_TEXT_LINE1_ITEM, countTextWidth, mainTextHeight), ID_NAME_STRING_COUNTER, countString,__fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), false);
+ }
+ else
+ {
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, mainTextWidth, mainTextHeight), ID_NAME_STRING, contactName,__fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+ }
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE2_ITEM, (Y_TEXT_LINE1_ITEM + mainTextHeight), (itemWidth - W_TEXT_LINE2_ITEM_RIGHT_MARGIN), H_TEXT_LINE2_ITEM), ID_NUMBER_STRING, phoneNumber, 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_WHITE), Color::GetColor(COLOR_ID_GREY), true);
+ }
+ else
+ {
+ if(pCalllogData->GetConsecutiveNoCounter() > 1)
+ {
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, mainTextWidth, mainTextHeight), ID_NAME_STRING, contactName, __fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM + mainTextWidth, Y_TEXT_LINE1_ITEM, countTextWidth, mainTextHeight), ID_NAME_STRING_COUNTER, countString, __fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), false);
+ }
+ else
+ {
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, mainTextWidth, mainTextHeight), ID_NAME_STRING, contactName, __fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+ }
+ pItem->AddElement(FloatRectangle(X_TEXT_LINE2_ITEM, (Y_TEXT_LINE1_ITEM + mainTextHeight), (itemWidth - W_TEXT_LINE2_ITEM_RIGHT_MARGIN) - W_TEXT_LINE2_ITEM_RIGHT_MARGIN_DELETE, H_TEXT_LINE2_ITEM), ID_NUMBER_STRING, phoneNumber, 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), true);
+ }
+
+ pText->Construct(Dimension(W_LOG_ITEM_TEXT, H_LOG_ITEM_TEXT));\r
+ pText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);\r
+ pText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);\r
+ font.Construct(FONT_STYLE_PLAIN, LOG_ITEM_FONT_SIZE);
+ textElement->Construct(dateText);
+ textElement->SetFont(font);
+ textElement->SetTextColor(Color::GetColor(COLOR_ID_GREY));
+ pText->Add(*textElement);\r
+ if (__isEditStyle == false)
+ {
+ pItem->AddElement(Rectangle((itemWidth - X_TEXT_TIME_ITEM_RIGHT_MARGIN), (Y_TEXT_LINE1_ITEM + __fontSize), W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *pText);\r
+ }
+ else
+ {
+ pItem->AddElement(Rectangle((itemWidth - X_TEXT_TIME_ITEM_RIGHT_MARGIN) - 90, (Y_TEXT_LINE1_ITEM + __fontSize), W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *pText);\r
+ }
+
+ pBitmap = null;
+
+
+ Bitmap* pLogTypeBitmap = null;
+ GetCallogIconBitmap(pCalllogData->GetCalllogType(),pLogTypeBitmap,pBitmap);
+
+ if(pLogTypeBitmap != null)
+ {
+ if (__isEditStyle == false)
+ {
+ //pItem->AddElement(Rectangle(X_LOGCALL_BITMAP_ITEM, Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pLogTypeBitmap);
+ pItem->AddElement(Rectangle((itemWidth - X_LOGCALL_BITMAP_RIGHT_MARGIN), Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pLogTypeBitmap);
+ }
+ else
+ {
+ //pItem->AddElement(Rectangle(X_LOGCALL_BITMAP_ITEM - 90, Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pLogTypeBitmap);
+ pItem->AddElement(Rectangle((itemWidth - X_LOGCALL_BITMAP_RIGHT_MARGIN) - 90, Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pLogTypeBitmap);
+ }
+ delete pLogTypeBitmap;
+ pLogTypeBitmap = null;
+ }
+
+ if (pBitmap != null)
+ {
+ pItem->AddElement(Rectangle(X_CALLTYPE_BITMAP_ITEM, (Y_TEXT_LINE1_ITEM + __fontSize + 20), W_CALLTYPE_BITMAP_ITEM, H_CALLTYPE_BITMAP_ITEM), ID_CALLTYPE_BITMAP, *pBitmap);
+ delete pBitmap;
+ }
+
+ if (__isEditStyle == false)
+ {
+ //if it is a hidden call log
+ if(pCalllogData->GetPhoneNumber() == null)
+ {
+ pItem->SetContextItem(__pItemContextForHidenLogs);
+ }
+ else if(phoneNumber.Contains(L"@"))
+ {
+ pItem->SetContextItem(__pItemContextForMMLogs);
+ }
+ else
+ {
+ pItem->SetContextItem(__pItemContext);
+ }
+ }
+\r
+ delete pText;\r
+ return pItem;
+}
+
+float
+CustomDataProvider::GetTextWidth(String contactName)
+{
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(contactName);
+ Font* ContactNameTextfont = new (std::nothrow) Font();
+ ContactNameTextfont->Construct(FONT_STYLE_PLAIN, __fontSize);
+ FloatDimension textDimension;
+ ContactNameTextfont->GetTextExtent(contactName, contactName.GetLength(), textDimension);
+ delete pTextElement;
+ delete ContactNameTextfont;
+ return textDimension.width;
+}
+
+void
+CustomDataProvider::GetCallogIconBitmap(CallLogType logType,Bitmap*& iconType, Bitmap*& iconArrow)
+{
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ switch(logType)
+ {
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+
+ case CALL_LOG_TYPE_VIDEO_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_MISSED:
+ case CALL_LOG_TYPE_VIDEO_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+
+ case CALL_LOG_TYPE_SMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ default:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ }
+ break;
+ }
+}
+
+bool
+CustomDataProvider::DeleteItem(int groupIndex, int itemIndex, ListItemBase* pItem, int itemWidth)
+{
+ if (pItem != null)\r
+ {\r
+ delete pItem;\r
+ pItem = null;\r
+ }\r
+ return true;
+}
+
+bool
+CustomDataProvider::DeleteGroupItem(int groupIndex, GroupItem* pItem, int itemWidth)
+{
+ if (pItem != null)\r
+ {\r
+ delete pItem;\r
+ pItem = null;\r
+ }\r
+ return true;
+}
+
+void
+CustomDataProvider::SetListItemStyle(bool mode)
+{
+ __isEditStyle = mode;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnTypes.cpp
+ * @brief Common constants used in Phone application
+ */
+#include "PhnTypes.h"
+
+using namespace Tizen::Graphics;
+
+//Bitmaps for settings module
+const wchar_t* IDB_VOICECALL_ICON = L"C01-5_icon_voicecall.png";
+const wchar_t* IDB_LIST_EXPAND_CLOSE = L"00_button_expand_closed.png";
+const wchar_t* IDB_LIST_EXPAND_CLOSE_PRESSED = L"00_button_expand_closed_ef.png";
+const wchar_t* IDB_LIST_EXPAND_OPENED = L"00_button_expand_opened.png";
+const wchar_t* IDB_LIST_EXPAND_OPENED_PRESSED = L"00_button_expand_opened_ef.png";
+const wchar_t* IDB_BACK_HEADER_ITEM = L"00_icon_Back.png";
+const wchar_t* IDB_BACK_HEADER_ITEM_PRESSED = L"00_icon_Back_press.png";
+const wchar_t* IDB_CANCEL_NORMAL_FOOTER_ITEM = L"C01-5_icon_cancel_web.png";
+const wchar_t* IDB_CANCEL_PRESS_FOOTER_ITEM = L"C01-5_icon_cancel_web_press.png";
+const wchar_t* IDB_CANCEL_HEADER_ITEM = L"C01-5_icon_cancel.png";
+const wchar_t* IDB_PROCESSING_ICONS = L"00_list_process_";
+const wchar_t* IDB_SELECT_CONTACT__ICON = L"00_button_contact_ef.png";
+const wchar_t* IDB_SELECT_CONTACT_ICON_NORMAL = L"M01_contact_default_image.png";
+const wchar_t* IDB_SELECT_CONTACT_ICON_PRESSED = L"M01_contact_default_image_press.png";
+const wchar_t* IDB_SELECT_CONTACT_BG_ICON = L"00_list_square_thumbnail_normal.png";
+const wchar_t* IDB_SELECT_CONTACT_PRESS_BG_ICON = L"00_list_square_thumbnail_press.png";
+const wchar_t* IDB_SETTINGS_SINGLE_LIST_ITEM_BG = L"00_list_group_bg_ef.#.png";
+const wchar_t* IDB_SETTINGS_TOP_LIST_ITEM_BG = L"00_list_group_bg_top_ef.#.png";
+const wchar_t* IDB_SETTINGS_CENTER_LIST_ITEM_BG = L"00_list_group_bg_center_ef.#.png";
+const wchar_t* IDB_SETTINGS_BOTTOM_LIST_ITEM_BG = L"00_list_group_bg_bottom_ef.#.png";
+//Bitmap used in Dialer module
+const wchar_t* IDB_BTN_OPTION_BG_ICON = L"C01-3_predictive_circle_button_normal.png";
+const wchar_t* IDB_BTN_OPTION_PRESS_BG_ICON = L"C01-3_predictive_circle_button_press.png";
+const wchar_t* IDB_BTN_MORE_ICON = L"more.png";
+const wchar_t* IDB_BTN_MORE_PRESS_ICON = L"more_press.png";
+const wchar_t* IDB_POPUP_BUBBLE_ICON = L"C01-3_icon_expand_01.png";
+const wchar_t* IDB_POPUP_BUBBLE_PRESS_ICON = L"C01-3_icon_expand_01_press.png";
+const wchar_t* IDB_POPUP_BUBBLE_UP_ICON = L"C01-3_icon_expand_02.png";
+const wchar_t* IDB_POPUP_BUBBLE_UP_PRESS_ICON = L"C01-3_icon_expand_02_press.png";
+const wchar_t* IDB_DIALER_BTN_PRESS_ICON = L"C01-3_dialer_btn_press.9.png";
+//Keypad
+// Keypad Background Image
+const wchar_t* IDB_KEYPAD_BGICON = L"C01-3_keypad_bg.png";
+//Blank Language
+const wchar_t* IDS_BLANK_LANGUAGE = L"";
+const wchar_t* IDS_BLANK_FONTSIZE = L"";
+//Keypad Text
+const wchar_t* IDB_KEYPAD_NUMBER_00ICON = L"C01-3_keypad_number_00.png";
+const wchar_t* IDB_KEYPAD_NUMBER_01ICON = L"C01-3_keypad_number_01.png";
+const wchar_t* IDB_KEYPAD_NUMBER_02ICON = L"C01-3_keypad_number_02.png";
+const wchar_t* IDB_KEYPAD_NUMBER_03ICON = L"C01-3_keypad_number_03.png";
+const wchar_t* IDB_KEYPAD_NUMBER_04ICON = L"C01-3_keypad_number_04.png";
+const wchar_t* IDB_KEYPAD_NUMBER_05ICON = L"C01-3_keypad_number_05.png";
+const wchar_t* IDB_KEYPAD_NUMBER_06ICON = L"C01-3_keypad_number_06.png";
+const wchar_t* IDB_KEYPAD_NUMBER_07ICON = L"C01-3_keypad_number_07.png";
+const wchar_t* IDB_KEYPAD_NUMBER_08ICON = L"C01-3_keypad_number_08.png";
+const wchar_t* IDB_KEYPAD_NUMBER_09ICON = L"C01-3_keypad_number_09.png";
+const wchar_t* IDB_KEYPAD_NUMBER_ASTERIKICON = L"C01-3_keypad_number_asterisk.png";
+const wchar_t* IDB_KEYPAD_NUMBER_VOICEMAILICON = L"C01-3_keypad_number_auto_answer.png";
+const wchar_t* IDB_KEYPAD_NUMBER_MUTEICON = L"C01-3_keypad_number_mute.png";
+const wchar_t* IDB_KEYPAD_NUMBER_SHARPICON = L"C01-3_keypad_number_sharp.png";
+//Keypad Press
+const wchar_t* IDB_KEYPAD_PRESSICON = L"C01-3_keypad_press.png";
+//Call 9 Patch
+const wchar_t* IDB_KEYPAD_CALLDIM9PATCH = L"C01-3_button_01.png";
+const wchar_t* IDB_KEYPAD_CALLPRESS9PATCH = L"C01-3_button_01_press.png";
+//Clear 9 Patch
+const wchar_t* IDB_KEYPAD_CLEARDIM9PATCH = L"C01-3_button_02.png";
+const wchar_t* IDB_KEYPAD_CLEARPRESS9PATCH = L"C01-3_button_02_press.png";
+//Display Panel Background
+const wchar_t* IDB_DISPLAYPANEL_BG = L"C01-3_search_bg.png";
+
+//Call Bitmap
+const wchar_t* IDB_CALLBUTTON_BG = L"C01-3_button_01.png";
+const wchar_t* IDB_VOICEMAIL_BTN_ICON = L"C01-3_keypad_number_auto_answer.png";
+const wchar_t* IDB_VOICEMAIL_BTN_PRESS_ICON = L"C01-3_dialer_icon_01_press.png";
+const wchar_t* IDB_DIALER_BTN_LINE2_ICON = L"C01-3_dialer_btn_2line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE3_ICON = L"C01-3_dialer_btn_3line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE4_ICON = L"C01-3_dialer_btn_4line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE5_ICON = L"C01-3_dialer_btn_5line_bg.9.png";
+const wchar_t* IDB_DIALER_STAR_ICON = L"C01-3_dialer_icon_star.png";
+const wchar_t* IDB_DIALER_MUTE_ICON = L"00_volume_icon_Mute.png";
+const wchar_t* IDB_DIALER_VIDEOCALL_ICON = L"C01-3_icon_voicecall.png";
+const wchar_t* IDB_DIALER_CALL_ICON = L"C01-3_icon_call.png";
+const wchar_t* IDB_DIALER_CLEAR_ICON = L"C01-3_icon_clear.png";
+const wchar_t* IDB_DIALER_CALL_BG_ICON = L"C01-3_dialer_btn_call_bg.9.png";
+//Bitmap used in Call Log module
+const wchar_t* IDB_CALLOG_LIST_BG = L"00_index list_bg.png";
+const wchar_t* IDB_LOG_RECEIVEDCALL_ICON = L"C01-4_icon_dialed.png";
+const wchar_t* IDB_LOG_DIALEDCALL_ICON = L"C01-4_icon_received.png";
+const wchar_t* IDB_LOG_MISSEDCALL_ICON = L"C01-4_icon_missed-call.png";
+const wchar_t* IDB_LOG_BLOCKEDCALL_ICON = L"C01-4_icon_Blocked.png";
+const wchar_t* IDB_LOG_NO_CONTENT = L"00_Nocontents_text.png";
+const wchar_t* IDB_CIRCLE_BUTTON_NORMAL = L"C01-4_circle_button.png";
+const wchar_t* IDB_CIRCLE_BUTTON_PRESSED = L"C01-4_circle_button_press.png";
+const wchar_t* IDB_LOG_DETAIL_CALL_ICON = L"C01-4_circle_icon_call.png";
+const wchar_t* IDB_LOG_DETAIL_CALL_PRESSED_ICON = L"C01-4_circle_icon_call_press.png";
+const wchar_t* IDB_LOG_DETAIL_MSG_ICON = L"C01-4_circle_icon_sms.png";
+const wchar_t* IDB_LOG_DETAIL_MSG_PRESSED_ICON = L"C01-4_circle_icon_sms_press.png";
+const wchar_t* IDB_LOG_CALL_ICON = L"C01-4_list_icon_call.png";
+const wchar_t* IDB_LOG_MMS_ICON = L"C01-4_list_icon_mms.png";
+const wchar_t* IDB_LOG_SMS_ICON = L"C01-4_list_icon_sms.png";
+const wchar_t* IDB_LOG_EMAIL_ICON = L"C01-4_list_icon_sms.png";
+const wchar_t* IDB_LOG_VIDEO_ICON = L"C01-4_list_icon_vt-call.png";
+const wchar_t* IDB_GROUP_LOG_CALL_DELETE_ICON = L"00_button_delete.png";
+const wchar_t* IDB_LOG_MORE_ICON = L"00_icon_more.png";
+const wchar_t* IDB_LOG_MORE_PRESSED_ICON = L"00_icon_more_press.png";
+
+
+
+//String messages
+const wchar_t* IDS_DIALER_MOBILE_STR = L"IDS_DIALER_MOBILE_STR";
+const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG = L"IDS_DIALER_SPEEDDIAL_POPUP_MSG";
+const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG = L"IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG";
+const wchar_t* IDS_DIALER_VOICE_POPUP_MSG = L"IDS_DIALER_VOICE_POPUP_MSG";
+const wchar_t* IDS_DIALER_VOICE_POPUP_TITLE_MSG = L"IDS_DIALER_VOICE_POPUP_TITLE_MSG";
+const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING = L"IDS_SPEEDDIAL_POP_YES_BTN_STRING";
+const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING = L"IDS_SPEEDDIAL_POP_NO_BTN_STRING";
+const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG = L"IDS_DIALER_MENU_ITEM_SEND_MSG";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_CONTACT = L"IDS_DIALER_MENU_ITEM_ADD_CONTACT";
+const wchar_t* IDS_DIALER_MENU_ITEM_SPEED_DIAL = L"IDS_DIALER_MENU_ITEM_SPEED_DIAL";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_PAUSE = L"IDS_DIALER_MENU_ITEM_ADD_PAUSE";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_WAIT = L"IDS_DIALER_MENU_ITEM_ADD_WAIT";
+const wchar_t* IDS_DIALER_MENU_ITEM_EXIT = L"IDS_DIALER_MENU_ITEM_EXIT";
+const wchar_t* IDS_DIALER_MENU_ITEM_BACK = L"IDS_DIALER_MENU_ITEM_BACK";
+const wchar_t* IDS_SPEED_DIAL_SEARCH_KEY = L"SPEED_DIAL";
+const wchar_t* IDS_VOICE_CALL_BTN_NAME = L"IDS_VOICE_CALL_BTN_NAME";
+const wchar_t* IDS_VIDEO_CALL_BTN_NAME = L"IDS_VIDEO_CALL_BTN_NAME";
+const wchar_t* IDS_MSG_BTN_NAME = L"IDS_MSG_BTN_NAME";
+const wchar_t* IDS_PEOPLE_STR = L"IDS_PEOPLE_STR";
+const wchar_t* IDS_MGR_CONF_CALL_LIST_STR = L"IDS_MGR_CONF_CALL_LIST_STR";
+const wchar_t* IDS_LOG_CONTEXT_CALL = L"IDS_LOG_CONTEXT_CALL";
+const wchar_t* IDS_LOG_CONTEXT_MESSAGE = L"IDS_LOG_CONTEXT_MESSAGE";
+const wchar_t* IDS_LOG_CONTEXT_VIDEOCALL = L"IDS_LOG_CONTEXT_VIDEOCALL";
+const wchar_t* IDS_LOG_CONTEXT_DELETE = L"IDS_LOG_CONTEXT_DELETE";
+const wchar_t* IDS_AM_TIME = L"IDS_AM_TIME" ;
+const wchar_t* IDS_PM_TIME = L"IDS_PM_TIME";
+const wchar_t* IDS_CALLLOG_NO_NUMBER = L"IDS_CALLLOG_NO_NUMBER";
+const wchar_t* IDS_CALLLOG_NO_NAME = L"IDS_CALLLOG_NO_NAME";
+const wchar_t* IDS_CALLLOG_RECEIVED = L"IDS_CALLLOG_RECEIVED";
+const wchar_t* IDS_CALLLOG_MISSED = L"IDS_CALLLOG_MISSED";
+const wchar_t* IDS_CALLLOG_OUTGOING = L"IDS_CALLLOG_OUTGOING";
+const wchar_t* IDS_CALLLOG_RECEIVED_MSG = L"IDS_CALLLOG_RECEIVED_MSG";
+const wchar_t* IDS_CALLLOG_SENT_MSG = L"IDS_CALLLOG_SENT_MSG";
+const wchar_t* IDS_CALLLOG_REJECTED = L"IDS_CALLLOG_REJECTED";
+const wchar_t* IDS_CALLLOG_DELETE_FOOTER = L"IDS_CALLLOG_DELETE_FOOTER";
+const wchar_t* IDS_CALLLOG_CANCEL_FOOTER = L"IDS_CALLLOG_CANCEL_FOOTER";
+const wchar_t* IDS_EMERGENCY_CALL = L"IDS_EMERGENCY_CALL";
+const wchar_t* IDS_SELECT_CALL_LOG = L"IDS_SELECT_CALL_LOG";
+const wchar_t* IDS_SELECTED_ITEM_STRING = L"IDS_SELECTED_ITEM_STRING";
+const wchar_t* IDS_SELECT_NUMBER = L"IDS_SELECT_NUMBER";
+const wchar_t* IDS_NUMBER_SELECTED = L"IDS_NUMBER_SELECTED";
+const wchar_t* IDS_NUMBERS_SELECTED = L"IDS_NUMBERS_SELECTED";
+const wchar_t* IDS_SELECT_MESSAGE = L"IDS_SELECT_MESSAGE";
+const wchar_t* IDS_MESSAGE_SELECTED = L"IDS_MESSAGE_SELECTED";
+const wchar_t* IDS_MESSAGES_SELECTED = L"IDS_MESSAGES_SELECTED";
+const wchar_t* IDS_NO_LOGS = L"IDS_NO_LOGS";
+const wchar_t* IDS_FLIGHT_MODE_ON = L"IDS_FLIGHT_MODE_ON";
+const wchar_t* IDS_SETTING_WRONG_PASSWORD_TEXT = L"IDS_SETTING_WRONG_PASSWORD_TEXT";
+const wchar_t* IDS_SETTING_SYSTEM_FAILURE_TEXT = L"IDS_SETTING_SYSTEM_FAILURE_TEXT";
+const wchar_t* IDS_ADD_TO_CONTACTS = L"IDS_ADD_TO_CONTACTS";
+const wchar_t* IDS_CANCEL = L"IDS_CANCEL";
+const wchar_t* IDS_LOGS_TODAY = L"IDS_LOGS_TODAY";
+const wchar_t* IDS_LOGS_YESTERDAY = L"IDS_LOGS_YESTERDAY";
+const wchar_t* IDS_DELETING_CALL_LOGS = L"IDS_DELETING_CALL_LOGS";
+const wchar_t* IDS_CANCEL_DELETING_CALL_LOGS = L"IDS_CANCEL_DELETING_CALL_LOGS";
+const wchar_t* IDS_CONTEXTMENU_ITEM_VIEWBY = L"IDS_CONTEXTMENU_ITEM_VIEWBY";
+const wchar_t* IDS_CONTEXTMENU_ITEM_DETAILS = L"IDS_CONTEXTMENU_ITEM_DETAILS";
+const wchar_t* IDS_CONTEXTMENU_ITEM_BLOCK = L"IDS_CONTEXTMENU_ITEM_BLOCK";
+const wchar_t* IDS_REJECT_MESSAGE_CREATE = L"IDS_REJECT_MESSAGE_CREATE";
+const wchar_t* IDS_DELETE_CONFORMATION_STRING = L"IDS_DELETE_CONFORMATION_STRING";
+const wchar_t* IDS_DIALER_VOICE_MAIL_POPUP_MSG = L"IDS_DIALER_VOICE_MAIL_POPUP_MSG";
+const wchar_t* IDS_LOW_MEMORY_MSG = L"IDS_LOW_MEMORY_MSG";
+const wchar_t* IDS_LOW_MEMORY_MSG_TITLE = L"IDS_LOW_MEMORY_MSG_TITLE";
+const wchar_t* IDS_DELETE_YES = L"IDS_DELETE_YES";
+const wchar_t* IDS_DELETE_NO = L"IDS_DELETE_NO";
+const wchar_t* IDS_PHONE = L"IDS_PHONE";
+const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT = L"IDS_SPEED_DIAL_INVALID_CONTACT";
+const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT_OK = L"IDS_SPEED_DIAL_INVALID_CONTACT_OK";
+
+//resource string messages for settings module
+const wchar_t* IDS_ADD_BTN_STRING = L"IDS_ADD_BTN_STRING";
+const wchar_t* IDS_SETTING_REJECT_MESSAGE_EMPTY = L"IDS_SETTING_REJECT_MESSAGE_EMPTY";
+const wchar_t* IDS_DELETE_BTN_STRING = L"IDS_DELETE_BTN_STRING";
+const wchar_t* IDS_CANCEL_BTN_STRING = L"IDS_CANCEL_BTN_STRING";
+const wchar_t* IDS_REMOVE_CONTACT = L"IDS_REMOVE_CONTACT";
+const wchar_t* IDS_DELETE_NUMBER_TITLE = L"IDS_SETTINGS_DELETE_NUMBER_TITLE_STRING";
+const wchar_t* IDS_DELETE_MSGS_TITLE = L"IDS_SETTINGS_DELETE_MSGS_TITLE_STRING";
+const wchar_t* IDS_SELECT_ALL_LIST_ITEM_STRING = L"IDS_SELECT_ALL_LIST_ITEM_STRING";
+const wchar_t* IDS_DEFAULT_REJECT_ITEM_STRING = L"IDS_DEFAULT_REJECT_ITEM_STRING";
+const wchar_t* IDS_SETTINGS_MATCHCRITERIA_STRING = L"IDS_SETTINGS_MATCHCRITERIA_STRING";
+const wchar_t* IDS_CALLERID_BYNETWORK_STRING = L"IDS_CALLERID_BYNETWORK_STRING";
+const wchar_t* IDS_CALLERID_SHOW_STRING = L"IDS_CALLERID_SHOW_STRING";
+const wchar_t* IDS_CALLERID_HIDE_STRING = L"IDS_CALLERID_HIDE_STRING";
+const wchar_t* IDS_SETTING_CALLALERT_OFF_STRING = L"IDS_SETTING_CALLALERT_OFF_STRING";
+const wchar_t* IDS_SETTING_CALLALERT_SOUND_STRING = L"IDS_SETTING_CALLALERT_SOUND_STRING";
+const wchar_t* IDS_SETTING_CALLALERT_VIBRATE_STRING = L"IDS_SETTING_CALLALERT_VIBRATE_STRING";
+const wchar_t* IDS_SETTING_BARRING_STRING = L"IDS_SETTING_BARRING_STRING";
+const wchar_t* IDS_SETTING_WAITING_STRING = L"IDS_SETTING_WAITING_STRING";
+const wchar_t* IDS_SETTING_WAITING_HLP_STRING = L"IDS_SETTING_WAITING_HLP_STRING";
+const wchar_t* IDS_SETTING_STATUS_TONES_STRING = L"IDS_SETTING_STATUS_TONES_STRING";
+const wchar_t* IDS_SETTING_STATUS_TONES_HLP_STRING = L"IDS_SETTING_STATUS_TONES_HLP_STRING";
+const wchar_t* IDS_SETTING_AUTO_AREACODE_STRING = L"IDS_SETTING_AUTO_AREACODE_STRING";
+const wchar_t* IDS_SETTING_AUTO_AREACODE_HLP_STRING = L"IDS_SETTING_AUTO_AREACODE_HLP_STRING";
+const wchar_t* IDS_SETTING_REJECT_STRING = L"IDS_SETTING_REJECT_STRING";
+const wchar_t* IDS_SETTING_REJECT_HLP_STRING = L"IDS_SETTING_REJECT_HLP_STRING";
+const wchar_t* IDS_SETTING_REJECT_MSG_STRING = L"IDS_SETTING_REJECT_MSG_STRING";
+const wchar_t* IDS_SETTING_REJECT_MSG_HLP_STRING = L"IDS_SETTING_REJECT_MSG_HLP_STRING";
+const wchar_t* IDS_SETTING_SPEEDDIAL_STRING = L"IDS_SETTING_SPEEDDIAL_STRING";
+const wchar_t* IDS_SETTING_FORWARDING_STRING = L"IDS_SETTING_FORWARDING_STRING";
+const wchar_t* IDS_SETTING_MORE_MAIN_STRING = L"IDS_SETTING_MORE_MAIN_STRING";
+const wchar_t* IDS_SETTING_WAITING_TIME_STRING = L"IDS_SETTING_WAITING_TIME_STRING";
+const wchar_t* IDS_SETTING_WAIT_INTERVAL_STRING = L"IDS_SETTING_WAIT_INTERVAL_STRING";
+const wchar_t* IDS_SETTING_CONNECTTONE_STRING = L"IDS_SETTING_CONNECTTONE_STRING";
+const wchar_t* IDS_SETTING_CONNECTTONE_HLP_STRING = L"IDS_SETTING_CONNECTTONE_HLP_STRING";
+const wchar_t* IDS_SETTING_REMINDERS_STRING = L"IDS_SETTING_REMINDERS_STRING";
+const wchar_t* IDS_SETTING_REMINDERS_HLP_STRING = L"IDS_SETTING_REMINDERS_HLP_STRING";
+const wchar_t* IDS_SETTING_ENDTONE_STRING = L"IDS_SETTING_ENDTONE_STRING";
+const wchar_t* IDS_SETTING_ENDTONE_HLP_STRING = L"IDS_SETTING_ENDTONE_HLP_STRING";
+const wchar_t* IDS_SETTING_FORWARD_CALLTYPE_TITLE = L"IDS_SETTING_FORWARD_CALLTYPE_TITLE_STRING";
+const wchar_t* IDS_SETTING_BARRING_CALLTYPE_TITLE = L"IDS_SETTING_BARRING_CALLTYPE_TITLE_STRING";
+const wchar_t* IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE = L"IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_OPTIONS_TITLE = L"IDS_SETTING_VOICEBARRING_OPTIONS_TITLE_STRING";
+const wchar_t* IDS_SETTING_WAITING_OPTIONS_TITLE = L"IDS_SETTING_WAITING_OPTIONS_TITLE_STRING";
+const wchar_t* IDS_SETTING_CALLTYPE_VOICE_STRING = L"IDS_SETTING_CALLTYPE_VOICE_STRING";
+const wchar_t* IDS_SETTING_VOICEFORWARD_ALWAYS = L"IDS_SETTING_VOICEFORWARD_ALWAYS_STRING";
+const wchar_t* IDS_SETTING_VOICEFORWARD_IFBUSY = L"IDS_SETTING_VOICEFORWARD_IFBUSY_STRING";
+const wchar_t* IDS_SETTING_VOICEFORWARD_NOREPLY = L"IDS_SETTING_VOICEFORWARD_NOREPLY_STRING";
+const wchar_t* IDS_SETTING_VOICEFORWARD_OUTOFREACH = L"IDS_SETTING_VOICEFORWARD_OUTOFREACH_STRING";
+const wchar_t* IDS_SETTING_DEACTIVATE_STATUS = L"IDS_SETTING_DEACTIVATE_STATUS_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_OUTGOING = L"IDS_SETTING_VOICEBARRING_OUTGOING_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_INTERNATIONAL = L"IDS_SETTING_VOICEBARRING_INTERNATIONAL_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_EXCEPTHOME = L"IDS_SETTING_VOICEBARRING_EXCEPTHOME_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_INCOMING = L"IDS_SETTING_VOICEBARRING_INCOMING_STRING";
+const wchar_t* IDS_SETTING_VOICEBARRING_WHENROAMING = L"IDS_SETTING_VOICEBARRING_WHENROAMING_STRING";
+const wchar_t* IDS_SETTING_CALL_WAITING_OPTIONS = L"IDS_SETTING_CALL_WAITING_OPTIONS_STRING";
+const wchar_t* IDS_MATCHCRITERIA_EXACT = L"IDS_MATCHCRITERIA_EXACT_STRING";
+const wchar_t* IDS_MATCHCRITERIA_START = L"IDS_MATCHCRITERIA_START_STRING";
+const wchar_t* IDS_MATCHCRITERIA_END = L"IDS_MATCHCRITERIA_END_STRING";
+const wchar_t* IDS_MATCHCRITERIA_INCLUDE = L"IDS_MATCHCRITERIA_INCLUDE_STRING";
+const wchar_t* IDS_SETTING_CALLERID_MAIN_STR = L"IDS_SETTING_CALLERID_MAIN_STRING";
+const wchar_t* IDS_SETTING_CALLERID_SUB_STR = L"IDS_SETTING_CALLERID_SUB_STRING";
+const wchar_t* IDS_SETTING_CALL_ALERT_MAIN_STR = L"IDS_SETTING_CALL_ALERT_MAIN_STRING";
+const wchar_t* IDS_SETTING_CALL_ALERT_SUB_STR = L"IDS_SETTING_CALL_ALERT_SUB_STRING";
+const wchar_t* IDS_SETTING_SAVE_HEADER_ITEM = L"IDS_SETTING_SAVE_HEADER_ITEM";
+const wchar_t* IDS_SETTING_CONTACT_BUTTON = L"IDS_SETTING_CONTACT_BUTTON";
+const wchar_t* IDS_SETTING_DONE_HEADER_ITEM = L"IDS_SETTING_DONE_HEADER_ITEM";
+const wchar_t* IDS_AREA_CODE_OFF_STR = L"IDS_AREA_CODE_OFF_STR";
+const wchar_t* IDS_DUPLICATE_REJECT_MSG_ERROR_STRING = L"IDS_DUPLICATE_REJECT_MSG_ERROR_STRING";
+const wchar_t* IDS_SETTING_CALL_ANSWER_MSG_HLP_STRING = L"IDS_SETTING_CALL_ANSWER_MSG_HLP_STRING";
+const wchar_t* IDS_SETTING_CALL_ACCESSORY_MSG_HLP_STRING = L"IDS_SETTING_CALL_ACCESSORY_MSG_HLP_STRING";
+const wchar_t* IDS_SETTING_CALL_ANSWERING_STRING = L"IDS_SETTING_CALL_ANSWERING_STRING";
+const wchar_t* IDS_SETTING_CALL_ACCESSORY_STRING = L"IDS_SETTING_CALL_ACCESSORY_STRING";
+const wchar_t* IDS_SETTING_ANSWER_CALL_KEY_HLP_STRING = L"IDS_SETTING_ANSWER_CALL_KEY_HLP_STRING";
+const wchar_t* IDS_SETTING_END_CALL_KEY_HLP_STRING = L"IDS_SETTING_END_CALL_KEY_HLP_STRING";
+const wchar_t* IDS_SETTING_ANSWER_CALL_KEY_STRING = L"IDS_SETTING_ANSWER_CALL_KEY_STRING";
+const wchar_t* IDS_SETTING_END_CALL_KEY_STRING = L"IDS_SETTING_END_CALL_KEY_STRING";
+const wchar_t* IDS_SETTING_BT_SETTINGS_HEADING_STRING = L"IDS_SETTING_BT_SETTINGS_HEADING_STRING";
+const wchar_t* IDS_SETTING_OUTCALL_CONDITION_HLP_STRING = L"IDS_SETTING_OUTCALL_CONDITION_HLP_STRING";
+const wchar_t* IDS_SETTING_OUTCALL_CONDITION_MAIN_STRING = L"IDS_SETTING_OUTCALL_CONDITION_MAIN_STRING";
+const wchar_t* IDS_SETTING_OUTCALL_LOCKDEVICE_STRING = L"IDS_SETTING_OUTCALL_LOCKDEVICE_STRING";
+const wchar_t* IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING = L"IDS_SETTING_OUTCALL_UNLOCKDEVICE_STRING";
+const wchar_t* IDS_VIEWBY_POPUP_TITLE_STRING = L"IDS_VIEWBY_POPUP_TITLE_STRING";
+const wchar_t* IDS_BLOCK_POPUP_TITLE_STRING = L"IDS_BLOCK_POPUP_TITLE_STRING";
+const wchar_t* IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING = L"IDS_VIEWBY_ALL_LOGS_CHKBTN_STRING";
+const wchar_t* IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING = L"IDS_VIEWBY_MISSED_CALLS_CHKBTN_STRING";
+const wchar_t* IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING = L"IDS_VIEWBY_DIALED_CALLS_CHKBTN_STRING";
+const wchar_t* IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING = L"IDS_VIEWBY_RECEIVED_CALLS_CHKBTN_STRING";
+const wchar_t* IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING = L"IDS_VIEWBY_REJECTED_CALLS_CHKBTN_STRING";
+const wchar_t* IDS_BLOCK_CALL_CHKBTN_STRING = L"IDS_BLOCK_CALL_CHKBTN_STRING";
+const wchar_t* IDS_BLOCK_MESSAGE_CHKBTN_STRING = L"IDS_BLOCK_MESSAGE_CHKBTN_STRING";
+const wchar_t* IDS_VIEWBY_CANCEL_BTN_STRING = L"IDS_VIEWBY_CANCEL_BTN_STRING";
+const wchar_t* IDS_BLOCK_OK_BTN_STRING = L"IDS_BLOCK_OK_BTN_STRING";
+const wchar_t* IDS_BLOCK_CANCEL_BTN_STRING = L"IDS_BLOCK_CANCEL_BTN_STRING";
+const wchar_t* IDS_BLOCK_CALL_INFO_STRING = L"IDS_BLOCK_CALL_INFO_STRING";
+const wchar_t* IDS_BLOCK_MSG_INFO_STRING = L"IDS_BLOCK_MSG_INFO_STRING";
+const wchar_t* IDS_BLOCK_CALL_MSG_INFO_STRING = L"IDS_BLOCK_CALL_MSG_INFO_STRING";
+const wchar_t* IDS_VOICE_MAIL_DEFAULT_STRING = L"IDS_VOICE_MAIL_DEFAULT_STRING";
+const wchar_t* IDS_SETTING_ADD_NUMBER_TITLE = L"IDS_SETTING_ADD_NUMBER_TITLE";
+const wchar_t* IDS_SETTING_AUTO_AREA_CODE_TITLE = L"IDS_SETTING_AUTO_AREA_CODE_TITLE";
+const wchar_t* IDS_SETTING_ADD_REJECT_MSG_TITLE = L"IDS_SETTING_ADD_REJECT_MSG_TITLE";
+const wchar_t* IDS_SETTING_SET_BARRING_PWD_TITLE = L"IDS_SETTING_SET_BARRING_PWD_TITLE";
+const wchar_t* IDS_SETTING_EDIT_REJECT_MSG_TITLE = L"IDS_SETTING_EDIT_REJECT_MSG_TITLE";
+const wchar_t* IDS_SILENT_MODE_ENABLED = L"IDS_SILENT_MODE_ENABLED";
+const wchar_t* IDS_SILENT_MODE_DISABLED = L"IDS_SILENT_MODE_DISABLED";
+const wchar_t* IDS_INVALID_CONTACT_STRING = L"IDS_INVALID_CONTACT_STRING";
+
+//control name for settings module
+const wchar_t* IDC_GROUPEDTABLEVIEW = L"IDC_GROUPEDTABLEVIEW";
+const wchar_t* IDC_LISTVIEW = L"IDC_LISTVIEW";
+const wchar_t* IDC_NUMBER_EDITFIELD = L"IDC_NUMBER_EDITFIELD";
+const wchar_t* IDC_SELECT_CONTACT_BUTTON = L"IDC_SELECT_CONTACT_BUTTON";
+const wchar_t* IDC_FOWARDING_NUMBER_EDITFIELD = L"IDC_FOWARDING_NUMBER_EDITFIELD";
+const wchar_t* IDC_VOICEMAIL_BUTTON = L"IDC_VOICEMAIL_BUTTON";
+const wchar_t* IDC_REJECTMSG_EDITFIELD = L"IDC_REJECTMSG_EDITFIELD";
+const wchar_t* IDC_EDITFIELD = L"IDC_EDITFIELD";
+const wchar_t* IDC_SELECTEDOPTION_SUBTEXT_LABEL = L"IDC_SELECTEDOPTION_SUBTEXT_LABEL";
+const wchar_t* IDC_MATCHCRITERIA_MAINTEXT_LABEL = L"IDC_MATCHCRITERIA_MAINTEXT_LABEL";
+const wchar_t* IDC_ANIMATION_CONTROL = L"IDC_ANIMATION_CONTROL";
+const wchar_t* IDC_TABLEITEM_BG_LABEL = L"IDC_TABLEITEM_BG_LABEL";
+const wchar_t* IDC_ENTER_NUMBER_LABEL = L"IDC_ENTER_NUMBER_LABEL";
+//Panel
+const wchar_t* PANEL_DIALER = L"PanelDialer";
+const wchar_t* PANEL_LOGS = L"PanelLogs";
+//Corresponding Settings form name
+const wchar_t* IDL_FORM_SETTINGS_PREFIX = L"SettingsForm";
+const wchar_t* IDL_FORM_MAIN_SETTING_MENU = L"SettingsFormMainMenu";
+const wchar_t* IDL_FORM_CALL_REJECTLIST_MENU = L"SettingsFormCallRejectList";
+const wchar_t* IDL_FORM_CALL_REJECTMSGS_MENU = L"SettingsFormCallRejectMsgs";
+const wchar_t* IDL_FORM_SPEED_DIAL = L"SettingsFormSpeedDial";
+const wchar_t* IDL_FORM_MORE_OPTIONS = L"SettingsFormMoreOptions";
+const wchar_t* IDL_FORM_CALL_STATUSTONES = L"SettingsFormCallStatusTones";
+const wchar_t* IDL_FORM_CALLTYPE_FORWARD = L"SettingsFormCallTypeForward";
+const wchar_t* IDL_FORM_CALL_FORWARD_OPTIONS = L"SettingsFormCallForwardMenu";
+const wchar_t* IDL_FORM_CALLTYPE_BARRING = L"SettingsFormCallTypeBarring";
+const wchar_t* IDL_FORM_CALL_BARRING_OPTIONS = L"SettingsFormCallBarringMenu";
+const wchar_t* IDL_FORM_CALL_WAITING_OPTIONS = L"SettingsFormCallWaitingMenu";
+const wchar_t* IDL_FORM_ADD_REJECT_NUMBER = L"SettingsFormAddRejectNumber";
+const wchar_t* IDL_FORM_AUTO_AREA_CODE = L"SettingsFormAutoAreaCode";
+const wchar_t* IDL_FORM_ADD_REJECT_MSG = L"SettingsFormAddRejectMsg";
+const wchar_t* IDL_FORM_EDIT_REJECT_MSG = L"SettingsFormEditRejectMsg";
+const wchar_t* IDL_FORM_FORWARD_TO_NUMBER = L"SettingsFormForwardToNumber";
+const wchar_t* IDL_FORM_NOREPLY_FORWARD_TO_NUMBER = L"SettingsFormNoReplyForwardToNumber";
+const wchar_t* IDL_FORM_SCENE_SET_BARRING_PWD = L"SettingsFormSetBarringPwd";
+const wchar_t* IDL_FORM_DEL_NUMBER = L"SettingsFormDeleteNumbers";
+const wchar_t* IDL_FORM_DEL_MESSAGE = L"SettingsFormDeleteMessages";
+const wchar_t* IDL_FORM_CALL_ANSWER_OPTIONS = L"SettingsFormCallAnsweringOptions";
+const wchar_t* IDL_FORM_CALL_ACCESSORY_OPTIONS = L"SettingsFormCallAccessoryOptions";
+//Dialer & Call Log Form names
+const wchar_t* IDL_FORM_DIAL_APP = L"DialAppForm";
+const wchar_t* IDL_FORM_CALL_LOG_DETAIL = L"CallLogDetailForm";
+const wchar_t* IDL_FORM_RESTRICTED_CALL_LOG_DETAIL = L"RestrictedCallLogDetailForm";
+const wchar_t* IDL_FORM_EMERGENCY_DIAL = L"IDL_FORM_EMERGENCY_DIAL";
+//Panels
+const wchar_t* IDL_DIALER_KEYPAD_PANEL = L"IDL_DIALER_KEYPAD_PANEL";
+//LastRow Panel
+const wchar_t* IDC_PANEL_LASTROW = L"IDC_PANEL_LASTROW";
+const wchar_t* IDC_BUTTON_CALL = L"IDC_BUTTON_CALL";
+const wchar_t* IDC_BUTTON10 = L"IDC_BUTTON10";
+//Constants - Settings Scene name
+const wchar_t* IDSCN_SCENE_MAIN_SETTING_MENU = L"CallMainSettingScene";
+const wchar_t* IDSCN_SCENE_CALL_REJECTLIST_MENU = L"CallRejectListScene";
+const wchar_t* IDSCN_SCENE_CALL_REJECTMSGS_MENU = L"CallRejectMsgsScene";
+const wchar_t* IDSCN_SCENE_SPEED_DIAL = L"SpeedDialScene";
+const wchar_t* IDSCN_SCENE_MORE_OPTIONS = L"MoreOptionsScene";
+const wchar_t* IDSCN_SCENE_CALL_STATUSTONES = L"CallStatusTonesScene";
+const wchar_t* IDSCN_SCENE_CALLTYPE_FORWARD = L"CallTypeForwardScene";
+const wchar_t* IDSCN_SCENE_CALL_FORWARD_OPTIONS = L"CallForwardMenuScene";
+const wchar_t* IDSCN_SCENE_CALLTYPE_BARRING = L"CallTypeBarringScene";
+const wchar_t* IDSCN_SCENE_CALL_BARRING_OPTIONS = L"CallBarringMenuScene";
+const wchar_t* IDSCN_SCENE_CALL_WAITING_OPTIONS = L"CallWaitingMenuScene";
+const wchar_t* IDSCN_SCENE_ADD_REJECT_NUMBER = L"AddRejectNumberScene";
+const wchar_t* IDSCN_SCENE_AUTO_AREA_CODE = L"AutoAreaCodeScene";
+const wchar_t* IDSCN_SCENE_ADD_REJECT_MSG = L"AddRejectMsgScene";
+const wchar_t* IDSCN_SCENE_EDIT_REJECT_MSG = L"EditRejectMsgScene";
+const wchar_t* IDSCN_SCENE_FORWARD_TO_NUMBER = L"ForwardToNumberScene";
+const wchar_t* IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER = L"NoReplyForwardToNumberScene";
+const wchar_t* IDSCN_SCENE_SET_BARRING_PWD = L"SetBarringPwdScene";
+const wchar_t* IDSCN_SCENE_DEL_NUMBER = L"DeleteNumbersScene";
+const wchar_t* IDSCN_SCENE_DEL_MESSAGE = L"DeleteMessagesScene";
+const wchar_t* IDSCN_SCENE_CALL_ANSWER_OPTIONS = L"CallAnswerOptionsScene";
+const wchar_t* IDSCN_SCENE_CALL_ACCESSORY_OPTIONS = L"CallAccessoryOptionsScene";
+//Dialer & Call Log Scene names
+const wchar_t* IDSCN_DIALER = L"SceneDialer";
+const wchar_t* IDSCN_CALL_LOG = L"SceneCallLog";
+const wchar_t* IDSCN_CALL_LOG_DETAILS = L"SceneCallLogDetails";
+const wchar_t* IDSCN_RESTRICTED_CALL_LOG_DETAILS = L"SceneRestrictedCallLogDetails";
+const wchar_t* IDSCN_EMERGENCY_DIAL = L"SceneEmergencyDial";
+//Contact AppControl operation ids
+const wchar_t* OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/social/pick";
+const wchar_t* OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/social/view";
+const wchar_t* OPERATION_ID_ADD = L"http://tizen.org/appcontrol/operation/social/add";
+const wchar_t* OPERATION_ID_EDIT = L"http://tizen.org/appcontrol/operation/social/edit";
+
+const wchar_t* IDS_KEY_LANGUAGE_CHANGE = L"http://tizen.org/setting/locale.language";
+const wchar_t* IDS_KEY_FONTSIZE_CHANGE = L"http://tizen.org/setting/font.size";
+
+const wchar_t* OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
+const wchar_t* OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture";
+const wchar_t* OPERATION_ID_CALL = L"http://tizen.org/appcontrol/operation/call";
+const wchar_t* OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
+const wchar_t* OPERATION_ID_DIAL = L"http://tizen.org/appcontrol/operation/dial";
+const wchar_t* OPERATION_ID_ADD_CALL = L"http://tizen.org/appcontrol/operation/addcall";
+//AppControl provider ids
+const wchar_t* PROVIDER_ID_CAMERA = L"http://tizen.org/appcontrol/provider/camera";
+const wchar_t* PROVIDER_ID_GALLERY = L"http://tizen.org/appcontrol/provider/gallery";
+//const wchar_t* PROVIDER_ID_CALL = L"http://tizen.org/appcontrol/provider/call";
+const wchar_t* PROVIDER_ID_MESSAGE = L"tizen.messages";
+const wchar_t* PROVIDER_ID_EMAIL = L"http://tizen.org/appcontrol/provider/email";
+const wchar_t* PROVIDER_ID_MEDIA = L"http://tizen.org/appcontrol/provider/media";
+
+//AppControl Provider ids
+const wchar_t* PROVIDER_ID_CONTACTS = L"tizen.contacts";
+const wchar_t* PROVIDER_ID_CALL = L"nI2PLNdTwi.Call";
+
+
+//Messaging Parameters
+const wchar_t* MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
+const wchar_t* MESSAGE_SMS_TYPE = L"SMS";
+const wchar_t* MESSAGE_TEXT = L"http://tizen.org/appcontrol/data/text";
+const wchar_t* MESSAGE_TO = L"http://tizen.org/appcontrol/data/to";
+
+
+//Contacts Parameters
+const wchar_t* INPUT_TYPE_PHONE = L"http://tizen.org/appcontrol/data/social/phone";
+const wchar_t* INPUT_TYPE_MAIL = L"http://tizen.org/appcontrol/data/social/email";
+const wchar_t* CONTACT_KEY_ITEM_TYPE = L"http://tizen.org/appcontrol/data/social/item_type";
+const wchar_t* ITEM_TYPE_CONTACT = L"contact";
+const wchar_t* ITEM_TYPE_PERSON = L"person";
+const wchar_t* RETURN_TYPE_CONTACT_ID = L"contactId";
+const wchar_t* RETURN_TYPE_ITEM_ID = L"item_id";
+const wchar_t* CONTACT_KEY_ITEM_ID = L"http://tizen.org/appcontrol/data/social/item_id";
+const wchar_t* RETURN_TYPE = L"http://tizen.org/appcontrol/data/social/result_type";
+const wchar_t* SELECTION_MODE = L"http://tizen.org/appcontrol/data/selection_mode";
+const wchar_t* SELECTION_MODE_SINGLE = L"single";
+
+//Constants used in AppControl requests
+const wchar_t* DELIMITER = L":";
+const wchar_t* LAUNCHTYPE = L"launch-type";
+const wchar_t* PARAM_ORIGIN_MT = L"MT";
+const wchar_t* CALL_HANDLE = L"handle";
+const wchar_t* CONTACT_NUMBER = L"number";
+const wchar_t* PARAM_CALL_VALUE_VOICE = L"voice";
+const wchar_t* PARAM_CALL_TYPE = L"http://tizen.org/appcontrol/data/call/type";
+const wchar_t* PARAM_PHONE_NUMBER = L"tel";
+
+
+const wchar_t* RETURN_KEY_VALUE = L"value";
+const wchar_t* RETURN_TYPE_PHONE = L"phone";
+const wchar_t* RETURN_TYPE_EMAIL = L"Email";
+const wchar_t* TYPE_VIDEO = L"type:video";
+const wchar_t* TYPE_VOICE = L"type:voice";
+const wchar_t* TYPE_SMS = L"type:SMS";
+const wchar_t* TEL = L"tel:";
+const wchar_t* TO = L"to:";
+//Contacts app control parameters
+const wchar_t* CONTACTS_VIEW_TYPE = L"viewType";
+const wchar_t* CONTACTS_VIEW_TYPE_CONTACT = L"contact";
+const wchar_t* CONTACTS_ID_KEY = L"contactId";
+
+//Settings Strings
+const wchar_t* SETTINGS_FLIGHT_MODE_STR = L"http://tizen.org/setting/network.flight_mode";
+const wchar_t* SETTING_INFO_KEY_FONT_SIZE = L"http://tizen.org/setting/font.size";
+const wchar_t* SETTING_INFO_KEY_TIME_FORMAT = L"http://tizen.org/setting/locale.time.format";
+const wchar_t* SETTING_INFO_KEY_DATE_CHANGE = L"http://tizen.org/setting/locale.date";
+const wchar_t* SETTING_INFO_KEY_CONTACTS_ORDER = L"http://tizen.org/setting/contacts.order.firstname";
+//Constants
+const wchar_t* IDI_KEY2_TXT = L"ABC";
+const wchar_t* IDI_KEY3_TXT = L"DEF";
+const wchar_t* IDI_KEY4_TXT = L"GHI";
+const wchar_t* IDI_KEY5_TXT = L"JKL";
+const wchar_t* IDI_KEY6_TXT = L"MNO";
+const wchar_t* IDI_KEY7_TXT = L"PQRS";
+const wchar_t* IDI_KEY8_TXT = L"TUV";
+const wchar_t* IDI_KEY9_TXT = L"WXYZ";
+
+// Dimensions used in Settings List views //
+// menu item height
+const int H_LIST_HIDDENGROUP_ITEM = 1;
+const int H_LIST_NORMAL_MENU_ITEM = 120;
+const int H_LIST_DROPDOWN_MENU_ITEM = 128;
+const int H_LIST_MENU_SINGLELINE_HLPTXT_ITEM = 102;
+const int H_LIST_MENU_TWOLINE_HLPTXT_ITEM = 140;
+const int H_EDITOR_LIST_ITEM = 150;
+//text item height
+const int H_LIST_NORMAL_TXT_ITEM = 54;
+const int H_LIST_SUB_TXT_ITEM = 38;
+//Two line text for Drop down menu item
+const int H_LIST_DROPDOWN_TXT_ITEM = 28;
+//single line text
+const int X_LIST_MENU_TEXT_ITEM = 20;
+const int Y_LIST_MENU_TEXT_ITEM = 8;
+//Help text
+const int X_LIST_MENU_HLPTXT_ITEM = 20;
+const int Y_LIST_MENU_HLPTXT_ITEM = 8;
+//custom Item for Bg line
+const int Y_CUSTOM_BG_ELEMENT = 0;
+//Position for delete list item
+const int X_DEL_LIST_ELEMENT = 16;
+const int Y_DEL_LIST_ELEMENT = 0;
+const int Y_POS_TABLEVIEW_LS = 22;
+const int Y_POS_TABLEVIEW_PR = 40;
+
+// Dimensions for icons //
+//Expand icon for DropDown Menu Items
+const int W_EXPAND_ICON = 72;
+const int H_EXPAND_ICON = 72;
+const int W_SLIDER_ICON = 160;
+const int H_SLIDER_ICON = 64;
+const int W_ANIMATION_MARGIN = 50;
+//contact icon for Add Rejected Number & AutoArea code screens
+const int W_CONTACT_ICON = 122;
+const int H_CONTACT_ICON = 122;
+//Dimensions for custom bg line
+const int W_CUSTOM_BG_ELEMENT = 1;
+//Item Width for delete list
+const int W_DELETE_LIST_ITEM = 628;
+const int W_LEFT_HEADER_EXPAND_ITEMS = 8;
+
+const int NORMAL_FONT_SIZE_MAIN_TXT = 44;
+const int GIANT_FONT_SIZE_MAIN_TXT = 98;
+const int HUGE_FONT_SIZE_MAIN_TXT = 81;
+const int LARGE_FONT_SIZE_MAIN_TXT = 64;
+const int SMALL_FONT_SIZE_MAIN_TXT = 36;
+//ItemRect size based on fonts
+const int NORMAL_ITEMRECT_SIZE = 140;
+const int GIANT_ITEMRECT_SIZE = 205;
+const int HUGE_ITEMRECT_SIZE = 176;
+const int LARGE_ITEMRECT_SIZE = 157;
+const int SMALL_ITEMRECT_SIZE = 140;
+//MainItem RectSize
+const int NORMAL_MAINTEXTRECT_SIZE = 80;
+const int GIANT_MAINTEXTRECT_SIZE = 140;
+const int HUGE_MAINTEXTRECT_SIZE = 115;
+const int LARGE_MAINTEXTRECT_SIZE = 100;
+const int SMALL_MAINTEXTRECT_SIZE = 80;
+//SubItem Text size
+const int NORMAL_SUBTEXTRECT_SIZE = 38;
+const int GIANT_SUBTEXTRECT_SIZE = 38;
+const int HUGE_SUBTEXTRECT_SIZE = 38;
+const int LARGE_SUBTEXTRECT_SIZE = 38;
+const int SMALL_SUBTEXTRECT_SIZE = 38;
+
+
+const int FONT_SIZE_SUB_TXT = 32;
+//Help text
+const int FONT_SIZE_HELP_TXT = 32;
+//Header, Footer icon
+const int W_HDR_FTR_ICON = 60;
+const int H_HDR_FTR_ICON = 60;
+//Processing Animation constants
+const int IDI_ANIM_DURATION = 500;
+const int IDI_ANIM_PROGRESS_COUNT = 30;
+
+//Settings UI constants
+// Colors used in List views //
+const unsigned int COLOR_GROUP_ITEM_BG = Color32<249, 249, 249>::Value;
+const unsigned int COLOR_LIST_MENU_ITEM = Color32<248, 246, 239>::Value;
+const unsigned int COLOR_SECONDDEPTH_ITEM_BG = Color32<220, 218, 211>::Value;
+const unsigned int COLOR_HELP_ITEM_BG = Color32<255, 255, 255, 0>::Value;
+const unsigned int COLOR_NORMAL_MAIN_TXT = Color32<0, 0, 0>::Value;
+const unsigned int COLOR_NORMAL_SUB_TXT = Color32<128, 128, 128>::Value;
+const unsigned int COLOR_NORMAL_SELECTED_OPTION_SUB_TXT = Color32<59, 115, 182>::Value;
+const unsigned int COLOR_PRESS_SUB_TXT = Color32<255, 255, 255>::Value;
+const unsigned int COLOR_PRESS_MAIN_TXT = Color32<255, 255, 255>::Value;
+const unsigned int COLOR_HELP_TXT = Color32<128, 128, 128>::Value;
+const unsigned int COLOR_LEFT_HEADER_EXPAND_ITEMS = Color32<108, 168, 199>::Value;
+//Main List Option text
+const unsigned int COLOR_MAIN_TXT = Color32<0, 0, 0>::Value;
+const unsigned int COLOR_REJECT_MESSAGE_TXT = Color32<0, 0, 255>::Value;
+const unsigned int COLOR_PRESS_ITEM_BG = Color32<87,135,194>::Value;
+const unsigned int COLOR_SELECTALL_ITEM_BG = Color32<220,218,211>::Value;
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnUnknownLogsDetailForm.cpp
+ * @brief Call log details form for unknown call
+ */
+#include <FApp.h>
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FLocales.h>
+#include <FMedia.h>
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include <FUiControl.h>
+#include "PhnPhoneApp.h"
+#include "PhnAppUtility.h"
+#include "PhnUnknownLogsDetailForm.h"
+#include "PhnSceneRegister.h"
+#include "PhnSettingsPresentationModel.h"
+#include "PhnTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::Locales;
+using namespace Tizen::Media;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+
+//resources
+const wchar_t* IDC_RESTRICTED_CALL_LOG_DETAIL_FORM = L"IDL_RESTRICTED_CALL_LOG_DETAIL_FORM";
+static const wchar_t* IDC_UNKNOWN_LOG_LIST = L"IDC_UNKNOWN_LOG_LIST";
+const wchar_t* IDC_LABEL_UNKNOWN = L"IDC_LABEL_UNKNOWN";
+
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
+const int IDA_FOOTER_BUTTON_DELETE = 100;
+const int IDA_POPUP_DELETE_YES = 101;
+const int IDA_POPUP_DELETE_NO = 102;
+const int IDA_RETURN_COUNT_ONE = 1;
+
+const int UnknownLogsDetailForm::ID_NAME_STRING = 100;
+const int UnknownLogsDetailForm::ID_NUMBER_STRING = 101;
+const int UnknownLogsDetailForm::ID_TIME_STRING = 102;
+const int UnknownLogsDetailForm::ID_CALLTYPE_BITMAP = 104;
+
+const int UnknownLogsDetailForm::X_TEXT_LINE1_ITEM = 16;
+const int UnknownLogsDetailForm::Y_TEXT_LINE1_ITEM = 10;
+const int UnknownLogsDetailForm::W_TEXT_LINE1_ITEM = 560;
+
+const int UnknownLogsDetailForm::X_TEXT_LINE2_ITEM = 64;
+const int UnknownLogsDetailForm::Y_TEXT_LINE2_ITEM = 70;
+const int UnknownLogsDetailForm::H_TEXT_LINE2_ITEM = 48;
+const int UnknownLogsDetailForm::W_TEXT_LINE2_ITEM = 456;
+
+const int UnknownLogsDetailForm::X_TEXT_TIME_ITEM = 600;
+const int UnknownLogsDetailForm::Y_TEXT_TIME_ITEM = 70;
+const int UnknownLogsDetailForm::H_TEXT_TIME_ITEM = 48;
+const int UnknownLogsDetailForm::W_TEXT_TIME_ITEM = 168;
+
+const int UnknownLogsDetailForm::X_CALLTYPE_BITMAP_ITEM = 16;
+const int UnknownLogsDetailForm::Y_CALLTYPE_BITMAP_ITEM = 70 + 8;
+const int UnknownLogsDetailForm::H_CALLTYPE_BITMAP_ITEM = 32;
+const int UnknownLogsDetailForm::W_CALLTYPE_BITMAP_ITEM = 32;
+
+static const int MAX_TWELVEHOUR_FORMAT = 12;
+static const int MAX_TWELVEHOUR_FORMAT_LENGTH = 8;
+static const int MAX_TWENTYFOUR_FORMAT_LENGTH = 6;
+
+UnknownLogsDetailForm::UnknownLogsDetailForm(void)
+{
+ __pUnknownNumber = null;
+ __pFormFooter = null;
+ __pList = null;
+ __pCalllogInfo = null;
+ __pLogPresentor = null;
+ pDeletePopup = null;
+ __fontSize = 44.f;
+ __itemHeight = 112.f;
+}
+
+UnknownLogsDetailForm::~UnknownLogsDetailForm(void)
+{
+ if (__pLogPresentor != null)
+ {
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ __pLogPresentor = null;
+ }
+}
+
+bool
+UnknownLogsDetailForm::Initialize()
+{
+ result r = Construct(IDC_RESTRICTED_CALL_LOG_DETAIL_FORM);
+ AppLog("initialized");
+ TryCatch(r == E_SUCCESS, , "UnknownLogsDetailForm::Initialize Fail to initialize Call log detail form");
+ return true;
+CATCH:
+ return false;
+
+}
+
+result
+UnknownLogsDetailForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ SetFormBackEventListener(this);
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ __pUnknownNumber = static_cast<Label*>(GetControl(IDC_LABEL_UNKNOWN));
+ if(__pUnknownNumber != null)
+ {
+ __pUnknownNumber->SetTextConfig(__fontSize, LABEL_TEXT_STYLE_BOLD);
+ }
+ __pFormFooter = GetFooter();
+ __pFormFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
+ __pFormFooter->AddActionEventListener(*this);
+ __pFooterItemDelete.Construct(IDA_FOOTER_BUTTON_DELETE);
+ __pFooterItemDelete.SetText(AppUtility::GetResourceString(IDS_CALLLOG_DELETE_FOOTER));
+ __pFormFooter->AddItem(__pFooterItemDelete);
+
+ return r;
+}
+
+result
+UnknownLogsDetailForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ delete pDeletePopup;
+ pDeletePopup = null;
+
+ return r;
+}
+
+void
+UnknownLogsDetailForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch(actionId)
+ {
+ case IDA_FOOTER_BUTTON_DELETE:
+ {
+ ShowDeletePopup();
+ }
+ break;
+
+ case IDA_POPUP_DELETE_YES:
+ {
+ __pLogPresentor->DeleteCalllogByDbId(__pCalllogInfo->GetCalllogDbId());
+ if(pDeletePopup != null)
+ {
+ pDeletePopup->SetShowState(false);
+ }
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ }
+ break;
+
+ case IDA_POPUP_DELETE_NO:
+ {
+ if(pDeletePopup != null)
+ {
+ pDeletePopup->SetShowState(false);
+ }
+ }
+ break;
+ }
+}
+
+void
+UnknownLogsDetailForm::OnCalllogChanged(void)
+{
+ AppLog("Enter");
+ int calLogCount = 0;
+ calLogCount = __pLogPresentor->GetUnknownLogCount(__pCalllogInfo->GetCalllogDbId());
+ if(calLogCount == 0)
+ {
+ if(pDeletePopup != null)
+ {
+ delete pDeletePopup;
+ pDeletePopup = null;
+ }
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+ }
+}
+
+void
+UnknownLogsDetailForm::ShowDeletePopup()
+{
+ if(pDeletePopup != null)
+ {
+ delete pDeletePopup;
+ pDeletePopup = null;
+ }
+
+ pDeletePopup = new (std::nothrow) Popup();
+ pDeletePopup->Construct(false, Dimension(688,230));
+ pDeletePopup->SetPropagatedKeyEventListener(this);
+ Label *pDeleteTitle = new Label();
+ pDeleteTitle->Construct(Rectangle(16,32,656,80), AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+ pDeleteTitle->SetTextConfig(38, LABEL_TEXT_STYLE_BOLD);
+ pDeleteTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pDeleteTitle->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pDeletePopup->AddControl(pDeleteTitle);
+
+ //Yes button
+ Rectangle yesRect(354, 132, 318, 74);
+ Button* pYesButton = new Button();
+ pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_YES));
+ pYesButton->SetActionId(IDA_POPUP_DELETE_YES);
+ pYesButton->AddActionEventListener(*this);
+ pYesButton->SetColor(BUTTON_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+ pYesButton->SetColor(BUTTON_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+ pDeletePopup->AddControl(pYesButton);
+
+ //No button
+ Rectangle noRect(16, 132, 318, 74);
+ Button* pNoButton = new Button();
+ pNoButton->Construct(noRect, AppUtility::GetResourceString(IDS_DELETE_NO));
+ pNoButton->SetActionId(IDA_POPUP_DELETE_NO);
+ pNoButton->AddActionEventListener(*this);
+ pDeletePopup->AddControl(pNoButton);
+ pDeletePopup->SetShowState(true);
+ pDeletePopup->Show();
+
+}
+
+void
+UnknownLogsDetailForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppLogDebug("Enter");
+ __pLogPresentor = CalLogPresentationModel::GetInstance();
+ __pLogPresentor->AddCalllogChangeListener(*this);
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+ if(pArgs != null)
+ {
+ CallLogDetails* calllogInfo = static_cast<CallLogDetails*> (pArgs->GetAt(0));
+ if(calllogInfo != null)
+ {
+ __pCalllogInfo = new CallLogDetails();
+ *__pCalllogInfo = *calllogInfo;
+ }
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+ __pList = static_cast<GroupedListView*>(GetControl(IDC_UNKNOWN_LOG_LIST));
+ __pList->SetItemProvider(*this);
+ __pList->UpdateList();
+}
+
+int
+UnknownLogsDetailForm::GetGroupCount(void)
+{
+ AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+ return IDA_RETURN_COUNT_ONE;
+}
+
+int
+UnknownLogsDetailForm::GetItemCount(int groupIndex)
+{
+ return IDA_RETURN_COUNT_ONE;
+}
+
+Tizen::Ui::Controls::GroupItem*
+UnknownLogsDetailForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ DateTime todaysDate;
+ DateTime calllogDate;
+ String title;
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ GroupItem* pItem = new GroupItem();
+ if(pItem == null)
+ {
+ return null;
+ }
+ pItem->Construct(Dimension(itemWidth, 48));
+ Bitmap* pBitmap = null;
+ pBitmap = pAppResource->GetBitmapN(IDB_CALLOG_LIST_BG,BITMAP_PIXEL_FORMAT_ARGB8888);
+ if(__pCalllogInfo == null)
+ {
+ delete pItem;
+ return null;
+ }
+ calllogDate = __pCalllogInfo->GetDateTime();
+ GetCurrentDateTime(todaysDate);
+ int days = GetDaysDifferenceBetweenDates(calllogDate , todaysDate);
+ title.Clear();
+ if(days == 0)
+ {
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_TODAY));
+ }
+ else if(days == 1)
+ {
+ title.Append(AppUtility::GetResourceString(IDS_LOGS_YESTERDAY));
+ }
+ else
+ {
+ title.Format(30,L"%d/%d/%d",calllogDate.GetDay(), calllogDate.GetMonth(), calllogDate.GetYear());
+ }
+ pItem->SetElement(title, pBitmap);
+
+ return pItem;
+}
+
+bool
+UnknownLogsDetailForm::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+Tizen::Ui::Controls::ListItemBase*
+UnknownLogsDetailForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ String dateText(L"");
+ String typeText;
+ String durationText;
+ DateTime calllogDate;
+ Bitmap* pTypeBitmap = null;
+ Bitmap* pBitmap = null;
+ CallLogType type = CALL_LOG_TYPE_MAX;
+ int duration = 0;
+ int hr, min, sec;
+ hr = min = sec = 0;
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, __itemHeight), LIST_ANNEX_STYLE_NORMAL);
+
+ if(__pCalllogInfo == null)
+ {
+ return null;
+ }
+ calllogDate = __pCalllogInfo->GetDateTime();
+ duration = __pCalllogInfo->GetDuration();
+ GetTimeText(calllogDate,dateText);
+ type = __pCalllogInfo->GetCalllogType();
+ GetCallogIconBitmap(type,pBitmap,pTypeBitmap,typeText);
+
+ pItem->AddElement(Rectangle(X_TEXT_LINE1_ITEM, Y_TEXT_LINE1_ITEM, W_TEXT_LINE1_ITEM, __fontSize + 16), ID_NAME_STRING, dateText,__fontSize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), false);
+ pItem->AddElement(Rectangle(X_TEXT_LINE2_ITEM, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_LINE2_ITEM, H_TEXT_LINE2_ITEM), ID_NUMBER_STRING, typeText.GetPointer(), 32, Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), Color::GetColor(COLOR_ID_GREY), false);
+
+ if(IsTimeToBeDisplayed(type) == true)
+ {
+ EnrichedText* text = new (std::nothrow) EnrichedText();
+ TextElement* textElement = new (std::nothrow) TextElement();
+ Font font;
+ text->Construct(Dimension(W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM));
+ text->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
+ text->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+ hr = duration/3600;
+ sec = duration%3600;
+ min = duration/60;
+ sec = sec%60;
+ durationText.Format(10,L"%02d:%02d:%02d", hr, min, sec);
+ textElement->Construct(durationText);
+
+ font.Construct(FONT_STYLE_PLAIN, 32);
+ textElement->SetFont(font);
+ textElement->SetTextColor(Color::GetColor(COLOR_ID_GREY));
+ text->Add(*textElement);
+ pItem->AddElement(Rectangle(itemWidth - 180, Y_TEXT_LINE1_ITEM + __fontSize + 16, W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *text);
+
+ delete text;
+ text = null;
+ }
+ if (pTypeBitmap != null)
+ {
+ pItem->AddElement(Rectangle(X_CALLTYPE_BITMAP_ITEM, Y_TEXT_LINE1_ITEM + __fontSize + 20, W_CALLTYPE_BITMAP_ITEM, H_CALLTYPE_BITMAP_ITEM), ID_CALLTYPE_BITMAP, *pTypeBitmap);
+ delete pTypeBitmap;
+ pTypeBitmap = null;
+ }
+ if(pBitmap != null)
+ {
+ pItem->AddElement(Rectangle(itemWidth - 50, Y_LOGCALL_BITMAP_ITEM, W_LOGCALL_BITMAP_ITEM, H_LOGCALL_BITMAP_ITEM), ID_LOGCALL_BITMAP, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ return pItem;
+
+}
+
+bool
+UnknownLogsDetailForm::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+UnknownLogsDetailForm::GetCurrentDateTime(DateTime& dt)
+{
+ DateTime dtNow;
+ LocaleManager localManager;
+ result r = E_FAILURE;
+ TimeZone tz;
+ r = SystemTime::GetCurrentTime(UTC_TIME, dtNow);
+ localManager.Construct();
+ tz = localManager.GetSystemTimeZone();
+ dt = tz.UtcTimeToWallTime(dtNow);
+}
+
+int
+UnknownLogsDetailForm::GetDaysDifferenceBetweenDates(DateTime date1, DateTime date2)
+{
+ TimeSpan oneDay(1,0,0,0);
+ TimeSpan timeOfDay = date2.GetTimeOfDay();
+
+ DateTime yesterday = date2;
+ yesterday.Subtract(timeOfDay);
+ yesterday.Subtract(oneDay);
+
+ DateTime today = date2;
+ today.Subtract(timeOfDay);
+
+ if (yesterday <= date1 && date1 < today)
+ {
+ return 1;
+ }
+ else if (today <= date1 && date1 <= date2)
+ {
+ return 0;
+ }
+ else
+ {
+ return 2;
+ }
+}
+
+void
+UnknownLogsDetailForm::GetTimeText(DateTime calllogDate,String& dateText)
+{
+ int hour = calllogDate.GetHour();
+ String key(L"24HourFormatSelected");
+ bool dateFormat24 = true;
+ String amPm;
+
+ SettingInfo::GetValue(key, dateFormat24);
+ if (dateFormat24 == false)
+ {
+ if (hour > MAX_TWELVEHOUR_FORMAT)
+ {
+ hour -= MAX_TWELVEHOUR_FORMAT;
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ else if (hour < MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_AM_TIME));
+ }
+ else if (hour == MAX_TWELVEHOUR_FORMAT)
+ {
+ amPm.Append(AppUtility::GetResourceString(IDS_PM_TIME));
+ }
+ dateText.Format(MAX_TWELVEHOUR_FORMAT_LENGTH,L"%02d:%02d%ls", hour, calllogDate.GetMinute(), amPm.GetPointer());
+ }
+ else
+ {
+ dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:%02d", calllogDate.GetHour(), calllogDate.GetMinute());
+ }
+}
+
+void
+UnknownLogsDetailForm::GetCallogIconBitmap(CallLogType logType,Bitmap*& iconType, Bitmap*& iconArrow, String& text)
+{
+ AppResource* pAppResource = App::GetInstance()->GetAppResource();
+ switch(logType)
+ {
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED));
+
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_OUTGOING));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_REJECTED));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+
+ case CALL_LOG_TYPE_VIDEO_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_OUTGOING));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_MISSED:
+ case CALL_LOG_TYPE_VIDEO_REJECTED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ case CALL_LOG_TYPE_VIDEO_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_VIDEO_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+
+ case CALL_LOG_TYPE_SMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_MMS_BLOCKED:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_MMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_BLOCKEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_INCOMING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_RECEIVED_MSG));
+ }
+ break;
+ case CALL_LOG_TYPE_EMAIL_OUTGOING:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_SMS_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_DIALEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_SENT_MSG));
+ }
+ break;
+ default:
+ {
+ iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ iconArrow = pAppResource->GetBitmapN(IDB_LOG_MISSEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+ text.Append(AppUtility::GetResourceString(IDS_CALLLOG_MISSED));
+ }
+ break;
+ }
+}
+
+bool
+UnknownLogsDetailForm::IsTimeToBeDisplayed(CallLogType type)
+{
+ switch(type)
+ {
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ case CALL_LOG_TYPE_VOICE_MISSED:
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ case CALL_LOG_TYPE_VIDEO_REJECTED:
+ case CALL_LOG_TYPE_VIDEO_BLOCKED:
+ case CALL_LOG_TYPE_VIDEO_MISSED:
+ {
+ return false;
+ }
+ break;
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ case CALL_LOG_TYPE_VIDEO_INCOMING:
+ case CALL_LOG_TYPE_VIDEO_OUTGOING:
+ {
+ return true;
+ }
+ break;
+ case CALL_LOG_TYPE_SMS_INCOMING:
+ case CALL_LOG_TYPE_SMS_OUTGOING:
+ case CALL_LOG_TYPE_SMS_BLOCKED:
+ case CALL_LOG_TYPE_MMS_INCOMING:
+ case CALL_LOG_TYPE_MMS_OUTGOING:
+ case CALL_LOG_TYPE_MMS_BLOCKED:
+ case CALL_LOG_TYPE_EMAIL_INCOMING:
+ case CALL_LOG_TYPE_EMAIL_OUTGOING:
+ {
+ return false;
+ }
+ break;
+ default:
+ {
+ return false;
+ }
+ break;
+ }
+}
+
+void
+UnknownLogsDetailForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ AppLog("Enter");
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+ if (__pLogPresentor != null)
+ {
+ __pLogPresentor->RemoveCalllogChangeListner(*this);
+ __pLogPresentor = null;
+ }
+ if(__pCalllogInfo != null)
+ {
+ delete __pCalllogInfo;
+ __pCalllogInfo = null;
+ }
+}
+
+void
+UnknownLogsDetailForm::OnFormBackRequested(Form& source)
+{
+ AppLog("Enter");
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CALL_LOG, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY));
+}
+
+void
+UnknownLogsDetailForm::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLog("Enter");
+ __pList = static_cast<GroupedListView*>(GetControl(IDC_UNKNOWN_LOG_LIST));
+ if((__pList != null) && (key.Equals(String(SETTING_INFO_KEY_TIME_FORMAT)) == true ||
+ key.Equals(String(SETTING_INFO_KEY_DATE_CHANGE)) == true))
+ {
+ __pList->UpdateList();
+ }
+ AppLog("Exit");
+}
+
+bool
+UnknownLogsDetailForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ if(pDeletePopup != null && pDeletePopup->GetShowState() == true)
+ {
+ pDeletePopup->SetShowState(false);
+ return true;
+ }
+ }
+ return false;
+}