equal
deleted
inserted
replaced
253 */ |
253 */ |
254 void handleShellActivatedEvent() |
254 void handleShellActivatedEvent() |
255 { |
255 { |
256 // Implementation in child-classes |
256 // Implementation in child-classes |
257 // Logger.method(this, "handleShellActivatedEvent"); |
257 // Logger.method(this, "handleShellActivatedEvent"); |
258 if(ESWTUIThreadRunner.getInstance().getDisplay().getActiveShell() |
258 if(!isShellActive) |
259 != null) |
259 { |
260 { |
260 if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_MIDLET_BACKGROUND_EVENT, |
261 if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_MIDLET_BACKGROUND_EVENT, |
261 JadAttributeUtil.VALUE_PAUSE)) |
262 JadAttributeUtil.VALUE_PAUSE)) |
262 { |
263 { |
263 if(ESWTUIThreadRunner.getInstance().getDisplay().getActiveShell() |
264 ApplicationUtils.getInstance().resumeApplication(); |
264 != null) |
265 } |
265 { |
266 isShellActive = true; |
266 ApplicationUtils.getInstance().resumeApplication(); |
|
267 } |
|
268 isShellActive = true; |
|
269 } |
267 } |
270 } |
268 } |
271 } |
269 |
272 |
270 /** |
273 /** |
271 * Called by ShellListener when shell gets de-activated. |
274 * Called by ShellListener when shell gets de-activated. |
274 { |
277 { |
275 // Implementation in child-classes |
278 // Implementation in child-classes |
276 // Logger.method(this, "handleShellDeActivatedEvent"); |
279 // Logger.method(this, "handleShellDeActivatedEvent"); |
277 if(isShellActive) |
280 if(isShellActive) |
278 { |
281 { |
279 if(ESWTUIThreadRunner.getInstance().getDisplay().getActiveShell() |
282 if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_MIDLET_BACKGROUND_EVENT, |
280 == null) |
283 JadAttributeUtil.VALUE_PAUSE)) |
281 { |
284 { |
282 if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_MIDLET_BACKGROUND_EVENT, |
285 if(ESWTUIThreadRunner.getInstance().getDisplay().getActiveShell() |
283 JadAttributeUtil.VALUE_PAUSE)) |
286 == null) |
284 { |
287 { |
285 ApplicationUtils.getInstance().pauseApplication(); |
288 ApplicationUtils.getInstance().pauseApplication(); |
286 isShellActive = false; |
289 isShellActive = false; |
287 } |
290 } |
288 } |
291 } |