• April 27, 2024, 04:51:06 pm

Author Topic: Clearing icon cache  (Read 2564 times)

0 Members and 1 Guest are viewing this topic.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Clearing icon cache
« on: October 29, 2013, 08:50:41 pm »
Sometimes you are chaning .mif files, but Symbian still shows the old content.
The reason is simple: there's AknIconSrv.exe which caches them.

If you clear icon cache you:
- get more RAM
- can replace widgets, avkon2, app icons and other .mif files on the fly

You CAN'T:
clearing icon cache doesn't cause automatically redrawing EVERYTHING, this means you have to remove and re-add .e.g. a widget or shortcut on homescreen to see the new one.
killing ailauch.exe (homescreen process) does solve this, but also creates a lot of bugs.

Clearing icon cache itself is a simple thing, you can find it e.g. in Nokia R&D filebrowser.


1. in your project file add:
Code: [Select]
LIBS +=-laknicon #libary which contains the needed class AknIconConfig
TARGET.CAPABILITY += WriteDeviceData #Symbian Plattform Security, we all love you

2. in your implementation include:
Code: [Select]
#include <akniconconfig.h> //header of AknIconConfig class

3. the code:
Code: [Select]
AknIconConfig::EnableAknIconSrvCache(EFalse);
AknIconConfig::EnableAknIconSrvCache(ETrue);

it simply disables the icon cache (what does clear it) and re-enables it.
In theory you can disable it always, but than your phone will reload .mif files all the times what's bed for the performance (a lot of IO operations).

sources:
http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-66401841-EEC8-373D-AF0E-4AA9A771325E.html
http://developer.nokia.com/Community/Discussion/showthread.php/196435-Problem-in-displaying-Application-Icon!
« Last Edit: October 29, 2013, 10:01:10 pm by huellif »

Offline matthew

  • Mass Poster
  • ****
  • Posts: 1,315
  • Reputation: 13
  • SymphonyOS
  • Current Phone: :
    N8-00 (25.007)
    808 (113.010.1508)
    Retired E72, E6-00
Re: Clearing icon cache
« Reply #1 on: October 29, 2013, 10:24:00 pm »
Quote
Clearing icon cache itself is a simple thing, you can find it e.g. in Nokia R&D filebrowser.
Does that mean restarting the phone after changing themes can be eliminated by performing this?
i would test, but i have not found the command anywhere in FileBrowser's tools dialogue. i followed your link to Nokia Developer, but the links that Ziteng Chen provided for more info are both dead.
Can you explain the process, or is this only possible through an api?
« Last Edit: October 29, 2013, 10:37:44 pm by matthew »

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Clearing icon cache
« Reply #2 on: October 29, 2013, 11:16:06 pm »
sorry I don't know, because I don't use themes.

Offline matthew

  • Mass Poster
  • ****
  • Posts: 1,315
  • Reputation: 13
  • SymphonyOS
  • Current Phone: :
    N8-00 (25.007)
    808 (113.010.1508)
    Retired E72, E6-00
Re: Clearing icon cache
« Reply #3 on: October 29, 2013, 11:27:18 pm »
No worries  :D
Neither do i.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Clearing icon cache
« Reply #4 on: October 29, 2013, 11:54:21 pm »
Does that mean restarting the phone after changing themes can be eliminated by performing this?
i would test, but i have not found the command anywhere in FileBrowser's tools dialogue. i followed your link to Nokia Developer, but the links that Ziteng Chen provided for more info are both dead.
Can you explain the process, or is this only possible through an api?


It would need a little Application to be made mate.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Clearing icon cache
« Reply #5 on: October 29, 2013, 11:56:36 pm »
check the attached example app

[attachment deleted by admin]
« Last Edit: October 30, 2013, 12:06:25 am by huellif »

Offline matthew

  • Mass Poster
  • ****
  • Posts: 1,315
  • Reputation: 13
  • SymphonyOS
  • Current Phone: :
    N8-00 (25.007)
    808 (113.010.1508)
    Retired E72, E6-00
Re: Clearing icon cache
« Reply #6 on: October 30, 2013, 03:51:22 am »
Wow - thanks, mate! :D

Offline matthew

  • Mass Poster
  • ****
  • Posts: 1,315
  • Reputation: 13
  • SymphonyOS
  • Current Phone: :
    N8-00 (25.007)
    808 (113.010.1508)
    Retired E72, E6-00
Re: Clearing icon cache
« Reply #7 on: October 30, 2013, 04:07:06 am »
The app works, but not for the theme changes.
Thanks, though. Good on ya for the work and share :)