83 |
83 |
84 TInt interval( 0 ); |
84 TInt interval( 0 ); |
85 TRAP(err, ReadCenRepValueL(KIntervalKey, interval)); |
85 TRAP(err, ReadCenRepValueL(KIntervalKey, interval)); |
86 LOG1("CLocationManagerServer::ConstructL, cenrep interval value:%d", interval); |
86 LOG1("CLocationManagerServer::ConstructL, cenrep interval value:%d", interval); |
87 |
87 |
88 if (interval == 0) |
88 if (interval == 0 || err != KErrNone ) |
89 { |
89 { |
90 LOG1("CLocationManagerServer::ConstructL, cenrep interval err:%d", err); |
90 LOG1("CLocationManagerServer::ConstructL, cenrep interval err:%d", err); |
91 iInterval = KUpdateInterval; |
91 iInterval = KUpdateInterval; |
92 } |
92 } |
93 else |
93 else |
94 { |
94 { |
95 iInterval = interval * KMillion; |
95 iInterval = interval * KMillion; |
96 } |
96 } |
97 |
|
98 TInt trailLength( 0 ); |
|
99 TRAP(err, ReadCenRepValueL(KTrailLengthKey, trailLength)); |
|
100 LOG1("CLocationManagerServer::ConstructL, cenrep trail length value:%d", trailLength); |
|
101 |
|
102 if ( err != KErrNone ) |
|
103 { |
|
104 LOG1("CLocationManagerServer::ConstructL, cenrep trail length err:%d", err); |
|
105 iBufferSize = KMaxTrailLength / iInterval; |
|
106 } |
|
107 else |
|
108 { |
|
109 iBufferSize = trailLength * KMillion / iInterval; |
|
110 } |
|
111 |
97 |
112 TRAP(err, ReadCenRepValueL(KLocationDeltaKey, iLocationDelta)); |
98 TRAP(err, ReadCenRepValueL(KLocationDeltaKey, iLocationDelta)); |
113 LOG1("CLocationManagerServer::ConstructL, location delta value:%d", iLocationDelta); |
99 LOG1("CLocationManagerServer::ConstructL, location delta value:%d", iLocationDelta); |
114 |
100 |
115 if (iLocationDelta == 0) |
101 if (iLocationDelta == 0) |
158 { |
144 { |
159 LOG( "CLocationRecord::StartL(), begin" ); |
145 LOG( "CLocationRecord::StartL(), begin" ); |
160 iTrailCaptureSetting = aCaptureSetting; |
146 iTrailCaptureSetting = aCaptureSetting; |
161 if ( aCaptureSetting == RLocationTrail::ECaptureAll && !iPositionInfo->IsActive() ) |
147 if ( aCaptureSetting == RLocationTrail::ECaptureAll && !iPositionInfo->IsActive() ) |
162 { |
148 { |
|
149 if( iState == RLocationTrail::ETrailStopped ) |
|
150 { |
|
151 iTrail.Reset(); |
|
152 } |
163 iPositionInfo->StartL( aCaptureSetting, iInterval ); |
153 iPositionInfo->StartL( aCaptureSetting, iInterval ); |
164 } |
154 } |
165 else if ( aCaptureSetting == RLocationTrail::ECaptureNetworkInfo ) |
155 else if ( aCaptureSetting == RLocationTrail::ECaptureNetworkInfo ) |
166 { |
156 { |
167 // Update and store network info in location trail immediately. |
157 // Update and store network info in location trail immediately. |