1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Adjusts visibility of Phone app in device lock situations. |
|
15 * |
|
16 */ |
|
17 #include <xqcallinfo.h> |
|
18 #include <MediatorDomainUIDs.h> |
|
19 #include <callinformation.h> |
|
20 #include <eikenv.h> |
|
21 #include <xqserviceutil.h> |
|
22 #include <devicelockaccessapi.h> |
|
23 #include <qdebug.h> |
|
24 #include <telinformationpskeys.h> |
|
25 #include <coreapplicationuisdomainpskeys.h> |
|
26 #include <apgtask.h> |
|
27 #include "phonevisibilityhandler.h" |
|
28 #include "cphonepubsubproxy.h" |
|
29 #include "phoneconstants.h" |
|
30 #include "phoneuiqtviewif.h" |
|
31 |
|
32 bool m_bringToForegroundCalled; |
|
33 bool m_sendToBackgroundCalled; |
|
34 bool m_ordinalPositionCalled; |
|
35 bool m_phoneVisibleReturnValue; |
|
36 |
|
37 /*! |
|
38 PhoneVisibilityHandler::PhoneVisibilityHandler. |
|
39 */ |
|
40 PhoneVisibilityHandler::PhoneVisibilityHandler(PhoneUIQtViewIF &view, QObject *parent) |
|
41 : |
|
42 QObject(parent), |
|
43 m_view(view), |
|
44 m_eikonEnv(0), |
|
45 m_carModeEnabled(false), |
|
46 m_hideDeviceDialogs(false) |
|
47 { |
|
48 m_phoneVisibleReturnValue = false; |
|
49 } |
|
50 |
|
51 |
|
52 /*! |
|
53 PhoneVisibilityHandler::~PhoneVisibilityHandler. |
|
54 */ |
|
55 PhoneVisibilityHandler::~PhoneVisibilityHandler() |
|
56 { |
|
57 |
|
58 } |
|
59 |
|
60 /*! |
|
61 PhoneVisibilityHandler::bringToForeground. |
|
62 */ |
|
63 void PhoneVisibilityHandler::bringToForeground() |
|
64 { |
|
65 m_bringToForegroundCalled = true; |
|
66 } |
|
67 |
|
68 /*! |
|
69 PhoneVisibilityHandler::sendToBackground. |
|
70 */ |
|
71 void PhoneVisibilityHandler::sendToBackground(bool homeScreenForeground) |
|
72 { |
|
73 m_sendToBackgroundCalled = true; |
|
74 } |
|
75 |
|
76 /*! |
|
77 PhoneVisibilityHandler::hideDeviceDialogs. |
|
78 */ |
|
79 void PhoneVisibilityHandler::hideDeviceDialogs(bool hide) |
|
80 { |
|
81 Q_UNUSED(hide) |
|
82 } |
|
83 |
|
84 /*! |
|
85 PhoneVisibilityHandler::ordinalPosition. |
|
86 */ |
|
87 bool PhoneVisibilityHandler::phoneVisible() |
|
88 { |
|
89 m_ordinalPositionCalled = true; |
|
90 return m_phoneVisibleReturnValue; |
|
91 } |
|
92 |
|
93 /*! |
|
94 PhoneVisibilityHandler::HandlePropertyChangedL. |
|
95 */ |
|
96 void PhoneVisibilityHandler::HandlePropertyChangedL(const TUid& aCategory, |
|
97 const TUint aKey, const TInt aValue) |
|
98 { |
|
99 Q_UNUSED(aCategory) |
|
100 Q_UNUSED(aKey) |
|
101 Q_UNUSED(aValue) |
|
102 } |
|
103 |
|
104 /*! |
|
105 PhoneVisibilityHandler::adjustVisibility. |
|
106 */ |
|
107 void PhoneVisibilityHandler::adjustVisibility(AdjustAction action) |
|
108 { |
|
109 Q_UNUSED(action) |
|
110 } |
|
111 |
|
112 /*! |
|
113 PhoneVisibilityHandler::carModeChanged. |
|
114 */ |
|
115 void PhoneVisibilityHandler::carModeChanged() |
|
116 { |
|
117 |
|
118 } |
|
119 |
|