equal
deleted
inserted
replaced
41 // --------------------------------------------------------------------------- |
41 // --------------------------------------------------------------------------- |
42 // Connects client to lockapp application server |
42 // Connects client to lockapp application server |
43 // --------------------------------------------------------------------------- |
43 // --------------------------------------------------------------------------- |
44 TInt RLockAccessExtension::TryConnect( RWsSession& aWsSession ) |
44 TInt RLockAccessExtension::TryConnect( RWsSession& aWsSession ) |
45 { |
45 { |
|
46 (void)aWsSession; |
46 TInt ret(KErrNone); |
47 TInt ret(KErrNone); |
47 /* |
48 /* |
48 this is the old methd. Now we use QtHighway |
49 this is the old methd. Now we use QtHighway |
49 TApaTaskList list(aWsSession); |
50 TApaTaskList list(aWsSession); |
50 // check that lockapp is running |
51 // check that lockapp is running |
81 |
82 |
82 // Now we use QtHighway, but nevertheless need to be sure that only 1 process is running |
83 // Now we use QtHighway, but nevertheless need to be sure that only 1 process is running |
83 // This is done because Autolock.exe should start at the beginning, but it might not be ready yet. |
84 // This is done because Autolock.exe should start at the beginning, but it might not be ready yet. |
84 // As Qthighway will start it, it's better to give time for the first one to prepare itself. |
85 // As Qthighway will start it, it's better to give time for the first one to prepare itself. |
85 TInt err = KErrNone; |
86 TInt err = KErrNone; |
|
87 err = err; |
86 TInt numAttempts = 0; |
88 TInt numAttempts = 0; |
87 TInt numberOfInstances = 0; |
89 TInt numberOfInstances = 0; |
88 do |
90 do |
89 { |
91 { |
90 numberOfInstances=0; |
92 numberOfInstances=0; |
128 { |
130 { |
129 // process was started, but still not fully running. Give a bit more time |
131 // process was started, but still not fully running. Give a bit more time |
130 err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsLockInitiatorUID, value); |
132 err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsLockInitiatorUID, value); |
131 RDEBUG("err", err); |
133 RDEBUG("err", err); |
132 RDEBUG("value", value); |
134 RDEBUG("value", value); |
133 if(value<1) |
135 if(value==0 || value==-1) |
134 { |
136 { |
135 RDEBUG("Autolock.exe has started but it's not fully running", value); |
137 RDEBUG("Autolock.exe has started but it's not fully running", value); |
136 User::After(5*100*1000); // half a second |
138 User::After(5*100*1000); // half a second |
137 } |
139 } |
138 } |
140 } |